diff --git a/.vscode/settings.json b/.vscode/settings.json index 77babbc..f391dfe 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,6 +4,7 @@ }, "eslint.workingDirectories": [{ "mode": "auto" }], "eslint.useFlatConfig": true, + "eslint.experimental.useFlatConfig": true, "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": true } diff --git a/eslint.config.js b/eslint.config.js index 5fa5483..1e60caf 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -17,12 +17,13 @@ export default tseslint.config( { ignores: ['node_modules/', '{examples,packages}/**/dist/', 'examples/**/.next/'], }, + ...fixupConfigRules(compat.config(turbo)), { files: ['examples/shadcn-ui-nextjs/**/*.{js?(x),mjs,ts?(x),mdx}'], extends: [...fixupConfigRules(compat.config(nextPlugin.configs['core-web-vitals']))], settings: { next: { - rootDir: ['apps/*/'], + rootDir: ['apps/shadcn-ui-nextjs/'], }, }, }, @@ -32,7 +33,6 @@ export default tseslint.config( eslint.configs.recommended, ...fixupConfigRules(compat.config(importPlugin.configs.recommended)), ...fixupConfigRules(compat.config(importPlugin.configs.typescript)), - ...fixupConfigRules(compat.config(turbo)), ], rules: { 'import/order': [ diff --git a/.lintstagedrc.json b/examples/joy-ui-vite/.lintstagedrc.json similarity index 100% rename from .lintstagedrc.json rename to examples/joy-ui-vite/.lintstagedrc.json diff --git a/examples/shadcn-ui-nextjs/.lintstagedrc.json b/examples/shadcn-ui-nextjs/.lintstagedrc.json new file mode 100644 index 0000000..a17ee73 --- /dev/null +++ b/examples/shadcn-ui-nextjs/.lintstagedrc.json @@ -0,0 +1,4 @@ +{ + "**/*.{js,mjs,ts,tsx,md,mdx}": ["eslint --fix", "prettier --check --write"], + "**/*.{json,yml}": ["prettier --check --write"] +} diff --git a/packages/use-ask/.lintstagedrc.json b/packages/use-ask/.lintstagedrc.json new file mode 100644 index 0000000..a17ee73 --- /dev/null +++ b/packages/use-ask/.lintstagedrc.json @@ -0,0 +1,4 @@ +{ + "**/*.{js,mjs,ts,tsx,md,mdx}": ["eslint --fix", "prettier --check --write"], + "**/*.{json,yml}": ["prettier --check --write"] +}