UNPKG

@lego/eslint-config-react

Version:

LEGO shareable eslint config for js projects

18 lines (14 loc) 506 B
import { Linter } from 'eslint'; const config: Linter.Config = { rules: { // Rules of hooks ensures that you can // - Only Call Hooks at the Top Level // - Only Call Hooks from React Functions // see https://reactjs.org/docs/hooks-rules.html 'react-hooks/rules-of-hooks': 'error', // verifies the list of dependencies for Hooks like useEffect and similar, protecting against // the stale closure pitfalls 'react-hooks/exhaustive-deps': 'warn', }, }; export = config;