mirror of
https://github.com/trailbaseio/trailbase
synced 2026-04-21 21:47:55 +00:00
Everything else is still on Tailwind v3, since we depend on solid-ui, which doesn't yet support v4: https://github.com/stefan-karger/solid-ui/issues/166#issuecomment-2822360321, however this way we can build some familiarity with the new system. Sadly, the tailwind eslint plugin had to be disabled because it doesn't support v4 and the v4 alpha is completely disfunct: https://github.com/francoismassart/eslint-plugin-tailwindcss/issues/325.
52 lines
1.5 KiB
JavaScript
52 lines
1.5 KiB
JavaScript
import globals from "globals";
|
|
|
|
import jsPlugin from "@eslint/js";
|
|
import tsPlugin from "typescript-eslint";
|
|
import tailwindPlugin from "eslint-plugin-tailwindcss";
|
|
import solidPlugin from "eslint-plugin-solid/configs/recommended";
|
|
import astroPlugin from "eslint-plugin-astro";
|
|
|
|
console.info(
|
|
"TODO: Tailwind v4 eslint missing (https://github.com/francoismassart/eslint-plugin-tailwindcss/issues/325): ",
|
|
Object.keys(tailwindPlugin),
|
|
);
|
|
|
|
export default [
|
|
{
|
|
ignores: ["dist/", "node_modules/", ".astro/", "src/env.d.ts"],
|
|
},
|
|
jsPlugin.configs.recommended,
|
|
...tsPlugin.configs.recommended,
|
|
// tailwindPlugin.configs["flat/recommended"],
|
|
...astroPlugin.configs.recommended,
|
|
{
|
|
files: ["**/*.{js,jsx,ts,tsx}"],
|
|
...solidPlugin,
|
|
},
|
|
{
|
|
files: ["**/*.{js,mjs,cjs,mts,ts,tsx,jsx,astro}"],
|
|
rules: {
|
|
// https://typescript-eslint.io/rules/no-explicit-any/
|
|
"@typescript-eslint/no-explicit-any": "warn",
|
|
"@typescript-eslint/no-wrapper-object-types": "warn",
|
|
// http://eslint.org/docs/rules/no-unused-vars
|
|
"@typescript-eslint/no-unused-vars": [
|
|
"error",
|
|
{
|
|
vars: "all",
|
|
args: "after-used",
|
|
argsIgnorePattern: "^_",
|
|
varsIgnorePattern: "^_",
|
|
},
|
|
],
|
|
// Collides with astro, we'd have to configure the solid plugin to ignore astro files.
|
|
"solid/no-unknown-namespaces": "off",
|
|
},
|
|
languageOptions: { globals: globals.browser },
|
|
settings: {
|
|
tailwindcss: {
|
|
whitelist: ["hide-scrollbars", "collapsible.*"],
|
|
},
|
|
},
|
|
},
|
|
];
|