File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 1
1
# eslint-plugin-strict-dependencies
2
2
3
- NOTE: eslint-plugin-strict-dependencies uses tsconfig, tsconfig.json must be present.
3
+ ESlint plugin to define custom module dependency rules.
4
+
5
+ NOTE: ` eslint-plugin-strict-dependencies ` uses tsconfig, tsconfig.json must be present.
4
6
5
7
## Installation
6
8
@@ -16,7 +18,7 @@ npm install eslint-plugin-strict-dependencies --save-dev
16
18
- allowReferenceFrom: ` string[] ` (Glob or Forward matching string)
17
19
- Paths of files where target module imports are allowed.
18
20
- allowSameModule: ` boolean `
19
- - Whether or not the target module itself can import on the target module
21
+ - Whether it can be imported by other files in the same directory
20
22
21
23
## Usage
22
24
@@ -31,8 +33,8 @@ npm install eslint-plugin-strict-dependencies --save-dev
31
33
" error" ,
32
34
[
33
35
/**
34
- * example :
35
- * Components only allow dependencies in the following directions
36
+ * Example :
37
+ * Limit the dependencies in the following directions
36
38
* pages -> components/page -> components/ui
37
39
*/
38
40
{
@@ -50,7 +52,7 @@ npm install eslint-plugin-strict-dependencies --save-dev
50
52
51
53
/**
52
54
* example:
53
- * Don't import next/router directly, always import it through libs/router.
55
+ * Disallow to import ` next/router` directly. it should always be imported using ` libs/router.ts` .
54
56
*/
55
57
{
56
58
" module" : " next/router" ,
@@ -66,4 +68,4 @@ npm install eslint-plugin-strict-dependencies --save-dev
66
68
67
69
## License
68
70
69
- MIT
71
+ MIT
You can’t perform that action at this time.
0 commit comments