forked from Kernel360/f1-KernelSquare-admin-frontend
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.cjs
54 lines (54 loc) · 1.3 KB
/
.eslintrc.cjs
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
module.exports = {
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:storybook/recommended',
],
plugins: [
'react',
'simple-import-sort',
'prettier',
'@typescript-eslint',
'unused-imports',
'@emotion',
],
ignorePatterns: ['vite.config.ts', 'vite-env.d.ts'],
rules: {
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'prettier/prettier': ['error'],
'no-unused-vars': 'error',
'prefer-const': 'error',
'no-irregular-whitespace': 'error',
'no-trailing-spaces': 'error',
'no-empty-function': 'error',
'no-duplicate-imports': 'error',
'newline-after-var': 'error',
// eslint-disable-next-line no-dupe-keys
'prettier/prettier': ['error', { endOfLine: 'auto' }],
'unused-imports/no-unused-imports-ts': ['error'],
'react/react-in-jsx-scope': 'off',
'react/no-unknown-property': ['error', { ignore: ['css'] }],
'@typescript-eslint/no-explicit-any': 'error',
},
overrides: [
{
env: {
node: true,
},
files: ['.eslintrc.{js,cjs,ts}'],
parserOptions: {
sourceType: 'module',
createDefaultProgram: true,
},
},
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json',
},
}