forked from Nexel-Lab/Arch-Framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
80 lines (79 loc) · 2.16 KB
/
eslint.config.mjs
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import globals from 'globals'
import tseslint from '@typescript-eslint/eslint-plugin'
import parser from '@typescript-eslint/parser'
import pluginReact from 'eslint-plugin-react'
import prettier from 'eslint-plugin-prettier'
import next from '@next/eslint-plugin-next'
export default [
{
files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'],
languageOptions: {
parser: parser,
ecmaVersion: 2018,
sourceType: 'module',
globals: {
...globals.browser,
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
ecmaFeatures: {
jsx: true,
},
},
plugins: {
react: pluginReact,
'@typescript-eslint': tseslint,
prettier: prettier,
next: next,
},
rules: {
indent: ['off', 2, { SwitchCase: 1 }],
quotes: 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-var-requires': 'warn',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-namespace': 'off',
'react-hooks/rules-of-hooks': 'warn',
'react/no-unescaped-entities': 'off',
'@next/next/no-page-custom-font': 'off',
'arrow-body-style': 'off',
'prefer-arrow-callback': 'warn',
'prettier/prettier': [
'warn',
{
parser: 'typescript',
endOfLine: 'auto',
singleQuote: true,
},
],
'import/no-anonymous-default-export': [
'warn',
{
allowArray: false,
allowArrowFunction: false,
allowAnonymousClass: false,
allowAnonymousFunction: false,
allowCallExpression: true,
allowNew: false,
allowLiteral: false,
allowObject: true,
},
],
},
settings: {
react: {
version: 'detect',
},
'import/resolver': {
typescript: {},
},
},
ignores: ['./src/app/(blank)/tools/glslEditor/libs/glslEditor.min.js', './packages/**/*'],
},
tseslint.configs.recommended,
pluginReact.configs.flat.recommended,
prettier.configs.recommended,
next.configs.recommended,
next.configs['core-web-vitals'],
]