@haraka/eslint-config 1.1.0 → 1.1.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.
- package/CHANGELOG.md +5 -0
- package/README.md +2 -2
- package/index.js +19 -46
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
|
|
|
4
4
|
|
|
5
5
|
### Unreleased
|
|
6
6
|
|
|
7
|
+
#### [1.1.1] - 2024-04-06
|
|
8
|
+
|
|
9
|
+
- remove haraka:recommended
|
|
10
|
+
- remove rules included in eslint:recommended
|
|
11
|
+
|
|
7
12
|
#### [1.1.0] - 2024-04-06
|
|
8
13
|
|
|
9
14
|
- chore: update to eslint 8 standards
|
package/README.md
CHANGED
|
@@ -46,5 +46,5 @@ You can add custom rules to your .eslintrc file.
|
|
|
46
46
|
[ci-url]: https://github.com/haraka/haraka-eslint/actions/workflows/ci.yml
|
|
47
47
|
[clim-img]: https://codeclimate.com/github/haraka/haraka-eslint/badges/gpa.svg
|
|
48
48
|
[clim-url]: https://codeclimate.com/github/haraka/haraka-eslint
|
|
49
|
-
[npm-img]: https://nodei.co/npm/eslint-
|
|
50
|
-
[npm-url]: https://www.npmjs.com/package/eslint-
|
|
49
|
+
[npm-img]: https://nodei.co/npm/@haraka/eslint-config.png
|
|
50
|
+
[npm-url]: https://www.npmjs.com/package/@haraka/eslint-config
|
package/index.js
CHANGED
|
@@ -1,55 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
// 0 = off
|
|
4
|
-
// 1 = warn
|
|
5
|
-
// 2 = error
|
|
6
|
-
|
|
7
|
-
const envs = {
|
|
8
|
-
node: true,
|
|
9
|
-
es6: true,
|
|
10
|
-
mocha: true,
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const globals = {
|
|
14
|
-
OK: true,
|
|
15
|
-
CONT: true,
|
|
16
|
-
DENY: true,
|
|
17
|
-
DENYSOFT: true,
|
|
18
|
-
DENYDISCONNECT: true,
|
|
19
|
-
DENYSOFTDISCONNECT: true,
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const recommendedRules = {
|
|
23
|
-
"dot-notation": "error",
|
|
24
|
-
"one-var": ["error", "never"],
|
|
25
|
-
"no-empty": ["error", { allowEmptyCatch: true }],
|
|
26
|
-
"no-shadow": "error",
|
|
27
|
-
"no-undef": "warn",
|
|
28
|
-
"no-unused-vars": ["warn", { args: "none" }],
|
|
29
|
-
"no-console": "off",
|
|
30
|
-
"no-path-concat": "error",
|
|
31
|
-
"no-cond-assign": ["error", "except-parens"],
|
|
32
|
-
"no-constant-condition": ["error", { checkLoops: false }],
|
|
33
|
-
"prefer-const": ["error", { ignoreReadBeforeAssign: true }],
|
|
34
|
-
"no-var": "error",
|
|
35
|
-
"object-shorthand": ["warn", "always"],
|
|
36
|
-
"prefer-template": "warn",
|
|
37
|
-
};
|
|
38
|
-
|
|
39
3
|
module.exports = {
|
|
40
|
-
env:
|
|
4
|
+
env: {
|
|
5
|
+
node: true,
|
|
6
|
+
es6: true,
|
|
7
|
+
mocha: true,
|
|
8
|
+
},
|
|
41
9
|
root: true,
|
|
42
10
|
extends: "eslint:recommended",
|
|
43
|
-
globals:
|
|
11
|
+
globals: {
|
|
12
|
+
OK: true,
|
|
13
|
+
CONT: true,
|
|
14
|
+
DENY: true,
|
|
15
|
+
DENYSOFT: true,
|
|
16
|
+
DENYDISCONNECT: true,
|
|
17
|
+
DENYSOFTDISCONNECT: true,
|
|
18
|
+
},
|
|
44
19
|
rules: {
|
|
20
|
+
// 0 = off // 1 = warn // 2 = error
|
|
45
21
|
"no-newline-no-curly-if": require("./rules/no-newline-no-curly-if"),
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
globals: globals,
|
|
52
|
-
rules: recommendedRules,
|
|
53
|
-
},
|
|
22
|
+
"no-empty": ["error", { allowEmptyCatch: true }],
|
|
23
|
+
"no-undef": "warn",
|
|
24
|
+
"no-console": "off",
|
|
25
|
+
"no-constant-condition": ["error", { checkLoops: false }],
|
|
26
|
+
"prefer-const": ["error", { ignoreReadBeforeAssign: true }],
|
|
54
27
|
},
|
|
55
28
|
};
|