Upgrade to ESLint 9
This commit is contained in:
@ -4,23 +4,30 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import type { Linter } from 'eslint';
|
||||
import RulesOfHooks from './RulesOfHooks';
|
||||
|
||||
import { Linter } from 'eslint';
|
||||
|
||||
import ExhaustiveDeps from './ExhaustiveDeps';
|
||||
import { name, version } from './package.json';
|
||||
import RulesOfHooks from './RulesOfHooks';
|
||||
|
||||
export const __EXPERIMENTAL__ = false;
|
||||
|
||||
export const configs = {
|
||||
export const flatConfigs = {
|
||||
recommended: {
|
||||
plugins: ['react-hooks'],
|
||||
name: 'react-hooks/recommended',
|
||||
plugins: {
|
||||
'react-hooks': {
|
||||
meta: { name, version },
|
||||
rules: {
|
||||
'rules-of-hooks': RulesOfHooks,
|
||||
'exhaustive-deps': ExhaustiveDeps,
|
||||
},
|
||||
},
|
||||
},
|
||||
rules: {
|
||||
'react-hooks/rules-of-hooks': 'error',
|
||||
'react-hooks/exhaustive-deps': 'warn',
|
||||
},
|
||||
} as Linter.BaseConfig,
|
||||
};
|
||||
|
||||
export const rules = {
|
||||
'rules-of-hooks': RulesOfHooks,
|
||||
'exhaustive-deps': ExhaustiveDeps,
|
||||
} satisfies Linter.Config,
|
||||
};
|
||||
|
Reference in New Issue
Block a user