-
Notifications
You must be signed in to change notification settings - Fork 16
/
eslint.config.js
54 lines (53 loc) · 1.32 KB
/
eslint.config.js
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import js from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import prettier from 'eslint-plugin-prettier';
import reactPlugin from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import globals from 'globals';
import tseslint from 'typescript-eslint';
// eslint.config.js
export default tseslint.config(
js.configs.recommended,
...tseslint.configs.recommended,
{
...reactPlugin.configs.flat.recommended,
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
...reactPlugin.configs.flat.recommended.languageOptions,
globals: {
...globals.browser,
...globals.node,
...globals.es2022,
},
},
settings: { react: { version: 'detect' } },
plugins: {
react: reactPlugin,
prettier,
'react-hooks': reactHooks,
},
files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],
rules: {
...eslintConfigPrettier.rules,
...reactHooks.configs.recommended.rules,
...reactPlugin.configs['jsx-runtime'].rules,
},
},
{
ignores: [
'.firebase',
'.github/*',
'.vscode/*',
'data/*',
'dist/*',
'forklift/*',
'maps/*',
'mockups/*',
'node_modules/*',
'package-lock.json',
'public/*',
'scripts/*',
],
},
);