-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds eslint configuration. (related to #13)
- Loading branch information
1 parent
2505a6b
commit ead79af
Showing
8 changed files
with
3,299 additions
and
112 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 |
---|---|---|
@@ -0,0 +1,64 @@ | ||
function err(...args) { | ||
return ["error", ...args]; | ||
} | ||
|
||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
node: true | ||
}, | ||
overrides: [ | ||
], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
project: ["./tsconfig.json"] | ||
}, | ||
plugins: ['@typescript-eslint'], | ||
rules: { | ||
"indent": err(4), | ||
"func-names": err("never"), | ||
"consistent-this": err("self"), | ||
"default-case-last": err(), | ||
"default-param-last": err(), | ||
"eqeqeq": err("always", {"null": "ignore"}), | ||
"no-delete-var": err(), | ||
"no-eval": err(), | ||
"no-implied-eval": err(), | ||
"no-lone-blocks": err(), | ||
"no-lonely-if": err(), | ||
"no-return-await": err(), | ||
"no-var": err(), | ||
"prefer-destructuring": err({"object": true}), | ||
"prefer-const": err(), | ||
"prefer-arrow-callback": err(), | ||
"prefer-rest-params": err(), | ||
"prefer-spread": err(), | ||
"prefer-template": err(), | ||
"require-await": err(), | ||
"require-yield": err(), | ||
"spaced-comment": err("always"), | ||
"comma-dangle": err("always-multiline"), | ||
"comma-style": err("last"), | ||
"comma-spacing": err(), | ||
"eol-last": err("always"), | ||
"dot-location": err("property"), | ||
"brace-style": err(), | ||
"function-paren-newline": err("consistent"), | ||
"function-call-argument-newline": err("consistent"), | ||
"block-scoped-var": err(), | ||
"consistent-return": err(), | ||
"no-async-promise-executor": err(), | ||
"no-promise-executor-return": err(), | ||
"semi": err("always"), | ||
"semi-style": err(), | ||
"space-unary-ops": err(), | ||
"space-infix-ops": err(), | ||
"space-before-blocks": err(), | ||
"operator-linebreak": err("before"), | ||
"@typescript-eslint/no-misused-promises": err(), | ||
"@typescript-eslint/no-floating-promises": err(), | ||
} | ||
} |
Oops, something went wrong.