Skip to content

Commit

Permalink
chore(eslint,lintstaged): update eslint and lint-staged config
Browse files Browse the repository at this point in the history
  • Loading branch information
junwen-k committed Jun 16, 2024
1 parent 7fad44e commit ac33c2e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
},
"eslint.workingDirectories": [{ "mode": "auto" }],
"eslint.useFlatConfig": true,
"eslint.experimental.useFlatConfig": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
4 changes: 2 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/'],
},
},
},
Expand All @@ -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': [
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions examples/shadcn-ui-nextjs/.lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"**/*.{js,mjs,ts,tsx,md,mdx}": ["eslint --fix", "prettier --check --write"],
"**/*.{json,yml}": ["prettier --check --write"]
}
4 changes: 4 additions & 0 deletions packages/use-ask/.lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"**/*.{js,mjs,ts,tsx,md,mdx}": ["eslint --fix", "prettier --check --write"],
"**/*.{json,yml}": ["prettier --check --write"]
}

0 comments on commit ac33c2e

Please sign in to comment.