Files
ConvertX/eslint.config.ts
T

79 lines
1.8 KiB
TypeScript
Raw Normal View History

2025-06-03 19:19:28 +02:00
import js from "@eslint/js";
import eslintPluginBetterTailwindcss from "eslint-plugin-better-tailwindcss";
2026-01-30 19:10:03 +01:00
import { defineConfig } from "eslint/config";
2025-06-03 19:19:28 +02:00
import globals from "globals";
2026-01-30 19:10:03 +01:00
import tseslint, { parser as eslintParserTypeScript } from "typescript-eslint";
2025-11-15 20:15:02 +01:00
2026-01-30 19:10:03 +01:00
export default defineConfig(
2025-11-15 20:15:02 +01:00
{
2026-01-30 19:10:03 +01:00
ignores: ["**/node_modules/**", "dist/**"],
2025-11-15 20:15:02 +01:00
},
2025-06-03 19:19:28 +02:00
js.configs.recommended,
2025-08-13 20:51:41 +02:00
tseslint.configs.recommended,
2025-06-03 19:19:28 +02:00
{
2026-01-30 19:10:03 +01:00
files: ["**/*.{ts,tsx,cts,mts}"],
extends: [
eslintPluginBetterTailwindcss.configs.recommended,
eslintPluginBetterTailwindcss.configs.stylistic,
],
2025-06-03 19:19:28 +02:00
languageOptions: {
parser: eslintParserTypeScript,
parserOptions: {
2025-11-15 20:15:02 +01:00
project: "./tsconfig.eslint.json",
2026-08-04 22:02:26 +02:00
tsconfigRootDir: import.meta.dirname,
2025-06-03 19:19:28 +02:00
},
globals: {
...globals.node,
},
},
settings: {
"better-tailwindcss": {
entryPoint: "src/main.css",
},
},
rules: {
2025-08-13 20:51:41 +02:00
"better-tailwindcss/enforce-consistent-line-wrapping": [
2025-06-03 19:19:28 +02:00
"warn",
{
group: "newLine",
printWidth: 100,
},
],
"better-tailwindcss/no-unknown-classes": [
2025-06-03 19:19:28 +02:00
"warn",
{
ignore: [
"^group(?:\\/(\\S*))?$",
"^peer(?:\\/(\\S*))?$",
"select_container",
"convert_to_popup",
"convert_to_group",
"target",
"convert_to_target",
"job-details-toggle",
],
},
],
},
},
2026-01-30 19:10:03 +01:00
{
files: ["**/*.{jsx,tsx}"],
languageOptions: {
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
},
2025-08-08 01:02:20 +02:00
{
files: ["**/*.{js,cjs,mjs,jsx}"],
extends: [tseslint.configs.disableTypeChecked],
languageOptions: {
globals: {
...globals.browser,
},
},
},
);