mirror of
https://github.com/C4illin/ConvertX.git
synced 2025-10-24 08:33:56 +00:00
chore: fix eslint config
This commit is contained in:
@@ -1,13 +1,19 @@
|
|||||||
|
import comments from "@eslint-community/eslint-plugin-eslint-comments/configs";
|
||||||
import { fixupPluginRules } from "@eslint/compat";
|
import { fixupPluginRules } from "@eslint/compat";
|
||||||
import tseslint from "typescript-eslint";
|
import js from "@eslint/js";
|
||||||
import eslint from "@eslint/js";
|
|
||||||
import deprecationPlugin from "eslint-plugin-deprecation";
|
import deprecationPlugin from "eslint-plugin-deprecation";
|
||||||
import importPlugin from "eslint-plugin-import";
|
import importPlugin from "eslint-plugin-import";
|
||||||
import simpleImportSortPlugin from "eslint-plugin-simple-import-sort";
|
import simpleImportSortPlugin from "eslint-plugin-simple-import-sort";
|
||||||
import tailwind from "eslint-plugin-tailwindcss";
|
import tailwind from "eslint-plugin-tailwindcss";
|
||||||
import comments from "@eslint-community/eslint-plugin-eslint-comments/configs"
|
import globals from "globals";
|
||||||
|
import tseslint from "typescript-eslint";
|
||||||
|
|
||||||
export default tseslint.config(
|
export default tseslint.config(
|
||||||
|
js.configs.recommended,
|
||||||
|
importPlugin.flatConfigs.recommended,
|
||||||
|
comments.recommended,
|
||||||
|
...tseslint.configs.recommended,
|
||||||
|
...tailwind.configs["flat/recommended"],
|
||||||
{
|
{
|
||||||
plugins: {
|
plugins: {
|
||||||
"@typescript-eslint": tseslint.plugin,
|
"@typescript-eslint": tseslint.plugin,
|
||||||
@@ -15,16 +21,7 @@ export default tseslint.config(
|
|||||||
import: fixupPluginRules(importPlugin),
|
import: fixupPluginRules(importPlugin),
|
||||||
"simple-import-sort": simpleImportSortPlugin,
|
"simple-import-sort": simpleImportSortPlugin,
|
||||||
},
|
},
|
||||||
},
|
|
||||||
{
|
|
||||||
ignores: ["**/node_modules/**", "**/public/**"],
|
ignores: ["**/node_modules/**", "**/public/**"],
|
||||||
},
|
|
||||||
eslint.configs.recommended,
|
|
||||||
comments.recommended,
|
|
||||||
...tseslint.configs.recommendedTypeChecked,
|
|
||||||
...tseslint.configs.stylisticTypeChecked,
|
|
||||||
...tailwind.configs["flat/recommended"],
|
|
||||||
{
|
|
||||||
languageOptions: {
|
languageOptions: {
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
projectService: true,
|
projectService: true,
|
||||||
@@ -33,15 +30,25 @@ export default tseslint.config(
|
|||||||
sourceType: "module",
|
sourceType: "module",
|
||||||
project: ["./tsconfig.json"],
|
project: ["./tsconfig.json"],
|
||||||
},
|
},
|
||||||
|
globals: {
|
||||||
|
...globals.node,
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
files: ["**/*.{js,mjs,cjs}"],
|
||||||
rules: {
|
rules: {
|
||||||
"tailwindcss/no-custom-classname": [
|
"tailwindcss/no-custom-classname": [
|
||||||
"error",
|
"error",
|
||||||
{
|
{
|
||||||
"config": "./tailwind.config.js",
|
config: "./tailwind.config.js",
|
||||||
"whitelist": ['select_container', 'convert_to_popup', 'convert_to_group', 'target', 'convert_to_target']
|
whitelist: [
|
||||||
}
|
"select_container",
|
||||||
|
"convert_to_popup",
|
||||||
|
"convert_to_group",
|
||||||
|
"target",
|
||||||
|
"convert_to_target",
|
||||||
],
|
],
|
||||||
}
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
"dev": "bun run --watch src/index.tsx",
|
"dev": "bun run --watch src/index.tsx",
|
||||||
"hot": "bun run --hot src/index.tsx",
|
"hot": "bun run --hot src/index.tsx",
|
||||||
"format": "biome format --write ./src",
|
"format": "biome format --write ./src",
|
||||||
"build": "postcss ./src/main.css -o ./src/public/style.css",
|
"build": "postcss ./src/main.css -o ./src/public/generated.css",
|
||||||
"lint": "run-p 'lint:*'",
|
"lint": "run-p 'lint:*'",
|
||||||
"lint:tsc": "tsc --noEmit",
|
"lint:tsc": "tsc --noEmit",
|
||||||
"lint:knip": "knip",
|
"lint:knip": "knip",
|
||||||
@@ -49,6 +49,7 @@
|
|||||||
"eslint-plugin-prettier": "^5.2.1",
|
"eslint-plugin-prettier": "^5.2.1",
|
||||||
"eslint-plugin-simple-import-sort": "^12.1.1",
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
||||||
"eslint-plugin-tailwindcss": "^3.17.4",
|
"eslint-plugin-tailwindcss": "^3.17.4",
|
||||||
|
"globals": "^15.9.0",
|
||||||
"knip": "^5.30.5",
|
"knip": "^5.30.5",
|
||||||
"npm-run-all2": "^6.2.3",
|
"npm-run-all2": "^6.2.3",
|
||||||
"postcss": "^8.4.47",
|
"postcss": "^8.4.47",
|
||||||
|
|||||||
Reference in New Issue
Block a user