1.5.3 • Published 1 year ago
eslint-plugin-dubious-plugin v1.5.3
eslint-plugin-dubious-plugin 
Check import paths according to FSD
The plugin contain 5 rules:
- different-layer-absolute-import (Prevents the use of relative import to import from other layers)
- underlying-layer-imports (Prevents to import a layer from underlying layer)
- public-api-import-slice (Check if a module was imported using a public API)
- different-layer-export (Prevents exporting a module from another layer)
- same-slice-local-import (Prevents the use of absolute import within one slice)
Rule options
First 4 rules (different-layer-absolute-import, underlying-layer-imports, public-api-import-slice, different-layer-export) have all the options below. The last one (same-slice-local-import) has only alias option. Also public-api-import-slice, public-api-import-slice and same-slice-local-import rules have autofix.
{
alias: string, // alias for absolute import folder (e.g. "src" or "@")
ignoreFiles: string[], // ignored files to check with the given pattern (e.g. '**/*.test.*')
ignoreImportPatterns: string[] // ignored import declaration string to check with the given pattern (e.g. '**/StoreProvider/**')
},
Example of use
// .eslintrc.js
{
'dubious-plugin/public-api-import-slice': [
'error',
{ alias: 'src', ignoreFiles: ['**/*.test.*', '**/*.stories.*'] },
],
'dubious-plugin/underlying-layer-imports': [
'error',
{
alias: 'src',
ignoreImportPatterns: ['**.scss', '**/StoreProvider/**'],
ignoreFiles: ['**/*.test.*', '**/*.stories.*'],
},
],
'dubious-plugin/different-layer-absolute-import': [
'error',
{
alias: 'src',
ignoreFiles: ['**/*.test.*', '**/*.stories.*'],
},
],
},
1.5.3
1 year ago
1.5.2
1 year ago
1.5.1
1 year ago
1.5.0
1 year ago
1.2.0
1 year ago
1.1.1
1 year ago
1.1.0
1 year ago
1.4.6
1 year ago
1.4.5
1 year ago
1.0.9
1 year ago
1.4.4
1 year ago
1.4.3
1 year ago
1.1.6
1 year ago
1.4.2
1 year ago
1.1.5
1 year ago
1.4.1
1 year ago
1.2.3
1 year ago
1.1.4
1 year ago
1.4.0
1 year ago
1.2.2
1 year ago
1.1.3
1 year ago
1.3.0
1 year ago
1.2.1
1 year ago
1.1.2
1 year ago
1.0.2
1 year ago
1.0.1
1 year ago
1.0.0
1 year ago
1.0.8
1 year ago
1.0.7
1 year ago
1.0.6
1 year ago
1.0.5
1 year ago
1.0.4
1 year ago
1.0.3
1 year ago
0.0.0
1 year ago