-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy patheslint.config.mjs
More file actions
30 lines (29 loc) · 888 Bytes
/
eslint.config.mjs
File metadata and controls
30 lines (29 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import react from '@eslint-react/eslint-plugin'
import js from '@eslint/js'
import eslintConfigPrettier from 'eslint-config-prettier'
import reactHooks from 'eslint-plugin-react-hooks'
import { defineConfig } from 'eslint/config'
import tseslint from 'typescript-eslint'
export default defineConfig({
files: ['**/*.{ts,tsx}'],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
extends: [
js.configs.recommended,
...tseslint.configs.recommended,
eslintConfigPrettier,
reactHooks.configs.flat.recommended,
react.configs['recommended-type-checked'],
],
rules: {
// Too strict for our codebase
'@eslint-react/no-array-index-key': 'off',
'@eslint-react/hooks-extra/no-direct-set-state-in-use-effect': 'off',
},
ignores: ['dist', 'build/'],
})