|
7 | 7 | reportUnusedDisableDirectives: true
|
8 | 8 | plugins:
|
9 | 9 | - flowtype
|
| 10 | + - import |
10 | 11 |
|
11 | 12 | rules:
|
| 13 | + ############################################################################## |
12 | 14 | # `eslint-plugin-flowtype` rule list based on `v4.6.x`
|
13 | 15 | # https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype
|
| 16 | + ############################################################################## |
14 | 17 |
|
15 | 18 | flowtype/array-style-complex-type: error
|
16 | 19 | flowtype/array-style-simple-type: error
|
@@ -55,9 +58,66 @@ rules:
|
55 | 58 | flowtype/space-before-type-colon: off
|
56 | 59 | flowtype/union-intersection-spacing: off
|
57 | 60 |
|
58 |
| - ################################################## |
| 61 | + ############################################################################## |
| 62 | + # `eslint-plugin-import` rule list based on `v2.20.x` |
| 63 | + # https://github.com/benmosher/eslint-plugin-import |
| 64 | + ############################################################################## |
| 65 | + |
| 66 | + # Static analysis |
| 67 | + # https://github.com/benmosher/eslint-plugin-import#static-analysis |
| 68 | + import/no-unresolved: error |
| 69 | + import/named: error |
| 70 | + import/default: error |
| 71 | + import/namespace: error |
| 72 | + import/no-restricted-paths: off |
| 73 | + import/no-absolute-path: error |
| 74 | + import/no-dynamic-require: error |
| 75 | + import/no-internal-modules: off |
| 76 | + import/no-webpack-loader-syntax: error |
| 77 | + import/no-self-import: error |
| 78 | + import/no-cycle: off # TODO |
| 79 | + import/no-useless-path-segments: off # TODO |
| 80 | + import/no-relative-parent-imports: off |
| 81 | + |
| 82 | + # Helpful warnings |
| 83 | + # https://github.com/benmosher/eslint-plugin-import#helpful-warnings |
| 84 | + import/export: error |
| 85 | + import/no-named-as-default: error |
| 86 | + import/no-named-as-default-member: error |
| 87 | + import/no-deprecated: error |
| 88 | + import/no-extraneous-dependencies: error |
| 89 | + import/no-mutable-exports: error |
| 90 | + import/no-unused-modules: error |
| 91 | + |
| 92 | + # Module systems |
| 93 | + # https://github.com/benmosher/eslint-plugin-import#module-systems |
| 94 | + import/unambiguous: error |
| 95 | + import/no-commonjs: error |
| 96 | + import/no-amd: error |
| 97 | + import/no-nodejs-modules: error |
| 98 | + |
| 99 | + # Style guide |
| 100 | + # https://github.com/benmosher/eslint-plugin-import#style-guide |
| 101 | + import/first: off # TODO |
| 102 | + import/exports-last: off |
| 103 | + import/no-duplicates: error |
| 104 | + import/no-namespace: error |
| 105 | + import/extensions: [error, never] # TODO: switch to ignorePackages |
| 106 | + import/order: off # TODO |
| 107 | + import/newline-after-import: error |
| 108 | + import/prefer-default-export: off |
| 109 | + import/max-dependencies: off |
| 110 | + import/no-unassigned-import: error |
| 111 | + import/no-named-default: error |
| 112 | + import/no-default-export: off |
| 113 | + import/no-named-export: off |
| 114 | + import/no-anonymous-default-export: error |
| 115 | + import/group-exports: off |
| 116 | + import/dynamic-import-chunkname: off |
| 117 | + |
| 118 | + ############################################################################## |
59 | 119 | # ESLint builtin rules list based on `v6.8.x`
|
60 |
| - ################################################## |
| 120 | + ############################################################################## |
61 | 121 |
|
62 | 122 | # Possible Errors
|
63 | 123 | # https://eslint.org/docs/rules/#possible-errors
|
@@ -361,13 +421,17 @@ rules:
|
361 | 421 | yield-star-spacing: off
|
362 | 422 |
|
363 | 423 | overrides:
|
364 |
| - - files: '**/__tests__/**' |
| 424 | + - files: '**/__*__/**' |
365 | 425 | rules:
|
| 426 | + import/no-nodejs-modules: off |
366 | 427 | no-restricted-syntax: off
|
367 | 428 | - files: 'resources/**'
|
368 | 429 | parserOptions:
|
369 | 430 | sourceType: script
|
370 | 431 | rules:
|
| 432 | + import/no-dynamic-require: off |
| 433 | + import/no-nodejs-modules: off |
| 434 | + import/no-commonjs: off |
371 | 435 | no-await-in-loop: off
|
372 | 436 | no-restricted-syntax: off
|
373 | 437 | no-console: off
|
|
0 commit comments