-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- chore: update to eslint 8 standards - publish as @haraka/eslint-config - include Haraka globals - doc(README): update - add root:true and envs - add lint & prettier scripts - removed rules/no-newline-no-curly-if
- Loading branch information
Showing
10 changed files
with
79 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,5 @@ checks: | |
threshold: 10 | ||
|
||
ratings: | ||
paths: | ||
- "**.js" | ||
paths: | ||
- "**.js" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ env: | |
es6: true | ||
es2020: true | ||
|
||
extends: [ "eslint:recommended" ] | ||
extends: ["eslint:recommended"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,4 @@ env: | |
jobs: | ||
publish: | ||
uses: haraka/.github/.github/workflows/publish.yml@master | ||
secrets: inherit | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,27 @@ | ||
'use strict'; | ||
"use strict"; | ||
|
||
// 0 = off | ||
// 1 = warn | ||
// 2 = error | ||
|
||
const recommendedRules = { | ||
"dot-notation": "error", | ||
"one-var": ["error", "never"], | ||
"no-empty": ["error", { "allowEmptyCatch": true }], | ||
"no-shadow": "error", | ||
module.exports = { | ||
env: { | ||
node: true, | ||
es6: true, | ||
mocha: true, | ||
}, | ||
root: true, | ||
extends: "eslint:recommended", | ||
globals: { | ||
OK: true, | ||
CONT: true, | ||
DENY: true, | ||
DENYSOFT: true, | ||
DENYDISCONNECT: true, | ||
DENYSOFTDISCONNECT: true, | ||
}, | ||
rules: { | ||
// 0 = off // 1 = warn // 2 = error | ||
"no-empty": ["error", { allowEmptyCatch: true }], | ||
"no-undef": "warn", | ||
"no-unused-vars": [ "warn", { "args": "none" }], | ||
"no-console": "off", | ||
"no-path-concat": "error", | ||
"no-cond-assign": ["error", "except-parens"], | ||
"no-constant-condition": ["error", { "checkLoops": false }], | ||
"prefer-const": ["error", {"ignoreReadBeforeAssign": true}], | ||
"no-var": "error", | ||
"object-shorthand": ["warn", "always"], | ||
"prefer-template": "warn" | ||
}; | ||
|
||
// This is here so we know how this "rules" section is used in the future | ||
// - You can enable this rule by adding: `"haraka/no-newline-no-curly-if": 2` to your module's list of rules. | ||
// The rule prevents: `if (bool)\n do_thing()` and forces if()s with no curly to be on a single line. | ||
const rules = { | ||
"no-newline-no-curly-if": require('./rules/no-newline-no-curly-if'), | ||
"no-constant-condition": ["error", { checkLoops: false }], | ||
"prefer-const": ["error", { ignoreReadBeforeAssign: true }], | ||
}, | ||
}; | ||
|
||
module.exports = { | ||
rules: rules, | ||
configs: { | ||
recommended: { | ||
"env": { | ||
"node": true, | ||
"es6": true | ||
}, | ||
rules: recommendedRules, | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.