@rushstack/eslint-bulk 0.1.7 → 0.1.8

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 -14
  2. package/package.json +7 -5
package/README.md CHANGED
@@ -1,29 +1,37 @@
1
1
  # @rushstack/eslint-bulk
2
2
 
3
- This is a companion package for @rushstack/eslint-patch that should be installed globally as follows:
4
- ```bash
5
- npm i -g @rushstack/eslint-bulk
6
- ```
3
+ This package provides the command-line interface (CLI) for the **ESLint bulk suppressions**
4
+ feature from
5
+ [`@rushstack/eslint-patch`](https://www.npmjs.com/package/@rushstack/eslint-patch).
7
6
 
8
- The **eslint-bulk** package is a set of command line tools to use with the ESLint bulk suppressions patch.
9
- eslint-bulk commands must be run in the same current working directory containing your package's pertaining
10
- .eslintrc.js or .eslintrc.cjs file.
7
+ > 👉 See the `@rushstack/eslint-patch` [documentation](https://www.npmjs.com/package/@rushstack/eslint-patch)
8
+ > for details.
11
9
 
12
- ## eslint-bulk suppress
10
+ ### Typical workflow
13
11
 
14
- Use this command to automatically generate bulk suppressions for the given files and given rules.
15
- Supply the paths as the main argument. The paths argument is a glob pattern that follows the same
16
- rules as the "files" argument in the "eslint" command.
12
+ 1. Checkout your `main` branch, which is in a clean state where ESLint reports no violations.
13
+ 2. Update your configuration to enable the latest lint rules; ESLint now reports thousands of legacy violations.
14
+ 3. Run `eslint-bulk suppress --all ./src` to update **.eslint-bulk-suppressions.json.**
15
+ 4. ESLint now no longer reports violations, so commit the results to Git and merge your pull request.
16
+ 5. Over time, engineers may improve some of the suppressed code, in which case the associated suppressions are no longer needed.
17
+ 6. Run `eslint-bulk prune` periodically to find and remove unnecessary suppressions from **.eslint-bulk-suppressions.json**, ensuring that new violations will now get caught in those scopes.
18
+
19
+ ### "eslint-bulk suppress" command
17
20
 
18
21
  ```bash
19
22
  eslint-bulk suppress --rule NAME1 [--rule NAME2...] PATH1 [PATH2...]
20
23
  eslint-bulk suppress --all PATH1 [PATH2...]
21
24
  ```
22
25
 
23
- ## eslint-bulk prune
26
+ Use this command to automatically generate bulk suppressions for the specified lint rules and file paths.
27
+ The path argument is a [glob pattern](https://en.wikipedia.org/wiki/Glob_(programming)) with the same syntax
28
+ as path arguments for the `eslint` command.
29
+
24
30
 
25
- Use this command to automatically delete all unused suppression entries in all .eslint-bulk-suppressions.json
26
- files under the current working directory.
31
+ ### "eslint-bulk prune" command
32
+
33
+ Use this command to automatically delete all unnecessary suppression entries in all
34
+ **.eslint-bulk-suppressions.json** files under the current working directory.
27
35
 
28
36
  ```bash
29
37
  eslint-bulk prune
@@ -34,4 +42,7 @@ eslint-bulk prune
34
42
  - [CHANGELOG.md](https://github.com/microsoft/rushstack/blob/main/eslint/eslint-bulk/CHANGELOG.md) - Find
35
43
  out what's new in the latest version
36
44
 
45
+ - [`@rushstack/eslint-patch`](https://www.npmjs.com/package/@rushstack/eslint-patch) required companion package
46
+
47
+
37
48
  `@rushstack/eslint-bulk` is part of the [Rush Stack](https://rushstack.io/) family of projects.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rushstack/eslint-bulk",
3
- "version": "0.1.7",
4
- "description": "A set of helper CLIs to use with the rushstack ESLint toolchain",
3
+ "version": "0.1.8",
4
+ "description": "Roll out new ESLint rules in a large monorepo without cluttering up your code with \"eslint-ignore-next-line\"",
5
5
  "main": "index.js",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -21,12 +21,14 @@
21
21
  "retroactive",
22
22
  "disable",
23
23
  "ignore",
24
- "suppression"
24
+ "suppression",
25
+ "monkey",
26
+ "patch"
25
27
  ],
26
28
  "devDependencies": {
27
29
  "@types/node": "18.17.15",
28
- "local-node-rig": "1.0.0",
29
- "@rushstack/heft": "0.64.2"
30
+ "@rushstack/heft": "0.64.2",
31
+ "local-node-rig": "1.0.0"
30
32
  },
31
33
  "scripts": {
32
34
  "build": "heft build --clean",