chore: fix tseslint config
This commit is contained in:
parent
219e6a29e4
commit
15b03d7561
2 changed files with 14 additions and 7 deletions
|
|
@ -1,12 +1,11 @@
|
|||
import js from "@eslint/js";
|
||||
import eslintParserTypeScript from "@typescript-eslint/parser";
|
||||
import type { Linter } from "eslint";
|
||||
import eslintPluginBetterTailwindcss from "eslint-plugin-better-tailwindcss";
|
||||
import simpleImportSortPlugin from "eslint-plugin-simple-import-sort";
|
||||
import globals from "globals";
|
||||
import tseslint from "typescript-eslint";
|
||||
|
||||
export default [
|
||||
export default tseslint.config(
|
||||
js.configs.recommended,
|
||||
...tseslint.configs.recommended,
|
||||
// ...tailwind.configs["flat/recommended"],
|
||||
|
|
@ -15,7 +14,7 @@ export default [
|
|||
"simple-import-sort": simpleImportSortPlugin,
|
||||
"better-tailwindcss": eslintPluginBetterTailwindcss,
|
||||
},
|
||||
ignores: ["**/node_modules/**"],
|
||||
ignores: ["**/node_modules/**", "eslint.config.ts"],
|
||||
languageOptions: {
|
||||
parser: eslintParserTypeScript,
|
||||
parserOptions: {
|
||||
|
|
@ -26,10 +25,9 @@ export default [
|
|||
},
|
||||
globals: {
|
||||
...globals.node,
|
||||
...globals.browser,
|
||||
},
|
||||
},
|
||||
files: ["**/*.{js,mjs,cjs,jsx,tsx,ts}"],
|
||||
files: ["**/*.{tsx,ts}"],
|
||||
settings: {
|
||||
"better-tailwindcss": {
|
||||
entryPoint: "src/main.css",
|
||||
|
|
@ -63,4 +61,13 @@ export default [
|
|||
],
|
||||
},
|
||||
},
|
||||
] as Linter.Config[];
|
||||
{
|
||||
files: ["**/*.{js,cjs,mjs,jsx}"],
|
||||
extends: [tseslint.configs.disableTypeChecked],
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.browser,
|
||||
},
|
||||
},
|
||||
},
|
||||
);
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@
|
|||
"esModuleInterop": true
|
||||
// "noImplicitReturns": true
|
||||
},
|
||||
"include": ["src", "package.json"]
|
||||
"include": ["src", "package.json", "reset.d.ts"]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue