diff --git a/.eslintrc b/.eslintrc index dd9e350b1b02..b2313ee0c4a6 100644 --- a/.eslintrc +++ b/.eslintrc @@ -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": { diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 11c1d43fed39..7443bde6a82f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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|