From 9d357f36e64b589d0e73a4c8fd54778f6b58be64 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Fri, 14 Jul 2023 14:38:34 +0530 Subject: [PATCH] ci: tweak eslint rules --- .eslintrc | 59 ++++++++++------------------------------- .pre-commit-config.yaml | 2 ++ 2 files changed, 16 insertions(+), 45 deletions(-) diff --git a/.eslintrc b/.eslintrc index dd9e350b1b..b2313ee0c4 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 11c1d43fed..7443bde6a8 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|