packages/cli: call eslint directly
This commit is contained in:
@@ -32,7 +32,7 @@ module.exports = {
|
||||
ecmaVersion: 2018,
|
||||
sourceType: 'module',
|
||||
},
|
||||
ignorePatterns: ['**/dist/**', '**/build/**'],
|
||||
ignorePatterns: ['.eslintrc.js', '**/dist/**'],
|
||||
rules: {
|
||||
'no-console': 0, // Permitted in console programs
|
||||
'new-cap': ['error', { capIsNew: false }], // Because Express constructs things e.g. like 'const r = express.Router()'
|
||||
|
||||
@@ -39,7 +39,7 @@ module.exports = {
|
||||
version: 'detect',
|
||||
},
|
||||
},
|
||||
ignorePatterns: ['**/dist/**', '**/build/**'],
|
||||
ignorePatterns: ['.eslintrc.js', '**/dist/**'],
|
||||
rules: {
|
||||
'import/no-duplicates': 'warn',
|
||||
'import/no-extraneous-dependencies': [
|
||||
|
||||
@@ -16,12 +16,19 @@
|
||||
|
||||
import { Command } from 'commander';
|
||||
import { run } from '../lib/run';
|
||||
import { paths } from '../lib/paths';
|
||||
|
||||
export default async (cmd: Command) => {
|
||||
const args = ['lint', '--max-warnings=0', '--format=codeframe'];
|
||||
const args = [
|
||||
'--ext',
|
||||
'js,jsx,ts,tsx',
|
||||
'--max-warnings=0',
|
||||
'--format=codeframe',
|
||||
paths.targetDir,
|
||||
];
|
||||
if (cmd.fix) {
|
||||
args.push('--fix');
|
||||
}
|
||||
|
||||
await run('web-scripts', args);
|
||||
await run('eslint', args);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user