-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
58 lines (55 loc) · 1.29 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
55
56
57
58
import globals from 'globals';
import pluginJs from '@eslint/js';
import tseslint from 'typescript-eslint';
import reactPlugin from 'eslint-plugin-react';
export default [
{
ignores: [
'.DS_Store',
'node_modules',
'/dist',
'.env',
'.env.*',
'!.env.example',
'pnpm-lock.yaml',
'package-lock.json',
'yarn.lock',
'.next'
]
},
{ files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] },
{
languageOptions: {
globals: {
...globals.browser,
...globals.es2017,
...globals.node,
...globals.jest
},
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module'
}
}
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
reactPlugin.configs.flat.recommended,
reactPlugin.configs.flat['jsx-runtime'],
{
rules: {
'no-console': [
process.env.NODE_ENV === 'production' || process.env.CI ? 'error' : 'off',
{ allow: ['warn', 'error'] }
],
'no-trailing-spaces': 'error',
eqeqeq: 'off',
'prefer-const': ['error', { ignoreReadBeforeAssign: true }],
'react/react-in-jsx-scope': 'off',
'react/jsx-filename-extension': ['error', { extensions: ['.js', '.jsx', '.ts', '.tsx'] }],
'react/prop-types': 'off',
'react/no-unknown-property': ['error', { ignore: ['tw'] }],
'@typescript-eslint/no-explicit-any': 'off'
}
}
];