-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
50 lines (46 loc) · 1.37 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
import eslintPluginImport from 'eslint-plugin-import';
import eslintPluginPrettier from 'eslint-plugin-prettier';
import eslintPluginFunctional from 'eslint-plugin-functional';
/** @type {import('eslint').Linter.FlatConfig[]} */
const config = [
{
languageOptions: {
ecmaVersion: 2021,
sourceType: 'module'
},
plugins: {
import: eslintPluginImport,
prettier: eslintPluginPrettier,
functional: eslintPluginFunctional
},
rules: {
'prettier/prettier': 'error',
'prefer-const': 'error',
'no-var': 'error',
'no-unused-vars': 'warn',
'no-console': 'warn',
'object-shorthand': ['error', 'always'],
'prefer-template': 'error',
eqeqeq: ['error', 'always'],
curly: ['error', 'all'],
// Functional rules (removed type-dependent rules)
'arrow-body-style': ['error', 'always'],
'functional/no-let': 'error',
'functional/no-loop-statements': 'warn',
'functional/no-throw-statements': 'warn',
'functional/no-classes': 'error',
'no-param-reassign': 'error',
'no-use-before-define': ['error', { functions: false }],
// Disable rules that require type information
'functional/immutable-data': 'off'
},
ignores: [
'node_modules/**',
'dist/**',
'coverage/**',
'build/**',
'*.min.js'
]
}
];
export default config;