27 lines
669 B
TypeScript
27 lines
669 B
TypeScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* 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 ExhaustiveDeps from './ExhaustiveDeps';
|
|
|
|
export const __EXPERIMENTAL__ = false;
|
|
|
|
export const configs = {
|
|
recommended: {
|
|
plugins: ['react-hooks'],
|
|
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,
|
|
};
|