From 50dd995c8013769a63eaec0c972fa027be0d1591 Mon Sep 17 00:00:00 2001 From: Wojciech Sikora <35867383+WojtekTheWebDev@users.noreply.github.com> Date: Thu, 4 Apr 2024 14:13:29 +0200 Subject: [PATCH] Warn on no-empty-interface-rule (#47) --- .changeset/soft-chicken-grin.md | 5 ++ packages/integrations-eslint/index.js | 81 ++++++++++++++------------- 2 files changed, 46 insertions(+), 40 deletions(-) create mode 100644 .changeset/soft-chicken-grin.md diff --git a/.changeset/soft-chicken-grin.md b/.changeset/soft-chicken-grin.md new file mode 100644 index 0000000..3dbd3be --- /dev/null +++ b/.changeset/soft-chicken-grin.md @@ -0,0 +1,5 @@ +--- +"@vue-storefront/eslint-config-integrations": patch +--- + +Warn on no-empty-interface rule diff --git a/packages/integrations-eslint/index.js b/packages/integrations-eslint/index.js index 67f7a05..340ddd6 100644 --- a/packages/integrations-eslint/index.js +++ b/packages/integrations-eslint/index.js @@ -3,48 +3,48 @@ module.exports = { browser: true, es2021: true, node: true, - jest: true + jest: true, }, extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'airbnb-base', - 'plugin:prettier/recommended' + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "airbnb-base", + "plugin:prettier/recommended", ], - parser: '@typescript-eslint/parser', + parser: "@typescript-eslint/parser", parserOptions: { ecmaVersion: 12, - sourceType: 'module' + sourceType: "module", }, - plugins: ['@typescript-eslint', 'prettier'], + plugins: ["@typescript-eslint", "prettier"], rules: { - 'prettier/prettier': 'error', - 'no-unused-vars': 'off', - '@typescript-eslint/no-unused-vars': ['error'], - '@typescript-eslint/ban-types': 'warn', - 'no-underscore-dangle': 'off', - 'import/prefer-default-export': 'off', - 'import/extensions': [ - 'error', - 'ignorePackages', + "prettier/prettier": "error", + "no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": ["error"], + "@typescript-eslint/ban-types": "warn", + "no-underscore-dangle": "off", + "import/prefer-default-export": "off", + "import/extensions": [ + "error", + "ignorePackages", { - js: 'never', - ts: 'never' - } + js: "never", + ts: "never", + }, ], - 'import/no-extraneous-dependencies': 'warn', - '@typescript-eslint/no-non-null-assertion': 'warn', - 'no-param-reassign': 'warn', - 'no-shadow': 'warn', - 'no-use-before-define': 'warn', - camelcase: 'warn', - 'consistent-return': 'warn', - 'default-param-last': 'warn', - 'no-return-await': 'off', - 'no-throw-literal': 'warn', + "import/no-extraneous-dependencies": "warn", + "@typescript-eslint/no-non-null-assertion": "warn", + "no-param-reassign": "warn", + "no-shadow": "warn", + "no-use-before-define": "warn", + camelcase: "warn", + "consistent-return": "warn", + "default-param-last": "warn", + "no-return-await": "off", + "no-throw-literal": "warn", "@typescript-eslint/no-explicit-any": "off", - 'no-useless-constructor': 'off', - '@typescript-eslint/no-useless-constructor': 'warn', + "no-useless-constructor": "off", + "@typescript-eslint/no-useless-constructor": "warn", "no-undef": "warn", "no-empty-function": "off", "@typescript-eslint/no-empty-function": "warn", @@ -54,20 +54,21 @@ module.exports = { "@typescript-eslint/no-var-requires": "warn", "no-restricted-syntax": "off", "no-await-in-loop": "off", + "@typescript-eslint/no-empty-interface": "warn", }, settings: { - 'import/resolver': { + "import/resolver": { node: { - extensions: ['.js', '.ts'] - } - } + extensions: [".js", ".ts"], + }, + }, }, overrides: [ { files: ["*.ts", "*.tsx"], rules: { - "no-dupe-class-members": "off" - } - } - ] + "no-dupe-class-members": "off", + }, + }, + ], };