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 js from "@eslint/js";
|
||||||
import eslintParserTypeScript from "@typescript-eslint/parser";
|
import eslintParserTypeScript from "@typescript-eslint/parser";
|
||||||
import type { Linter } from "eslint";
|
|
||||||
import eslintPluginBetterTailwindcss from "eslint-plugin-better-tailwindcss";
|
import eslintPluginBetterTailwindcss from "eslint-plugin-better-tailwindcss";
|
||||||
import simpleImportSortPlugin from "eslint-plugin-simple-import-sort";
|
import simpleImportSortPlugin from "eslint-plugin-simple-import-sort";
|
||||||
import globals from "globals";
|
import globals from "globals";
|
||||||
import tseslint from "typescript-eslint";
|
import tseslint from "typescript-eslint";
|
||||||
|
|
||||||
export default [
|
export default tseslint.config(
|
||||||
js.configs.recommended,
|
js.configs.recommended,
|
||||||
...tseslint.configs.recommended,
|
...tseslint.configs.recommended,
|
||||||
// ...tailwind.configs["flat/recommended"],
|
// ...tailwind.configs["flat/recommended"],
|
||||||
|
|
@ -15,7 +14,7 @@ export default [
|
||||||
"simple-import-sort": simpleImportSortPlugin,
|
"simple-import-sort": simpleImportSortPlugin,
|
||||||
"better-tailwindcss": eslintPluginBetterTailwindcss,
|
"better-tailwindcss": eslintPluginBetterTailwindcss,
|
||||||
},
|
},
|
||||||
ignores: ["**/node_modules/**"],
|
ignores: ["**/node_modules/**", "eslint.config.ts"],
|
||||||
languageOptions: {
|
languageOptions: {
|
||||||
parser: eslintParserTypeScript,
|
parser: eslintParserTypeScript,
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
|
|
@ -26,10 +25,9 @@ export default [
|
||||||
},
|
},
|
||||||
globals: {
|
globals: {
|
||||||
...globals.node,
|
...globals.node,
|
||||||
...globals.browser,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
files: ["**/*.{js,mjs,cjs,jsx,tsx,ts}"],
|
files: ["**/*.{tsx,ts}"],
|
||||||
settings: {
|
settings: {
|
||||||
"better-tailwindcss": {
|
"better-tailwindcss": {
|
||||||
entryPoint: "src/main.css",
|
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
|
"esModuleInterop": true
|
||||||
// "noImplicitReturns": 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