@haraka/eslint-config 2.0.2 → 2.0.4
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 +20 -19
- package/package.json +8 -4
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
|
|
|
4
4
|
|
|
5
5
|
### Unreleased
|
|
6
6
|
|
|
7
|
+
### [2.0.4] - 2026-03-17
|
|
8
|
+
|
|
9
|
+
- deps(all): added ^versions in package.json
|
|
10
|
+
- ci: updated CI configs
|
|
11
|
+
- style: prettier
|
|
12
|
+
|
|
13
|
+
### [2.0.3] - 2025-07-01
|
|
14
|
+
|
|
15
|
+
- no-unused-vars": add { "caughtErrorsIgnorePattern": "ignore" }
|
|
16
|
+
|
|
7
17
|
### [2.0.2] - 2025-01-07
|
|
8
18
|
|
|
9
19
|
- index: specify eslint globals as "readonly" (changed in v9)
|
|
@@ -132,3 +142,4 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
|
|
|
132
142
|
[2.0.0]: https://github.com/haraka/haraka-eslint/releases/tag/v2.0.0
|
|
133
143
|
[2.0.1]: https://github.com/haraka/haraka-eslint/releases/tag/v2.0.1
|
|
134
144
|
[2.0.2]: https://github.com/haraka/haraka-eslint/releases/tag/v2.0.2
|
|
145
|
+
[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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict'
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
env: {
|
|
@@ -10,28 +10,29 @@ module.exports = {
|
|
|
10
10
|
// es2024: true, /* enable after 2024-04-30, when node 18 LTS ends */
|
|
11
11
|
},
|
|
12
12
|
root: true,
|
|
13
|
-
extends: [
|
|
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
|
-
ecmaVersion:
|
|
27
|
+
ecmaVersion: 'latest',
|
|
28
28
|
},
|
|
29
29
|
rules: {
|
|
30
30
|
// 0 = off // 1 = warn // 2 = error
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
'no-empty': ['error', { allowEmptyCatch: true }],
|
|
32
|
+
'no-undef': 'warn',
|
|
33
|
+
'no-console': 'off',
|
|
34
|
+
'no-constant-condition': ['error', { checkLoops: false }],
|
|
35
|
+
'prefer-const': ['error', { ignoreReadBeforeAssign: true }],
|
|
36
|
+
'no-unused-vars': ['warn', { caughtErrorsIgnorePattern: 'ignore' }],
|
|
36
37
|
},
|
|
37
|
-
}
|
|
38
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haraka/eslint-config",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "eslint config for Haraka projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"haraka",
|
|
@@ -37,8 +37,12 @@
|
|
|
37
37
|
"homepage": "https://github.com/haraka/haraka-eslint#readme",
|
|
38
38
|
"devDependencies": {},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"eslint": "9.
|
|
41
|
-
"@eslint/js": "9.
|
|
42
|
-
"@eslint/eslintrc": "3.
|
|
40
|
+
"eslint": "^9.39.4",
|
|
41
|
+
"@eslint/js": "^9.39.4",
|
|
42
|
+
"@eslint/eslintrc": "^3.3.5"
|
|
43
|
+
},
|
|
44
|
+
"prettier": {
|
|
45
|
+
"singleQuote": true,
|
|
46
|
+
"semi": false
|
|
43
47
|
}
|
|
44
48
|
}
|