Skip to content

Commit 42cd327

Browse files
committed
feat: add rule for eslint to check for cycle imports
1 parent 99f23c4 commit 42cd327

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.eslintrc.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const path = require('path');
22

33
module.exports = {
4-
extends: ['expo','plugin:tailwindcss/recommended', 'prettier'],
4+
extends: ['expo', 'plugin:tailwindcss/recommended', 'prettier'],
55
plugins: [
66
'unicorn',
77
'@typescript-eslint',
@@ -27,13 +27,16 @@ module.exports = {
2727
'react/destructuring-assignment': 'off', // Vscode doesn't support automatically destructuring, it's a pain to add a new variable
2828
'react/require-default-props': 'off', // Allow non-defined react props as undefined
2929
'@typescript-eslint/comma-dangle': 'off', // Avoid conflict rule between Eslint and Prettier
30-
'@typescript-eslint/consistent-type-imports': ['warn', {
30+
'@typescript-eslint/consistent-type-imports': [
31+
'warn',
32+
{
3133
prefer: 'type-imports',
3234
fixStyle: 'inline-type-imports',
3335
disallowTypeAnnotations: true,
3436
},
3537
], // Ensure `import type` is used when it's necessary
3638
'import/prefer-default-export': 'off', // Named export is easier to refactor automatically
39+
'import/no-cycle': ['error', { maxDepth: '∞' }],
3740
'tailwindcss/classnames-order': [
3841
'warn',
3942
{

0 commit comments

Comments
 (0)