ci: tweak eslint rules
This commit is contained in:
parent
7e596aaea8
commit
9d357f36e6
2 changed files with 16 additions and 45 deletions
59
.eslintrc
59
.eslintrc
|
|
@ -2,60 +2,29 @@
|
||||||
"env": {
|
"env": {
|
||||||
"browser": true,
|
"browser": true,
|
||||||
"node": true,
|
"node": true,
|
||||||
"es6": true
|
"es2022": true
|
||||||
},
|
},
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"ecmaVersion": 11,
|
|
||||||
"sourceType": "module"
|
"sourceType": "module"
|
||||||
},
|
},
|
||||||
"extends": "eslint:recommended",
|
"extends": "eslint:recommended",
|
||||||
"rules": {
|
"rules": {
|
||||||
"indent": [
|
"indent": "off",
|
||||||
"error",
|
"brace-style": "off",
|
||||||
"tab",
|
"no-mixed-spaces-and-tabs": "off",
|
||||||
{ "SwitchCase": 1 }
|
"space-unary-ops": ["error", { "words": true }],
|
||||||
],
|
"linebreak-style": "off",
|
||||||
"brace-style": [
|
"quotes": ["off"],
|
||||||
"error",
|
"semi": "off",
|
||||||
"1tbs"
|
"camelcase": "off",
|
||||||
],
|
"no-unused-vars": "off",
|
||||||
"space-unary-ops": [
|
"no-console": ["warn"],
|
||||||
"error",
|
"no-extra-boolean-cast": ["off"],
|
||||||
{ "words": true }
|
"no-control-regex": ["off"],
|
||||||
],
|
|
||||||
"linebreak-style": [
|
|
||||||
"error",
|
|
||||||
"unix"
|
|
||||||
],
|
|
||||||
"quotes": [
|
|
||||||
"off"
|
|
||||||
],
|
|
||||||
"semi": [
|
|
||||||
"warn",
|
|
||||||
"always"
|
|
||||||
],
|
|
||||||
"camelcase": [
|
|
||||||
"off"
|
|
||||||
],
|
|
||||||
"no-unused-vars": [
|
|
||||||
"warn"
|
|
||||||
],
|
|
||||||
"no-redeclare": [
|
|
||||||
"warn"
|
|
||||||
],
|
|
||||||
"no-console": [
|
|
||||||
"warn"
|
|
||||||
],
|
|
||||||
"no-extra-boolean-cast": [
|
|
||||||
"off"
|
|
||||||
],
|
|
||||||
"no-control-regex": [
|
|
||||||
"off"
|
|
||||||
],
|
|
||||||
"space-before-blocks": "warn",
|
"space-before-blocks": "warn",
|
||||||
"keyword-spacing": "warn",
|
"keyword-spacing": "warn",
|
||||||
"comma-spacing": "warn",
|
"comma-spacing": "warn",
|
||||||
"key-spacing": "warn",
|
"key-spacing": "warn"
|
||||||
},
|
},
|
||||||
"root": true,
|
"root": true,
|
||||||
"globals": {
|
"globals": {
|
||||||
|
|
|
||||||
|
|
@ -53,10 +53,12 @@ repos:
|
||||||
hooks:
|
hooks:
|
||||||
- id: eslint
|
- id: eslint
|
||||||
types_or: [javascript]
|
types_or: [javascript]
|
||||||
|
args: ['--quiet']
|
||||||
# Ignore any files that might contain jinja / bundles
|
# Ignore any files that might contain jinja / bundles
|
||||||
exclude: |
|
exclude: |
|
||||||
(?x)^(
|
(?x)^(
|
||||||
frappe/public/dist/.*|
|
frappe/public/dist/.*|
|
||||||
|
cypress/.*|
|
||||||
.*node_modules.*|
|
.*node_modules.*|
|
||||||
.*boilerplate.*|
|
.*boilerplate.*|
|
||||||
frappe/www/website_script.js|
|
frappe/www/website_script.js|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue