-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
59 lines (50 loc) · 1.4 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
import eslint from '@eslint/js';
import perfectionist from 'eslint-plugin-perfectionist';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import simpleImportSort from 'eslint-plugin-simple-import-sort';
import globals from 'globals';
import tsEslint from 'typescript-eslint';
const MAX_LINE_LENGTH = 130;
export default [
eslint.configs.recommended,
eslintPluginPrettierRecommended,
...tsEslint.configs.recommended,
{
plugins: {
perfectionist,
'simple-import-sort': simpleImportSort,
},
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
rules: {
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'perfectionist/sort-jsx-props': [
'error',
{
type: 'line-length',
order: 'asc',
groups: ['multiline', 'unknown', 'shorthand'],
},
],
'max-len': ['error', {code: MAX_LINE_LENGTH}],
'prettier/prettier': [
'error',
{
proseWrap: 'always',
singleQuote: true,
bracketSpacing: false,
bracketSameLine: true,
arrowParens: 'avoid',
},
],
},
},
];