diff --git a/commitlint.config.mjs b/commitlint.config.mjs index 9f13b0c4..b29b5ae8 100644 --- a/commitlint.config.mjs +++ b/commitlint.config.mjs @@ -1,4 +1,3 @@ - export default { extends: ["@commitlint/config-conventional"], }; diff --git a/eslint.config.mjs b/eslint.config.mjs index 8e93526a..124f019b 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,9 +1,8 @@ /* eslint-disable no-underscore-dangle */ import pluginJs from "@eslint/js"; -// eslint-disable-next-line import/no-unresolved -import tseslint from "typescript-eslint"; import prettierConfig from "eslint-config-prettier"; import prettierPluginRecommended from "eslint-plugin-prettier/recommended"; +import tseslint from "typescript-eslint"; /** @see https://www.raulmelo.me/en/blog/migration-eslint-to-flat-config */ import { FlatCompat } from "@eslint/eslintrc"; @@ -20,12 +19,25 @@ const compat = new FlatCompat({ /** @type {import('eslint').Linter.Config[]} */ export default [ { files: ["**/*.{js,mjs,cjs,ts}"] }, - { - ignores: ["*.config.js"] - }, pluginJs.configs.recommended, ...tseslint.configs.recommended, ...compat.extends("airbnb-base"), prettierConfig, prettierPluginRecommended, + { + rules: { + "import/no-extraneous-dependencies": [ + "warn", + { + devDependencies: [ + "**/*.config.{mts,ts,mjs,js}", + "**/storybook/**", + "**/stories/**", + "**/*.stories.{ts,tsx,js,jsx}", + "**/*.{spec,test}.{ts,tsx,js,jsx}", + ], + }, + ], + }, + }, ]; diff --git a/package.json b/package.json index 0892cfbe..8d11151e 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "", "private": "true", "scripts": { - "lint": "eslint", + "lint": "eslint --filter \"frontend,backend\" lint", "test": "echo \"Error: no test specified\" && exit 1", "prepare": "husky" }, @@ -20,15 +20,14 @@ "lint-staged": "^15.2.10", "prettier": "3.3.3", "typescript": "^5.6.3", - "typescript-eslint": "^8.13.0" - }, - "dependencies": { + "typescript-eslint": "^8.13.0", "@eslint/eslintrc": "^3.1.0", "@eslint/js": "^9.14.0", "eslint-config-airbnb-base": "^15.0.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1" }, + "dependencies": {}, "lint-staged": { "src/**/*.{js,jsx,ts,tsx}": [ "eslint --cache --fix",