@haraka/eslint-config 2.0.1 → 2.0.3
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.
- package/CHANGELOG.md +11 -0
- package/README.md +5 -5
- package/index.js +11 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
|
|
|
4
4
|
|
|
5
5
|
### Unreleased
|
|
6
6
|
|
|
7
|
+
### [2.0.3] - 2025-07-01
|
|
8
|
+
|
|
9
|
+
- no-unused-vars": add { "caughtErrorsIgnorePattern": "ignore" }
|
|
10
|
+
|
|
11
|
+
### [2.0.2] - 2025-01-07
|
|
12
|
+
|
|
13
|
+
- index: specify eslint globals as "readonly" (changed in v9)
|
|
14
|
+
- update codeclimate config for eslint 9
|
|
15
|
+
|
|
7
16
|
### [2.0.1] - 2025-01-07
|
|
8
17
|
|
|
9
18
|
- deps(peer): don't pin versions
|
|
@@ -126,3 +135,5 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
|
|
|
126
135
|
[1.1.5]: https://github.com/haraka/haraka-eslint/releases/tag/v1.1.5
|
|
127
136
|
[2.0.0]: https://github.com/haraka/haraka-eslint/releases/tag/v2.0.0
|
|
128
137
|
[2.0.1]: https://github.com/haraka/haraka-eslint/releases/tag/v2.0.1
|
|
138
|
+
[2.0.2]: https://github.com/haraka/haraka-eslint/releases/tag/v2.0.2
|
|
139
|
+
[2.0.3]: https://github.com/haraka/haraka-eslint/releases/tag/v2.0.3
|
package/README.md
CHANGED
|
@@ -14,11 +14,11 @@ In your Haraka module:
|
|
|
14
14
|
2. Configure eslint:
|
|
15
15
|
|
|
16
16
|
```sh
|
|
17
|
-
cat <<EOLINT > .
|
|
17
|
+
cat <<EOLINT > eslint.config.mjs
|
|
18
18
|
env:
|
|
19
19
|
node: true
|
|
20
20
|
es6: true
|
|
21
|
-
|
|
21
|
+
es2024: true
|
|
22
22
|
extends: "@haraka"
|
|
23
23
|
EOLINT
|
|
24
24
|
```
|
|
@@ -26,8 +26,8 @@ EOLINT
|
|
|
26
26
|
3. Add to the "scripts" section of `package.json`:
|
|
27
27
|
|
|
28
28
|
```json
|
|
29
|
-
"lint": "npx eslint
|
|
30
|
-
"lint:fix": "npx eslint
|
|
29
|
+
"lint": "npx eslint *.js test"
|
|
30
|
+
"lint:fix": "npx eslint --fix *.js test"
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
4. Within your CI workflow:
|
|
@@ -44,7 +44,7 @@ Step #4 above does this automatically when CI tests are set up.
|
|
|
44
44
|
|
|
45
45
|
If you agree with the lint suggestions, you can run `npm run lint:fix` and the changes will be made to your files automatically.
|
|
46
46
|
|
|
47
|
-
Custom rules can be added to the
|
|
47
|
+
Custom rules can be added to the eslint config file.
|
|
48
48
|
|
|
49
49
|
<!-- leave these buried at the bottom of the document -->
|
|
50
50
|
|
package/index.js
CHANGED
|
@@ -12,16 +12,16 @@ module.exports = {
|
|
|
12
12
|
root: true,
|
|
13
13
|
extends: ["eslint:recommended"],
|
|
14
14
|
globals: {
|
|
15
|
-
CONT:
|
|
16
|
-
STOP:
|
|
17
|
-
DENY:
|
|
18
|
-
DENYSOFT:
|
|
19
|
-
DENYDISCONNECT:
|
|
20
|
-
DISCONNECT:
|
|
21
|
-
OK:
|
|
22
|
-
NEXT_HOOK:
|
|
23
|
-
DELAY:
|
|
24
|
-
DENYSOFTDISCONNECT:
|
|
15
|
+
CONT: "readonly",
|
|
16
|
+
STOP: "readonly",
|
|
17
|
+
DENY: "readonly",
|
|
18
|
+
DENYSOFT: "readonly",
|
|
19
|
+
DENYDISCONNECT: "readonly",
|
|
20
|
+
DISCONNECT: "readonly",
|
|
21
|
+
OK: "readonly",
|
|
22
|
+
NEXT_HOOK: "readonly",
|
|
23
|
+
DELAY: "readonly",
|
|
24
|
+
DENYSOFTDISCONNECT: "readonly",
|
|
25
25
|
},
|
|
26
26
|
parserOptions: {
|
|
27
27
|
ecmaVersion: "latest",
|
|
@@ -33,5 +33,6 @@ module.exports = {
|
|
|
33
33
|
"no-console": "off",
|
|
34
34
|
"no-constant-condition": ["error", { checkLoops: false }],
|
|
35
35
|
"prefer-const": ["error", { ignoreReadBeforeAssign: true }],
|
|
36
|
+
"no-unused-vars": ["warn", { caughtErrorsIgnorePattern: "ignore" }],
|
|
36
37
|
},
|
|
37
38
|
};
|