From d30b7d2a41f3f2cf899cad3ed69e3b7eacbc7234 Mon Sep 17 00:00:00 2001 From: Dmitry Kiselyov Date: Wed, 1 Dec 2021 05:20:35 +0300 Subject: [PATCH] feat: Include new airbnb rules for `default-param-last` and `no-loss-of-precision` Authored-by: Dmitry Kiselyov --- lib/shared.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/shared.js b/lib/shared.js index 6f8d53c..1eed483 100644 --- a/lib/shared.js +++ b/lib/shared.js @@ -74,6 +74,11 @@ module.exports = { 'comma-spacing': 'off', '@typescript-eslint/comma-spacing': baseStyleRules['comma-spacing'], + // Replace Airbnb 'default-param-last' rule with '@typescript-eslint' version + // https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/default-param-last.md + 'default-param-last': 'off', + '@typescript-eslint/default-param-last': baseBestPracticesRules['default-param-last'], + // Replace Airbnb 'dot-notation' rule with '@typescript-eslint' version // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/dot-notation.md 'dot-notation': 'off', @@ -130,6 +135,11 @@ module.exports = { 'no-new-func': 'off', '@typescript-eslint/no-implied-eval': baseBestPracticesRules['no-implied-eval'], + // Replace Airbnb 'no-loss-of-precision' rule with '@typescript-eslint' version + // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-loss-of-precision.md + 'no-loss-of-precision': 'off', + '@typescript-eslint/no-loss-of-precision': baseErrorsRules['no-loss-of-precision'], + // Replace Airbnb 'no-loop-func' rule with '@typescript-eslint' version // https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-loop-func.md 'no-loop-func': 'off',