Skip to content

Commit 2b77376

Browse files
authored
Merge pull request #47 from vitonsky/36-add-section-why-not-x-to-readme
docs: Add section "why not X" to readme
2 parents be66a6d + d4a4534 commit 2b77376

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
1-
A plugin for ESLint, to force use paths aliases according to `paths` options in `tsconfig.json` or `jsconfig.json`, instead of relative imports.
1+
A plugin for ESLint, to force use paths aliases according to `paths` option config in `tsconfig.json` or `jsconfig.json`, instead of relative imports.
22

33
Zero config, plug and play design.
44

5+
# About
6+
7+
Current rule supports auto fix with `eslint --fix`, so you may automate paths correction.
8+
9+
Unlike other plugins like [eslint-plugin-import-alias](https://github.com/dword-design/eslint-plugin-import-alias) and [eslint-plugin-import-alias](https://github.com/steelsojka/eslint-import-alias) whose introduce their own aliases, current plugin is just use aliases config from tsconfig/jsconfig.
10+
11+
With `eslint-plugin-paths` you have one source of truth - your `tsconfig.json` file (or `jsconfig.json` in case you use vanilla javascript).
12+
13+
TODO: We have a [ticket](https://github.com/vitonsky/eslint-plugin-paths/issues/28), to implement an option to deprecate specific paths for case you want to convert aliases back to relative paths. So you will just add alias to deprecation list, then run `eslint --fix` and unnecessary aliases will be inverted back to paths. Simple and powerful for aliases management.
14+
515
# Setup
616

717
Install package with `npm install -D eslint-plugin-paths`, then update eslint config

0 commit comments

Comments
 (0)