-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
60 lines (59 loc) · 1.83 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
59
60
import pluginJs from '@eslint/js'
import tsParser from '@typescript-eslint/parser'
import importPlugin from 'eslint-plugin-import-x'
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
import simpleImportSort from 'eslint-plugin-simple-import-sort'
import sort from 'eslint-plugin-sort'
import eslintPluginUnicorn from 'eslint-plugin-unicorn'
import globals from 'globals'
import { configs as tseslintConfigs } from 'typescript-eslint'
export default [
{
files: ['**/*.{js,mjs,cjs,ts}'],
ignores: ['eslint.config.js'],
},
{
languageOptions: {
globals: globals.browser,
parser: tsParser,
},
},
pluginJs.configs.recommended,
importPlugin.flatConfigs.recommended,
importPlugin.flatConfigs.typescript,
eslintPluginUnicorn.configs['flat/recommended'],
...tseslintConfigs.recommended,
eslintPluginPrettierRecommended,
{
files: ['**/*.{js,mjs,cjs,ts}'],
ignores: ['eslint.config.js'],
plugins: {
'simple-import-sort': simpleImportSort,
sort: sort,
},
rules: {
'@typescript-eslint/no-shadow': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{ ignoreRestSiblings: true },
],
camelcase: 'error',
'default-case-last': 'error',
'default-param-last': 'error',
'dot-notation': 'error',
eqeqeq: 'error',
'import-x/first': 'error',
'import-x/newline-after-import': 'error',
'import-x/no-duplicates': 'error',
'import-x/no-named-as-default-member': 'error',
'no-shadow': 'off',
'simple-import-sort/exports': 'error',
'simple-import-sort/imports': 'error',
'sort/destructuring-properties': 'error',
'sort/imports': 'off',
'sort/object-properties': 'error',
'sort/type-properties': 'error',
'unicorn/no-null': 'off',
},
},
]