We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69babbb commit 4629f54Copy full SHA for 4629f54
packages/react-scripts/bin/react-scripts.js
@@ -55,6 +55,22 @@ switch (script) {
55
process.exit(result.status);
56
break;
57
}
58
+ case 'lint': {
59
+ const eslintConfigPath = require.resolve('eslint-config-react-app');
60
+ spawn(
61
+ 'node',
62
+ [
63
+ require.resolve('eslint/bin/eslint'),
64
+ '--config',
65
+ eslintConfigPath,
66
+ 'src/**/*.{js,jsx,.mjs}',
67
+ ],
68
+ { stdio: 'inherit' }
69
+ ).on('error', err => {
70
+ console.log('Error running ESLint: ' + err);
71
+ process.exit(results.status);
72
+ });
73
+ }
74
default:
75
console.log('Unknown script "' + script + '".');
76
console.log('Perhaps you need to update react-scripts?');
0 commit comments