Skip to content

Commit 6def56a

Browse files
author
Tomoya Hirano
authored
Add tagline of this plugin (#2)
also modified the comments in the example.
1 parent c06b37a commit 6def56a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# eslint-plugin-strict-dependencies
22

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.
46

57
## Installation
68

@@ -16,7 +18,7 @@ npm install eslint-plugin-strict-dependencies --save-dev
1618
- allowReferenceFrom: `string[]` (Glob or Forward matching string)
1719
- Paths of files where target module imports are allowed.
1820
- 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
2022

2123
## Usage
2224

@@ -31,8 +33,8 @@ npm install eslint-plugin-strict-dependencies --save-dev
3133
"error",
3234
[
3335
/**
34-
* example:
35-
* Components only allow dependencies in the following directions
36+
* Example:
37+
* Limit the dependencies in the following directions
3638
* pages -> components/page -> components/ui
3739
*/
3840
{
@@ -50,7 +52,7 @@ npm install eslint-plugin-strict-dependencies --save-dev
5052

5153
/**
5254
* 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`.
5456
*/
5557
{
5658
"module": "next/router",
@@ -66,4 +68,4 @@ npm install eslint-plugin-strict-dependencies --save-dev
6668

6769
## License
6870

69-
MIT
71+
MIT

0 commit comments

Comments
 (0)