diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 3c3629e..0000000 --- a/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index e41eaa8..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "root": true, - "ignorePatterns": ["**/*"], - "plugins": ["@nx"], - "overrides": [ - { - "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], - "rules": { - "@nx/enforce-module-boundaries": [ - "error", - { - "enforceBuildableLibDependency": true, - "allow": [], - "depConstraints": [ - { - "sourceTag": "*", - "onlyDependOnLibsWithTags": ["*"] - } - ] - } - ] - } - }, - { - "files": ["*.ts", "*.tsx"], - "extends": ["plugin:@nx/typescript"], - "rules": { - "@typescript-eslint/no-extra-semi": "error", - "no-extra-semi": "off" - } - }, - { - "files": ["*.js", "*.jsx"], - "extends": ["plugin:@nx/javascript"], - "rules": { - "@typescript-eslint/no-extra-semi": "error", - "no-extra-semi": "off" - } - } - ] -} diff --git a/apps/cookbook/.eslintignore b/apps/cookbook/.eslintignore deleted file mode 100644 index fe8b59e..0000000 --- a/apps/cookbook/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -.docusaurus \ No newline at end of file diff --git a/apps/cookbook/.eslintrc.json b/apps/cookbook/.eslintrc.json deleted file mode 100644 index a39ac5d..0000000 --- a/apps/cookbook/.eslintrc.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": ["plugin:@nx/react", "../../.eslintrc.json"], - "ignorePatterns": ["!**/*"], - "overrides": [ - { - "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], - "rules": {} - }, - { - "files": ["*.ts", "*.tsx"], - "rules": {} - }, - { - "files": ["*.js", "*.jsx"], - "rules": {} - } - ] -} diff --git a/apps/cookbook/eslint.config.js b/apps/cookbook/eslint.config.js new file mode 100644 index 0000000..2f6e3f0 --- /dev/null +++ b/apps/cookbook/eslint.config.js @@ -0,0 +1,12 @@ +const nx = require('@nx/eslint-plugin'); +const baseConfig = require('../../eslint.config.js'); + +module.exports = [ + ...baseConfig, + ...nx.configs['flat/react'], + { + files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'], + // Override or add rules here + rules: {}, + }, +]; diff --git a/bun.lockb b/bun.lockb index 06dd081..9858e97 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..46a8005 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,33 @@ +const nx = require('@nx/eslint-plugin'); + +module.exports = [ + ...nx.configs['flat/base'], + ...nx.configs['flat/typescript'], + ...nx.configs['flat/javascript'], + { + ignores: ['**/dist'], + }, + { + files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'], + rules: { + '@nx/enforce-module-boundaries': [ + 'error', + { + enforceBuildableLibDependency: true, + allow: ['^.*/eslint(\\.base)?\\.config\\.[cm]?js$'], + depConstraints: [ + { + sourceTag: '*', + onlyDependOnLibsWithTags: ['*'], + }, + ], + }, + ], + }, + }, + { + files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'], + // Override or add rules here + rules: {}, + }, +]; diff --git a/nx.json b/nx.json index 6bf7f3b..51783fb 100644 --- a/nx.json +++ b/nx.json @@ -18,7 +18,8 @@ "production": [ "default", "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", - "!{projectRoot}/tsconfig.spec.json" + "!{projectRoot}/tsconfig.spec.json", + "!{projectRoot}/eslint.config.js" ] }, "defaultBase": "main", diff --git a/package.json b/package.json index a89572d..3190faa 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,8 @@ "@docusaurus/module-type-aliases": "3.6.3", "@docusaurus/tsconfig": "3.6.3", "@docusaurus/types": "3.6.3", + "@eslint/eslintrc": "3.2.0", + "@eslint/js": "9.16.0", "@nx/eslint": "19.8.9", "@nx/eslint-plugin": "19.8.9", "@nx/react": "19.8.9", @@ -26,21 +28,22 @@ "@nx/workspace": "19.8.9", "@testing-library/jest-dom": "6.4.2", "@testing-library/react": "15.0.6", - "@typescript-eslint/eslint-plugin": "7.18.0", - "@typescript-eslint/parser": "7.18.0", + "@typescript-eslint/eslint-plugin": "8.17.0", + "@typescript-eslint/parser": "8.17.0", "@vitest/ui": "1.4.0", - "eslint": "8.57.0", + "eslint": "9.16.0", "eslint-config-prettier": "9.1.0", "eslint-plugin-import": "2.31.0", - "eslint-plugin-jsx-a11y": "6.10.1", - "eslint-plugin-react": "7.34.1", - "eslint-plugin-react-hooks": "5.0.0", + "eslint-plugin-jsx-a11y": "6.10.2", + "eslint-plugin-react": "7.37.2", + "eslint-plugin-react-hooks": "5.1.0", "firebase-tools": "13.10.2", "jsdom": "24.0.0", "nx": "19.8.9", "nx-cloud": "19.1.0", "prettier": "3.2.5", "typescript": "5.5.4", + "typescript-eslint": "8.17.0", "vite": "5.2.8", "vitest": "1.4.0" },