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

Commit 2062184

Browse files
committed
turn on rule for preventing import cycles in plain JS
1 parent ffa194c commit 2062184

File tree

5 files changed

+5
-1
lines changed

5 files changed

+5
-1
lines changed

src/flow.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ module.exports = {
44
],
55
rules: {
66
'no-duplicate-imports': 'off', // to support separate imports of types
7+
'import/no-cycle': 'off', // to support importing types
78
'flowtype/array-style-complex-type': 'off',
89
'flowtype/array-style-simple-type': 'off',
910
'flowtype/arrow-parens': ['error', 'always'],

src/import.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module.exports = {
3737
allowObject: true,
3838
}],
3939
'import/no-commonjs': 'error',
40-
'import/no-cycle': 'off',
40+
'import/no-cycle': 'error',
4141
'import/no-default-export': 'off',
4242
'import/no-deprecated': 'error',
4343
'import/no-duplicates': 'error',

src/typescript.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ module.exports = {
1818
},
1919
],
2020
rules: {
21+
'import/no-cycle': 'off', // to support importing types/interfaces
2122
'@typescript-eslint/adjacent-overload-signatures': 'error',
2223
'@typescript-eslint/array-type': ['error', {
2324
default: 'array-simple',

tests/flow.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ describe('Rules Configurations', () => {
1313
const pluginRules = Object.keys(plugin.rules).map((ruleName) => `flowtype/${ruleName}`);
1414
const overridenRuleNames = [
1515
'no-duplicate-imports',
16+
'import/no-cycle',
1617
];
1718

1819
it('has configuration for all supported rules', () => {

tests/typescript.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ describe('Rules Configurations', () => {
1919
'quotes',
2020
'require-await',
2121
'semi',
22+
'import/no-cycle',
2223
];
2324

2425
it('has configuration for all supported rules', () => {

0 commit comments

Comments
 (0)