diff --git a/.changeset/chilled-trains-occur.md b/.changeset/chilled-trains-occur.md new file mode 100644 index 00000000..49bccf73 --- /dev/null +++ b/.changeset/chilled-trains-occur.md @@ -0,0 +1,5 @@ +--- +"@pagopa/eslint-config": patch +--- + +Fix vitest configuration; ignore "generated" folder diff --git a/packages/eslint-config/index.js b/packages/eslint-config/index.js index ed5706ad..8eb8ba14 100644 --- a/packages/eslint-config/index.js +++ b/packages/eslint-config/index.js @@ -12,19 +12,21 @@ export default [ prettier, perfectionistNatural, { - files: ["tests/**", "__tests__/**"], + files: ["**/tests/**", "**/__tests__/**"], + ...vitest.configs.recommended, rules: { - ...vitest.configs.recommended, - "prefer-called-with": ["error"], - "prefer-equality-matcher": ["error"], - "prefer-expect-resolves": ["error"], - "prefer-spy-on": ["error"], - "prefer-todo": ["error"], + ...vitest.configs.recommended.rules, + "@typescript-eslint/no-empty-function": "off", + "vitest/prefer-called-with": "error", + "vitest/prefer-equality-matcher": "error", + "vitest/prefer-expect-resolves": "error", + "vitest/prefer-spy-on": "error", + "vitest/prefer-todo": "error", }, }, { rules: { - "@typescript-eslint/no-unused-expressions": ["error"], + "@typescript-eslint/no-unused-expressions": "error", "@typescript-eslint/no-unused-vars": ["error", { args: "after-used" }], "arrow-body-style": "error", complexity: "error", @@ -42,4 +44,7 @@ export default [ radix: "error", }, }, + { + ignores: ["**/generated/*"], + }, ];