Added linter configs
This commit is contained in:
parent
384ca8a357
commit
a084460ffa
2 changed files with 92 additions and 0 deletions
50
.eslintrc.json
Normal file
50
.eslintrc.json
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
{
|
||||||
|
"extends": "eslint:recommended",
|
||||||
|
"env": {
|
||||||
|
"node": true,
|
||||||
|
"es6": true
|
||||||
|
},
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": 2021
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"arrow-spacing": ["warn", { "before": true, "after": true }],
|
||||||
|
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
|
||||||
|
"comma-dangle": ["error", "always-multiline"],
|
||||||
|
"comma-spacing": "error",
|
||||||
|
"comma-style": "error",
|
||||||
|
"curly": ["error", "multi-line", "consistent"],
|
||||||
|
"dot-location": ["error", "property"],
|
||||||
|
"handle-callback-err": "off",
|
||||||
|
"indent": ["error", 4],
|
||||||
|
"keyword-spacing": "error",
|
||||||
|
"max-nested-callbacks": ["error", { "max": 4 }],
|
||||||
|
"max-statements-per-line": ["error", { "max": 2 }],
|
||||||
|
"no-console": "off",
|
||||||
|
"no-empty-function": "error",
|
||||||
|
"no-floating-decimal": "error",
|
||||||
|
"no-inline-comments": "error",
|
||||||
|
"no-lonely-if": "error",
|
||||||
|
"no-multi-spaces": "error",
|
||||||
|
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1, "maxBOF": 0 }],
|
||||||
|
"no-shadow": ["error", { "allow": ["err", "resolve", "reject"] }],
|
||||||
|
"no-trailing-spaces": ["error"],
|
||||||
|
"no-var": "error",
|
||||||
|
"object-curly-spacing": ["error", "always"],
|
||||||
|
"prefer-const": "error",
|
||||||
|
"quotes": ["error", "double"],
|
||||||
|
"semi": ["error", "never"],
|
||||||
|
"space-before-blocks": "error",
|
||||||
|
"space-before-function-paren": ["error", {
|
||||||
|
"anonymous": "never",
|
||||||
|
"named": "never",
|
||||||
|
"asyncArrow": "always"
|
||||||
|
}],
|
||||||
|
"space-in-parens": "error",
|
||||||
|
"space-infix-ops": "error",
|
||||||
|
"space-unary-ops": "error",
|
||||||
|
"spaced-comment": "error",
|
||||||
|
"yoda": "error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
42
.tidy.conf
Normal file
42
.tidy.conf
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
anchor-as-name: no #?
|
||||||
|
doctype: omit
|
||||||
|
drop-empty-paras: no
|
||||||
|
fix-backslash: no
|
||||||
|
fix-bad-comments: no
|
||||||
|
fix-uri:no
|
||||||
|
hide-endtags: yes #?
|
||||||
|
#input-xml: yes #?
|
||||||
|
join-styles: no
|
||||||
|
literal-attributes: yes
|
||||||
|
lower-literals: no
|
||||||
|
merge-divs: no
|
||||||
|
merge-spans: no
|
||||||
|
output-html: yes
|
||||||
|
preserve-entities: yes
|
||||||
|
quote-ampersand: no
|
||||||
|
quote-nbsp: no
|
||||||
|
show-body-only: auto
|
||||||
|
|
||||||
|
#Diagnostics Options Reference
|
||||||
|
show-errors: 0
|
||||||
|
show-warnings: 0
|
||||||
|
|
||||||
|
#Pretty Print Options Reference
|
||||||
|
break-before-br: yes
|
||||||
|
indent: yes
|
||||||
|
indent-attributes: no #default
|
||||||
|
indent-spaces: 4
|
||||||
|
tab-size: 4
|
||||||
|
wrap: 132
|
||||||
|
wrap-asp: no
|
||||||
|
wrap-jste: no
|
||||||
|
wrap-php: no
|
||||||
|
wrap-sections: no
|
||||||
|
|
||||||
|
#Character Encoding Options Reference
|
||||||
|
char-encoding: utf8
|
||||||
|
|
||||||
|
#Miscellaneous Options Reference
|
||||||
|
force-output: yes
|
||||||
|
quiet: yes
|
||||||
|
tidy-mark: no
|
||||||
Loading…
Add table
Reference in a new issue