-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.js
54 lines (51 loc) · 1.2 KB
/
default.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: {
es6: true,
jest: true,
},
extends: ['prettier'],
plugins: ['prettier'],
rules: {
// For some reason this is causing an error in react projects, adding it here even though it should be covered by
// Airbnb's own config.
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
jsx: 'never',
mjs: 'never',
ts: 'never',
tsx: 'never',
},
],
// Max line length set to 120, excluding URLs.
'max-len': [
'error',
{
code: 120,
comments: 120,
ignoreUrls: true,
},
],
// Prettier overrides
'prettier/prettier': [
'error',
{
endOfLine: 'auto',
printWidth: 80,
singleQuote: true, // Ensures compatibility with Airbnb rules
},
],
// Sort keys alphabetically - warning only as erroring will cause a lot of problems for mature apps.
// Good habit to have though, makes working with large objects/data structures easier IMO
'sort-keys': 'warn',
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
},
},
},
};