File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,12 @@ import reactPlugin from '@eslint-react/eslint-plugin';
22import a11yPlugin from 'eslint-plugin-jsx-a11y' ;
33import hooksPlugin from 'eslint-plugin-react-hooks' ;
44
5+ import { predicate } from '../utils/conditions.mjs' ;
6+
57/** @return { import('eslint').Linter.Config } */
68function react ( options = { } ) {
9+ const projectService = options . typescript && options . typescript . tsconfigRootDir && options . typescript . projectService ;
10+
711 return {
812 plugins : {
913 ...reactPlugin . configs . all . plugins ,
@@ -82,7 +86,9 @@ function react(options = {}) {
8286 '@eslint-react/no-unstable-default-props' : 'error' ,
8387 '@eslint-react/no-unused-class-component-members' : 'warn' ,
8488 '@eslint-react/no-unused-state' : 'warn' ,
85- '@eslint-react/no-unused-props' : 'off' ,
89+ ...predicate ( projectService , {
90+ '@eslint-react/no-unused-props' : 'warn' ,
91+ } ) ,
8692 '@eslint-react/no-useless-forward-ref' : 'off' ,
8793 '@eslint-react/no-useless-fragment' : 'warn' ,
8894 '@eslint-react/no-use-context' : 'warn' ,
You can’t perform that action at this time.
0 commit comments