-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
46 lines (46 loc) · 1.21 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
module.exports = {
// Not all of our packages use react-app, but it has a great set of defaults
// and is safe for non-react projects, so use it anyway
extends: ['react-app', 'plugin:prettier/recommended'],
plugins: ['import', 'simple-import-sort', 'prettier'],
rules: {
'import/no-duplicates': 'error',
'import/newline-after-import': 'error',
'simple-import-sort/imports': [
'error',
{
groups: [
// Side effects
['^\\u0000'],
// React (obvs)
['^react$'],
// All other external packages
['^@?\\w'],
// Our packages
['^@kenchi'],
// Absolute imports and anything not matched above
['^'],
// Relative imports
['^\\.'],
],
},
],
'simple-import-sort/exports': 'error',
'no-empty-pattern': 'off',
'@typescript-eslint/no-unused-vars': [
process.env.CI === 'true' ? 'error' : 'warn',
{
args: 'none',
ignoreRestSiblings: true,
varsIgnorePattern: '^_',
},
],
'react/jsx-no-useless-fragment': [
'error',
{
allowExpressions: true,
},
],
'prettier/prettier': 'error',
},
};