Skip to content
This repository was archived by the owner on Feb 21, 2020. It is now read-only.

Commit 17224e7

Browse files
committed
turn on rules for grouping exports at the end of modules in plain JS
1 parent 2062184 commit 17224e7

File tree

5 files changed

+10
-2
lines changed

5 files changed

+10
-2
lines changed

src/flow.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ module.exports = {
44
],
55
rules: {
66
'no-duplicate-imports': 'off', // to support separate imports of types
7+
'import/exports-last': 'off', // to support exporting types anywhere
8+
'import/group-exports': 'off', // to support exporting types anywhere
79
'import/no-cycle': 'off', // to support importing types
810
'flowtype/array-style-complex-type': 'off',
911
'flowtype/array-style-simple-type': 'off',

src/import.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ module.exports = {
1616
'import/default': 'error',
1717
'import/dynamic-import-chunkname': 'off',
1818
'import/export': 'error',
19-
'import/exports-last': 'off',
19+
'import/exports-last': 'error',
2020
'import/extensions': ['error', 'never', {json: 'ignorePackages'}],
2121
'import/first': 'error',
22-
'import/group-exports': 'off',
22+
'import/group-exports': 'error',
2323
'import/imports-first': 'off', // deprecated, alias for "first"
2424
'import/max-dependencies': 'off',
2525
'import/named': 'error',

src/typescript.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ module.exports = {
1818
},
1919
],
2020
rules: {
21+
'import/exports-last': 'off', // to support exporting types/interfaces anywhere
22+
'import/group-exports': 'off', // to support exporting types/interfaces anywhere
2123
'import/no-cycle': 'off', // to support importing types/interfaces
2224
'@typescript-eslint/adjacent-overload-signatures': 'error',
2325
'@typescript-eslint/array-type': ['error', {

tests/flow.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ describe('Rules Configurations', () => {
1313
const pluginRules = Object.keys(plugin.rules).map((ruleName) => `flowtype/${ruleName}`);
1414
const overridenRuleNames = [
1515
'no-duplicate-imports',
16+
'import/exports-last',
17+
'import/group-exports',
1618
'import/no-cycle',
1719
];
1820

tests/typescript.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ describe('Rules Configurations', () => {
1919
'quotes',
2020
'require-await',
2121
'semi',
22+
'import/exports-last',
23+
'import/group-exports',
2224
'import/no-cycle',
2325
];
2426

0 commit comments

Comments
 (0)