From 79bb8647177020036e6411a57416a53bc7a94c02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Vy=C4=8D=C3=ADtal?= Date: Sat, 6 Jun 2020 20:01:45 +0200 Subject: [PATCH] test: reconfigure ESLint for upcomming updates (#202) The config is effectively the same, it's just changed to work with newer versions of ESLint and TS plugin. --- .eslintignore | 2 ++ .eslintrc.js | 15 +++++++++++++-- tsconfig.json | 16 ++++++++++++++-- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/.eslintignore b/.eslintignore index 4436d6f85..ee58445b5 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,6 +1,8 @@ !/.eslintrc /__snapshots__ +/babel-register/ /bin /declarations /dist /lib +/node_modules diff --git a/.eslintrc.js b/.eslintrc.js index f31aba25c..faf88a2c8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -63,9 +63,20 @@ module.exports = { ], // Class related. - "@typescript-eslint/member-naming": [ + "@typescript-eslint/naming-convention": [ "error", - { private: "^_", protected: "^_", public: "^[^_]" } + { + selector: "memberLike", + modifiers: ["private", "protected"], + format: null, + leadingUnderscore: "require" + }, + { + selector: "memberLike", + modifiers: ["public"], + format: null, + leadingUnderscore: "forbid" + } ], "@typescript-eslint/no-parameter-properties": "off", "@typescript-eslint/no-useless-constructor": "error", diff --git a/tsconfig.json b/tsconfig.json index f9a0a31b1..efcb62eed 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -13,6 +13,18 @@ "strict": true, "target": "esnext" }, - "exclude": ["node_modules", "**/__tests__/*"], - "include": ["."] + "exclude": ["node_modules"], + "include": [ + "*.js", + "*.json", + "*.ts", + ".*.js", + ".*.json", + ".*.ts", + "@types", + "babel-preset", + "public", + "src", + "test" + ] }