Skip to content

Commit

Permalink
fix(linter): use ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
Coly010 committed Jan 27, 2025
1 parent 89bfe1a commit 69ad3c7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
6 changes: 1 addition & 5 deletions packages/eslint-plugin/src/flat-configs/react-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ import tseslint from 'typescript-eslint';
* https://github.com/facebook/create-react-app/blob/567f36c9235f1e1fd4a76dc6d1ae00be754ca047/packages/eslint-config-react-app/index.js
*/
export default tseslint.config({
// Files need to be specified or else typescript-eslint rules will be
// applied to non-TS files. For example, libs add rules to *.json
// files, and TS rules should not apply to them.
// See: https://github.com/nrwl/nx/issues/28245
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
ignores: ['**/*.json'],
plugins: { import: importPlugin },
languageOptions: {
globals: {
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/flat-configs/react-jsx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default tseslint.config(
// applied to non-TS files. For example, libs add rules to *.json
// files, and TS rules should not apply to them.
// See: https://github.com/nrwl/nx/issues/28245
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
ignores: ['**/*.json'],
plugins: {
'react-hooks': reactHooksPlugin,
},
Expand Down
6 changes: 1 addition & 5 deletions packages/eslint-plugin/src/flat-configs/react-typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ import tseslint from 'typescript-eslint';
* package.
*/
export default tseslint.config({
// Files need to be specified or else typescript-eslint rules will be
// applied to non-TS files. For example, libs add rules to *.json
// files, and TS rules should not apply to them.
// See: https://github.com/nrwl/nx/issues/28245
files: ['**/*.ts', '**/*.tsx'],
ignores: ['**/*.json'],
rules: {
// TypeScript"s `noFallthroughCasesInSwitch` option is more robust (#6906)
'default-case': 'off',
Expand Down

0 comments on commit 69ad3c7

Please sign in to comment.