From 6290bc980fc88f6bfa05a307e94c068e154be961 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 14 Apr 2023 09:57:46 +0300 Subject: [PATCH] ESLint: move test-related overrides to overrides (#809) Also, sort the rules and use the default `strict` setting which is based on the `sourceType` setting --- .eslintrc.json | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 5f876242..636792cf 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -6,21 +6,28 @@ }, "env": { "es6": true, - "jest": true, "node": true }, - "globals": { - "dedent": true, - "testRule": true - }, "rules": { + "arrow-spacing": "error", "eqeqeq": "error", "no-use-before-define": ["error", "nofunc"], - "strict": ["error", "global"], - "arrow-spacing": "error", "no-var": "error", "object-shorthand": "error", "prefer-const": "error", + "strict": "error", "template-curly-spacing": "error" - } + }, + "overrides": [ + { + "files": ["**/__tests__/**"], + "env": { + "jest": true + }, + "globals": { + "dedent": true, + "testRule": true + } + } + ] }