Add Typescript linting to qa:lint-javascript command
[MAILPOET-2658]
This commit is contained in:
committed by
Jack Kitterhing
parent
20909f0912
commit
0ceac8921f
@@ -363,7 +363,7 @@ class RoboFile extends \Robo\Tasks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function qaLintJavascript() {
|
public function qaLintJavascript() {
|
||||||
return $this->_exec('npm run lint');
|
return $this->_exec('npm run check-types && npm run lint');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function qaLintCss() {
|
public function qaLintCss() {
|
||||||
|
@@ -4,13 +4,13 @@ import MailPoet from 'mailpoet';
|
|||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
type: 'success' | 'info' | 'warning' | 'error';
|
type: 'success' | 'info' | 'warning' | 'error';
|
||||||
scroll: boolean;
|
children: ReactNode;
|
||||||
closable: boolean;
|
scroll?: boolean;
|
||||||
renderInPlace: boolean;
|
closable?: boolean;
|
||||||
|
renderInPlace?: boolean;
|
||||||
onDisplay?: () => void;
|
onDisplay?: () => void;
|
||||||
onClose?: () => void;
|
onClose?: () => void;
|
||||||
timeout: number | false;
|
timeout?: number | false;
|
||||||
children: ReactNode;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const Notice: FC<Props> = ({
|
const Notice: FC<Props> = ({
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
"not dead"
|
"not dead"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "npm run lint6 && npm run lint5 && npm run lint-tests",
|
"lint": "npm run lint6 && npm run lint-ts && npm run lint5 && npm run lint-tests",
|
||||||
"lint6": "eslint -c .eslintrc.es6.json --max-warnings 0 'assets/js/src/**/*.jsx' 'tests/javascript/**/*.js'",
|
"lint6": "eslint -c .eslintrc.es6.json --max-warnings 0 'assets/js/src/**/*.jsx' 'tests/javascript/**/*.js'",
|
||||||
"lint-ts": "eslint -c .eslintrc.ts.json --max-warnings 0 'assets/js/src/**/*.tsx' 'assets/js/src/**/*.ts'",
|
"lint-ts": "eslint -c .eslintrc.ts.json --max-warnings 0 'assets/js/src/**/*.tsx' 'assets/js/src/**/*.ts'",
|
||||||
"lint5": "eslint -c .eslintrc.es5.json --ignore-pattern helpscout.js --max-warnings 0 'assets/js/src/**/*.js'",
|
"lint5": "eslint -c .eslintrc.es5.json --ignore-pattern helpscout.js --max-warnings 0 'assets/js/src/**/*.js'",
|
||||||
@@ -18,7 +18,8 @@
|
|||||||
"autoprefixer": "postcss assets/dist/css/*.css --use autoprefixer --no-map --replace",
|
"autoprefixer": "postcss assets/dist/css/*.css --use autoprefixer --no-map --replace",
|
||||||
"scss": "node-sass assets/css/src/ --output assets/dist/css/ --output-style compact",
|
"scss": "node-sass assets/css/src/ --output assets/dist/css/ --output-style compact",
|
||||||
"stylelint": "stylelint --fix",
|
"stylelint": "stylelint --fix",
|
||||||
"test": "mocha --require @babel/register tests/javascript/**/*.spec.js"
|
"test": "mocha --require @babel/register tests/javascript/**/*.spec.js",
|
||||||
|
"check-types": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.8.4",
|
"@babel/runtime": "^7.8.4",
|
||||||
|
@@ -20,8 +20,10 @@
|
|||||||
"strictPropertyInitialization": false, /* Enable strict checking of property initialization in classes. */
|
"strictPropertyInitialization": false, /* Enable strict checking of property initialization in classes. */
|
||||||
"noImplicitThis": false, /* Raise error on 'this' expressions with an implied 'any' type. */
|
"noImplicitThis": false, /* Raise error on 'this' expressions with an implied 'any' type. */
|
||||||
"alwaysStrict": false, /* Parse in strict mode and emit "use strict" for each source file. */
|
"alwaysStrict": false, /* Parse in strict mode and emit "use strict" for each source file. */
|
||||||
|
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
||||||
// "allowJs": true, /* Allow javascript files to be compiled. */
|
// "allowJs": true, /* Allow javascript files to be compiled. */
|
||||||
// "checkJs": true, /* Report errors in .js files. */
|
// "checkJs": true, /* Report errors in .js files. */
|
||||||
|
|
||||||
// "incremental": true, /* Enable incremental compilation */
|
// "incremental": true, /* Enable incremental compilation */
|
||||||
// "lib": [], /* Specify library files to be included in the compilation. */
|
// "lib": [], /* Specify library files to be included in the compilation. */
|
||||||
// "declaration": true, /* Generates corresponding '.d.ts' file. */
|
// "declaration": true, /* Generates corresponding '.d.ts' file. */
|
||||||
@@ -43,7 +45,6 @@
|
|||||||
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||||
|
|
||||||
/* Module Resolution Options */
|
/* Module Resolution Options */
|
||||||
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
|
||||||
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
||||||
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
||||||
// "typeRoots": [], /* List of folders to include type definitions from. */
|
// "typeRoots": [], /* List of folders to include type definitions from. */
|
||||||
|
Reference in New Issue
Block a user