From f8836d376b0e0734d15a7cb4925b0d028861c84e Mon Sep 17 00:00:00 2001 From: Yair Even Or Date: Mon, 23 Jan 2023 11:50:38 +0200 Subject: [PATCH] "notice" plugin should only apply for files within the `/src` folder --- .eslintrc.json | 57 +++++++++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 44701e7..04944c7 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -44,30 +44,39 @@ "indent": ["error", 4], "quotes": ["error", "single", { "avoidEscape": true }], "jsx-quotes": ["error", "prefer-single"], - "prefer-const": ["error"], - "notice/notice": ["error", {"templateFile":"notice.js"}] + "prefer-const": ["error"] }, - "overrides": [{ - "files": ["*.jsx"], - "rules": { - "max-lines-per-function": ["error", { "max": 40, "skipComments": true, "skipBlankLines": true }] + "overrides": [ + { + "files": ["./src/**/*.js", "./src/**/*.jsx"], + "rules": { + "notice/notice": ["error", {"templateFile":"notice.js"}] + } + }, + { + "files": ["*.jsx"], + "rules": { + "max-lines-per-function": ["error", { "max": 40, "skipComments": true, "skipBlankLines": true }] + } + }, + { + "files": ["index.js"], + "rules": { + "notice/notice": 0 + } + }, + { + "files": ["*.test.js"], + "rules": { + "max-lines": 0, + "max-lines-per-function": 0, + "react/display-name": 0, + "no-nested-ternary": 0, + "complexity": 0, + "react/prop-types": 0, + "react/jsx-key": 0, + "notice/notice": 0 + } } - },{ - "files": ["index.js"], - "rules": { - "notice/notice": 0 - } - },{ - "files": ["*.test.js"], - "rules": { - "max-lines": 0, - "max-lines-per-function": 0, - "react/display-name": 0, - "no-nested-ternary": 0, - "complexity": 0, - "react/prop-types": 0, - "react/jsx-key": 0, - "notice/notice": 0 - } - }] + ] } \ No newline at end of file