|
1 | 1 | module.exports = {
|
2 |
| - parser: '@typescript-eslint/parser', |
3 |
| - extends: [ |
4 |
| - 'eslint:recommended', |
5 |
| - 'plugin:@typescript-eslint/eslint-recommended', |
6 |
| - 'plugin:@typescript-eslint/recommended', |
7 |
| - 'plugin:prettier/recommended', |
8 |
| - 'plugin:import/errors', |
9 |
| - 'plugin:import/warnings', |
10 |
| - 'plugin:import/typescript', |
11 |
| - ], |
12 |
| - plugins: ['prettier'], |
13 |
| - parserOptions: { |
14 |
| - ecmaVersion: 2017, |
15 |
| - sourceType: 'module', |
16 |
| - project: './tsconfig.json', |
17 |
| - }, |
18 |
| - env: { |
19 |
| - node: true, |
20 |
| - es6: true, |
21 |
| - jest: true, |
22 |
| - }, |
23 |
| - settings: { |
24 |
| - 'import/resolver': { |
25 |
| - alias: { |
26 |
| - map: [ |
27 |
| - ['@module', './src/modules'], |
28 |
| - ['@common', './src/common'], |
29 |
| - ['@util', './src/util'], |
30 |
| - ], |
31 |
| - extensions: ['.js', '.ts'], |
32 |
| - }, |
33 |
| - node: { |
34 |
| - extensions: ['.js', '.ts'], |
35 |
| - }, |
36 |
| - }, |
37 |
| - 'import/parsers': { |
38 |
| - '@typescript-eslint/parser': ['.ts'], |
39 |
| - }, |
40 |
| - }, |
41 |
| - rules: { |
42 |
| - '@typescript-eslint/explicit-function-return-type': ['off'], |
43 |
| - '@typescript-eslint/explicit-member-accessibility': [1], |
44 |
| - '@typescript-eslint/interface-name-prefix': [0, 'never'], |
45 |
| - '@typescript-eslint/no-explicit-any': 0, |
46 |
| - '@typescript-eslint/no-namespace': 0, |
47 |
| - '@typescript-eslint/no-inferrable-types': 0, |
48 |
| - 'import/extensions': [ |
49 |
| - 1, |
50 |
| - 'never', |
51 |
| - { |
52 |
| - svg: 'always', |
53 |
| - }, |
54 |
| - ], |
55 |
| - 'import/no-extraneous-dependencies': [ |
56 |
| - 'error', |
57 |
| - { |
58 |
| - devDependencies: true, |
59 |
| - optionalDependencies: false, |
60 |
| - peerDependencies: false, |
61 |
| - }, |
62 |
| - ], |
63 |
| - 'no-param-reassign': 0, |
64 |
| - 'no-underscore-dangle': 0, |
65 |
| - 'no-use-before-define': 0, |
66 |
| - 'no-console': ['error', { allow: ['error'] }], |
67 |
| - 'padding-line-between-statements': 'off', |
68 |
| - '@typescript-eslint/padding-line-between-statements': [ |
69 |
| - 'error', |
70 |
| - // blank line before return |
71 |
| - { blankLine: 'always', prev: '*', next: 'return' }, |
72 |
| - // blank line before and after block like statements |
73 |
| - { blankLine: 'always', prev: '*', next: 'block-like' }, |
74 |
| - { blankLine: 'always', prev: 'block-like', next: '*' }, |
75 |
| - // blank line before and after function declarations |
76 |
| - { blankLine: 'always', prev: '*', next: 'function' }, |
77 |
| - { blankLine: 'always', prev: 'function', next: '*' } |
78 |
| - ], |
79 |
| - 'spaced-comment': 'error', |
80 |
| - // default case in a switch needs to be last |
81 |
| - 'default-case-last': 'error', |
| 2 | + parser: '@typescript-eslint/parser', |
| 3 | + extends: [ |
| 4 | + 'eslint:recommended', |
| 5 | + 'plugin:@typescript-eslint/eslint-recommended', |
| 6 | + 'plugin:@typescript-eslint/recommended', |
| 7 | + 'plugin:prettier/recommended', |
| 8 | + 'plugin:import/errors', |
| 9 | + 'plugin:import/warnings', |
| 10 | + 'plugin:import/typescript', |
| 11 | + ], |
| 12 | + plugins: ['prettier'], |
| 13 | + parserOptions: { |
| 14 | + ecmaVersion: 2017, |
| 15 | + sourceType: 'module', |
| 16 | + project: './tsconfig.json', |
| 17 | + }, |
| 18 | + env: { |
| 19 | + node: true, |
| 20 | + es6: true, |
| 21 | + jest: true, |
| 22 | + }, |
| 23 | + settings: { |
| 24 | + 'import/resolver': { |
| 25 | + alias: { |
| 26 | + map: [ |
| 27 | + ['@module', './src/modules'], |
| 28 | + ['@common', './src/common'], |
| 29 | + ['@util', './src/util'], |
| 30 | + ], |
| 31 | + extensions: ['.js', '.ts'], |
| 32 | + }, |
| 33 | + node: { |
| 34 | + extensions: ['.js', '.ts'], |
| 35 | + }, |
| 36 | + }, |
| 37 | + 'import/parsers': { |
| 38 | + '@typescript-eslint/parser': ['.ts'], |
| 39 | + }, |
| 40 | + }, |
| 41 | + rules: { |
| 42 | + '@typescript-eslint/explicit-function-return-type': ['off'], |
| 43 | + '@typescript-eslint/explicit-member-accessibility': [1], |
| 44 | + '@typescript-eslint/interface-name-prefix': [0, 'never'], |
| 45 | + '@typescript-eslint/no-explicit-any': 0, |
| 46 | + '@typescript-eslint/no-namespace': 0, |
| 47 | + '@typescript-eslint/no-inferrable-types': 0, |
| 48 | + 'import/extensions': [ |
| 49 | + 1, |
| 50 | + 'never', |
| 51 | + { |
| 52 | + svg: 'always', |
| 53 | + }, |
| 54 | + ], |
| 55 | + 'import/no-extraneous-dependencies': [ |
| 56 | + 'error', |
| 57 | + { |
| 58 | + devDependencies: true, |
| 59 | + optionalDependencies: false, |
| 60 | + peerDependencies: false, |
| 61 | + }, |
| 62 | + ], |
| 63 | + 'no-param-reassign': 0, |
| 64 | + 'no-underscore-dangle': 0, |
| 65 | + 'no-use-before-define': 0, |
| 66 | + 'no-console': ['error', { allow: ['error'] }], |
| 67 | + 'padding-line-between-statements': 'off', |
| 68 | + '@typescript-eslint/padding-line-between-statements': [ |
| 69 | + 'error', |
| 70 | + // blank line before return |
| 71 | + { blankLine: 'always', prev: '*', next: 'return' }, |
| 72 | + // blank line before and after block like statements |
| 73 | + { blankLine: 'always', prev: '*', next: 'block-like' }, |
| 74 | + { blankLine: 'always', prev: 'block-like', next: '*' }, |
| 75 | + // blank line before and after function declarations |
| 76 | + { blankLine: 'always', prev: '*', next: 'function' }, |
| 77 | + { blankLine: 'always', prev: 'function', next: '*' }, |
| 78 | + ], |
| 79 | + 'spaced-comment': 'error', |
| 80 | + // default case in a switch needs to be last |
| 81 | + 'default-case-last': 'error', |
82 | 82 |
|
83 |
| - 'import/order': [ |
84 |
| - 'error', |
85 |
| - { |
86 |
| - alphabetize: { |
87 |
| - order: 'asc', |
88 |
| - caseInsensitive: true, |
89 |
| - }, |
90 |
| - groups: ['builtin', 'external', ['internal', 'parent'], ['sibling', 'index']], |
91 |
| - pathGroups: [ |
92 |
| - { |
93 |
| - pattern: 'react', |
94 |
| - group: 'external', |
95 |
| - position: 'before', |
96 |
| - }, |
97 |
| - { |
98 |
| - pattern: '@**', |
99 |
| - group: 'internal', |
100 |
| - position: 'before', |
101 |
| - }, |
102 |
| - { |
103 |
| - pattern: '@**/**', |
104 |
| - group: 'internal', |
105 |
| - position: 'before', |
106 |
| - }, |
107 |
| - ], |
108 |
| - pathGroupsExcludedImportTypes: [], |
109 |
| - }, |
110 |
| - ], |
| 83 | + 'import/order': [ |
| 84 | + 'error', |
| 85 | + { |
| 86 | + alphabetize: { |
| 87 | + order: 'asc', |
| 88 | + caseInsensitive: true, |
| 89 | + }, |
| 90 | + groups: ['builtin', 'external', ['internal', 'parent'], ['sibling', 'index']], |
| 91 | + pathGroups: [ |
| 92 | + { |
| 93 | + pattern: 'react', |
| 94 | + group: 'external', |
| 95 | + position: 'before', |
| 96 | + }, |
| 97 | + { |
| 98 | + pattern: '@**', |
| 99 | + group: 'internal', |
| 100 | + position: 'before', |
| 101 | + }, |
| 102 | + { |
| 103 | + pattern: '@**/**', |
| 104 | + group: 'internal', |
| 105 | + position: 'before', |
| 106 | + }, |
| 107 | + ], |
| 108 | + pathGroupsExcludedImportTypes: [], |
| 109 | + }, |
| 110 | + ], |
111 | 111 |
|
112 |
| - 'prettier/prettier': [ |
113 |
| - 'error', |
114 |
| - { |
115 |
| - printWidth: 120, |
116 |
| - semi: true, |
117 |
| - singleQuote: true, |
118 |
| - tabWidth: 2, |
119 |
| - trailingComma: 'none', |
120 |
| - useTabs: false, |
121 |
| - arrowParens: 'avoid', |
122 |
| - }, |
123 |
| - ], |
124 |
| - }, |
| 112 | + 'prettier/prettier': [ |
| 113 | + 'error', |
| 114 | + { |
| 115 | + printWidth: 120, |
| 116 | + semi: true, |
| 117 | + singleQuote: true, |
| 118 | + tabWidth: 2, |
| 119 | + trailingComma: 'none', |
| 120 | + useTabs: true, |
| 121 | + arrowParens: 'avoid', |
| 122 | + }, |
| 123 | + ], |
| 124 | + }, |
125 | 125 | };
|
0 commit comments