From 45ff8e8fbe135c00fdf91734657e09e7739c6001 Mon Sep 17 00:00:00 2001 From: Spike Date: Tue, 2 May 2023 16:32:49 +0400 Subject: [PATCH 1/2] =?UTF-8?q?fix(rules):=20=D0=9F=D0=BE=D0=BF=D1=80?= =?UTF-8?q?=D0=B0=D0=B2=D0=B8=D1=82=20=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=D0=BE=20`no-unused-vars`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Разрешит использование контролируемых неиспользуемых переменных. Для этого переменная должна иметь знак `_` (нижнее подчеркивание) первым символом в названии переменной. * Отключит базовое правило `no-unused-vars` (рекомендация разработчиков `typescript-eslint`); * Добавит правило `@typescript-eslint/no-unused-vars` с уровнем ошибки `warn` и дополнительным объектом конфигурации `'argsIgnorePattern': '^_'`. --- node.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/node.js b/node.js index 92fd9a7..f32cec2 100644 --- a/node.js +++ b/node.js @@ -12,6 +12,7 @@ module.exports = { // ------------------------------------------ 'no-console': 'off', 'no-shadow': 'off', + 'no-unused-vars': 'off', 'node/handle-callback-err': ['error', "^.*(e|E)rr"], 'node/no-callback-literal': 'error', 'node/no-exports-assign': 'off', @@ -50,7 +51,8 @@ module.exports = { 'unicorn/prefer-node-protocol': 'warn', // Typescript // ------------------------------------------ - '@typescript-eslint/no-empty-interface': 'off', - '@typescript-eslint/no-shadow': 'error' + '@typescript-eslint/no-empty-interface': 'off', + '@typescript-eslint/no-shadow': 'error', + '@typescript-eslint/no-unused-vars': ['warn', {'argsIgnorePattern': '^_'}] } }; From c652e01863249e78e9501ad0fa3fe7169e7a00b7 Mon Sep 17 00:00:00 2001 From: Spike Date: Tue, 2 May 2023 16:41:32 +0400 Subject: [PATCH 2/2] =?UTF-8?q?feat(changelog):=20=D0=9E=D0=B1=D0=BD=D0=BE?= =?UTF-8?q?=D0=B2=D0=B8=D1=82=20=D1=84=D0=B0=D0=B9=D0=BB=20changelog.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/changelog.md b/changelog.md index 1dee461..7c54a00 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,9 @@ +9.1.1 / 2023-05-02 +================== + + * Добавили правило в конфигурационном файле `node` + * `@typescript-eslint/no-unused-vars` с уровнем ошибки `warn` и дополнительным объектом конфигурации `'argsIgnorePattern': '^_'` + 9.1.0 / 2023-05-02 ==================