-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
49 lines (47 loc) · 1.34 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
'use strict';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import globals from 'globals';
import pluginJs from '@eslint/js';
import sortDestructureKeys from 'eslint-plugin-sort-destructure-keys';
import sortImportsRequires from 'eslint-plugin-sort-imports-requires';
import sortKeysFix from 'eslint-plugin-sort-keys-fix';
export default [
{ languageOptions: { globals: globals.node } },
pluginJs.configs.recommended,
eslintPluginPrettierRecommended,
{
plugins: {
'sort-destructure-keys': sortDestructureKeys,
'sort-imports-requires': sortImportsRequires,
'sort-keys-fix': sortKeysFix
},
rules: {
'prettier/prettier': [
'error',
{
arrowParens: 'avoid',
printWidth: 120,
singleQuote: true,
trailingComma: 'none'
}
],
'sort-destructure-keys/sort-destructure-keys': 'error',
'sort-imports-requires/sort-imports': [
'error',
{
unsafeAutofix: true,
useOldSingleMemberSyntax: true
}
],
'sort-imports-requires/sort-requires': [
'error',
{
unsafeAutofix: true,
useAliases: false,
useOldSingleMemberSyntax: true
}
],
'sort-keys-fix/sort-keys-fix': ['error', 'asc', { natural: true }]
}
}
];