Skip to content

Commit ea847c0

Browse files
committed
Use shared rules from other projects
1 parent 63830f4 commit ea847c0

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.eslintrc.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ module.exports = {
1212
'plugin:eslint-comments/recommended',
1313
'plugin:unicorn/recommended',
1414
'plugin:node/recommended',
15+
'plugin:import/recommended',
16+
'plugin:promise/recommended',
17+
'plugin:fp/recommended',
1518
'plugin:ava/recommended',
1619
'plugin:react/recommended',
1720
'prettier/react',
@@ -195,7 +198,22 @@ module.exports = {
195198
},
196199
],
197200

201+
'import/extensions': [2, 'always', { ignorePackages: true }],
198202
'import/max-dependencies': [2, { max: 20 }],
203+
'import/newline-after-import': 2,
204+
'import/no-amd': 2,
205+
'import/no-anonymous-default-export': 2,
206+
'import/no-cycle': [2, { commonjs: true }],
207+
'import/no-deprecated': 2,
208+
'import/no-dynamic-require': 2,
209+
'import/no-extraneous-dependencies': 2,
210+
'import/no-mutable-exports': 2,
211+
'import/no-named-default': 2,
212+
'import/no-namespace': 2,
213+
'import/no-self-import': 2,
214+
'import/no-unassigned-import': [2, { allow: ['*polyfill*', '**/*polyfill*', 'log-process-errors/**'] }],
215+
'import/no-unresolved': [2, { commonjs: true }],
216+
'import/no-useless-path-segments': [2, { commonjs: true }],
199217
'import/order': [
200218
2,
201219
{
@@ -231,6 +249,14 @@ module.exports = {
231249
// This does not work well in a monorepo
232250
'node/shebang': 0,
233251

252+
'promise/no-callback-in-promise': 2,
253+
'promise/no-nesting': 2,
254+
'promise/no-promise-in-callback': 2,
255+
'promise/no-return-in-finally': 2,
256+
'promise/prefer-await-to-callbacks': 2,
257+
'promise/prefer-await-to-then': 2,
258+
'promise/valid-params': 2,
259+
234260
'react/prop-types': 0,
235261

236262
// Not enabled by default in unicorn/recommended, but still pretty useful
@@ -296,6 +322,8 @@ module.exports = {
296322
// Inline comments making code samples vertically shorter are useful
297323
'line-comment-position': 0,
298324
'no-inline-comments': 0,
325+
strict: 0,
326+
'import/no-unresolved': 0,
299327
'node/no-missing-require': 0,
300328
},
301329
},

0 commit comments

Comments
 (0)