Skip to content

Commit

Permalink
ci: tweak eslint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush committed Jul 14, 2023
1 parent 7e596aa commit 9d357f3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 45 deletions.
59 changes: 14 additions & 45 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,60 +2,29 @@
"env": {
"browser": true,
"node": true,
"es6": true
"es2022": true
},
"parserOptions": {
"ecmaVersion": 11,
"sourceType": "module"
},
"extends": "eslint:recommended",
"rules": {
"indent": [
"error",
"tab",
{ "SwitchCase": 1 }
],
"brace-style": [
"error",
"1tbs"
],
"space-unary-ops": [
"error",
{ "words": true }
],
"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"
],
"indent": "off",
"brace-style": "off",
"no-mixed-spaces-and-tabs": "off",
"space-unary-ops": ["error", { "words": true }],
"linebreak-style": "off",
"quotes": ["off"],
"semi": "off",
"camelcase": "off",
"no-unused-vars": "off",
"no-console": ["warn"],
"no-extra-boolean-cast": ["off"],
"no-control-regex": ["off"],
"space-before-blocks": "warn",
"keyword-spacing": "warn",
"comma-spacing": "warn",
"key-spacing": "warn",
"key-spacing": "warn"
},
"root": true,
"globals": {
Expand Down
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ repos:
hooks:
- id: eslint
types_or: [javascript]
args: ['--quiet']
# Ignore any files that might contain jinja / bundles
exclude: |
(?x)^(
frappe/public/dist/.*|
cypress/.*|
.*node_modules.*|
.*boilerplate.*|
frappe/www/website_script.js|
Expand Down

0 comments on commit 9d357f3

Please sign in to comment.