ignore-lint-errors 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +25 -2
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -2,14 +2,36 @@
2
2
 
3
3
  # ignore-lint-errors
4
4
 
5
- _Codemod to add ignore directives_
5
+ _Codemod to ignore lint errors per line_
6
+
7
+
8
+ ## Why?
9
+
10
+ In large production projects, ignoring lint errors for existing code is the most pragmatic, quickest approach to complete these tasks:
11
+
12
+ - Introduce a new lint rule.
13
+ - Update a linter to the next minor or major version.
14
+ - Migrate code to a different format, e.g. convert `*.{gjs,js}` (JavaScript) to `*.{gts,ts}` (TypeScript).
15
+
16
+ For the sake of reducing noise, some prefer disabling linting for the entire file. They do so by adding a global directive (e.g. `eslint-disable`) or creating a special file to "suppress" files with many errors.
17
+
18
+ Instead, `ignore-lint-error` takes the honest approach: It adds a local directive (e.g. `eslint-disable-next-line`) for every line that has an error. This way, we can easily see and show others (including non-engineers),
19
+
20
+ - How bad our code is in order to create the urgency to fix issues. The number of local ignores (1 per line) always estimates the actual number of errors better than the number of global ignores (1 per file).
21
+ - Which parts of our code are good and should be replicated, and which parts are bad and to be avoided. When there is a global ignore, a linter doesn't check the file for the given rule(s).
6
22
 
7
23
 
8
24
  ## Usage
9
25
 
10
26
  ### Arguments
11
27
 
12
- [PROVIDE REQUIRED AND OPTIONAL ARGUMENTS.]
28
+ You must pass `--linter` to indicate which linter to run.
29
+
30
+ ```sh
31
+ pnpx ignore-lint-errors --linter eslint
32
+ pnpx ignore-lint-errors --linter stylelint
33
+ pnpx ignore-lint-errors --linter typescript
34
+ ```
13
35
 
14
36
  <details>
15
37
 
@@ -44,6 +66,7 @@ pnpm build
44
66
  ## Compatibility
45
67
 
46
68
  - Node.js v22 or above
69
+ - Tested against `eslint@v9`, `stylelint@v17`, `typescript@v5`
47
70
 
48
71
 
49
72
  ## Contributing
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ignore-lint-errors",
3
- "version": "0.4.0",
4
- "description": "Codemod to add ignore directives",
3
+ "version": "0.4.1",
4
+ "description": "Codemod to ignore lint errors per line",
5
5
  "keywords": [
6
6
  "codemod",
7
7
  "ember-codemod",