diff options
Diffstat (limited to '.eslintrc.cjs')
-rw-r--r-- | .eslintrc.cjs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 5bb3c21..e984179 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs | |||
@@ -12,6 +12,7 @@ module.exports = { | |||
12 | 'plugin:jest/recommended', | 12 | 'plugin:jest/recommended', |
13 | 'plugin:jest/style', | 13 | 'plugin:jest/style', |
14 | 'plugin:prettier/recommended', | 14 | 'plugin:prettier/recommended', |
15 | 'plugin:unicorn/recommended', | ||
15 | ], | 16 | ], |
16 | env: { | 17 | env: { |
17 | es6: true, | 18 | es6: true, |
@@ -51,6 +52,20 @@ module.exports = { | |||
51 | 'newlines-between': 'always', | 52 | 'newlines-between': 'always', |
52 | }, | 53 | }, |
53 | ], | 54 | ], |
55 | // Allows files with names same as the name of their default export. | ||
56 | 'unicorn/filename-case': [ | ||
57 | 'error', | ||
58 | { | ||
59 | cases: { | ||
60 | camelCase: true, | ||
61 | pascalCase: true, | ||
62 | }, | ||
63 | }, | ||
64 | ], | ||
65 | // Airbnb prefers forEach. | ||
66 | 'unicorn/no-array-for-each': 'off', | ||
67 | // Common abbreviations are known and readable. | ||
68 | 'unicorn/prevent-abbreviations': 'off', | ||
54 | }, | 69 | }, |
55 | overrides: [ | 70 | overrides: [ |
56 | { | 71 | { |
@@ -120,5 +135,12 @@ module.exports = { | |||
120 | 'import/no-relative-packages': 'off', | 135 | 'import/no-relative-packages': 'off', |
121 | }, | 136 | }, |
122 | }, | 137 | }, |
138 | { | ||
139 | files: ['scripts/**/*.js'], | ||
140 | rules: { | ||
141 | // Scripts are allowed to `exit` abruptly. | ||
142 | 'unicorn/no-process-exit': 'off', | ||
143 | }, | ||
144 | }, | ||
123 | ], | 145 | ], |
124 | }; | 146 | }; |