-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
54 lines (54 loc) · 1.22 KB
/
.eslintrc.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
module.exports = {
env: {
jest: true,
node: true,
},
extends: [
'prettier',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
overrides: [
{
extends: ['prettier', 'plugin:prettier/recommended'],
files: ['*.js', '*.jsx'],
parser: '@babel/eslint-parser',
parserOptions: {
requireConfigFile: false,
},
plugins: ['prettier'],
rules: {
'prettier/prettier': 0,
},
},
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin', 'ordered-imports', 'prettier'],
root: true,
rules: {
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/no-explicit-any': 0,
'ordered-imports/ordered-imports': [
'warn',
{
'group-ordering': [
{match: '^react', name: 'react', order: 10},
{
match: '^lodash|^enzyme|^sinon|^idb|^memoize-one|^chai',
name: 'external libraries',
order: 30,
},
{match: '^@storn', name: 'current package', order: 40},
{match: '^\\./', name: 'current directory', order: 80},
{match: '.*', name: 'new unknown', order: 90},
],
},
],
'prettier/prettier': 0,
'sort-keys': [1, 'asc'],
},
};