Some checks failed
✅ Check / 🔬 ESLint (push) Failing after 21s
✅ Check / 🏷️ Typecheck (push) Failing after 11s
✅ Check / 🔎 Test (push) Failing after 11s
✅ Check / e2e-test (push) Failing after 11s
✅ Check / 🔨 Build (push) Failing after 11s
🚀 Deploy / 🚀 Deploy (doc) (push) Failing after 12s
🚀 Deploy / 🚀 Deploy (demo) (push) Failing after 12s
🚀 Deploy / 🚀 Deploy (supabase) (push) Failing after 18s
78 lines
2.1 KiB
JavaScript
78 lines
2.1 KiB
JavaScript
// For more info, see https://github.com/storybookjs/eslint-plugin-storybook#configuration-flat-config-format
|
|
import storybook from "eslint-plugin-storybook";
|
|
|
|
import js from "@eslint/js";
|
|
import reactHooks from "eslint-plugin-react-hooks";
|
|
import reactRefresh from "eslint-plugin-react-refresh";
|
|
import globals from "globals";
|
|
import tseslint from "typescript-eslint";
|
|
|
|
export default tseslint.config(
|
|
{ ignores: ["dist"] },
|
|
{
|
|
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
|
files: ["**/*.{ts,tsx,mjs}"],
|
|
ignores: ["**/node_modules/**", "**/dist/**", "**/.astro/**"],
|
|
languageOptions: {
|
|
ecmaVersion: 2020,
|
|
},
|
|
plugins: {
|
|
"react-hooks": reactHooks,
|
|
"react-refresh": reactRefresh,
|
|
},
|
|
rules: {
|
|
...reactHooks.configs.recommended.rules,
|
|
"react-refresh/only-export-components": [
|
|
"warn",
|
|
{ allowConstantExport: true },
|
|
],
|
|
"@typescript-eslint/no-unused-vars": [
|
|
"error",
|
|
{
|
|
varsIgnorePattern: "^_",
|
|
argsIgnorePattern: "^_",
|
|
},
|
|
],
|
|
"no-console": ["error", { allow: ["warn", "error"] }],
|
|
"@typescript-eslint/no-explicit-any": "off",
|
|
"@typescript-eslint/consistent-type-imports": "warn",
|
|
},
|
|
},
|
|
{
|
|
files: ["**/*.{ts,tsx}"],
|
|
languageOptions: {
|
|
globals: globals.browser,
|
|
},
|
|
},
|
|
{
|
|
// Node scripts and Claude Code hooks. TypeScript files rely on the
|
|
// compiler for undefined identifiers; plain JS needs no-undef back on.
|
|
files: ["**/*.mjs"],
|
|
languageOptions: {
|
|
globals: globals.node,
|
|
},
|
|
rules: {
|
|
"no-undef": "error",
|
|
},
|
|
},
|
|
{
|
|
files: [
|
|
"src/components/admin/*.{ts,tsx}",
|
|
"src/hooks/*.{ts,tsx}",
|
|
"src/lib/*.{ts,tsx}",
|
|
],
|
|
rules: {
|
|
"@typescript-eslint/no-explicit-any": "error",
|
|
"@typescript-eslint/consistent-type-imports": "off",
|
|
},
|
|
},
|
|
{
|
|
files: ["src/components/ui/*.{ts,tsx}"],
|
|
rules: {
|
|
"react-refresh/only-export-components": "off",
|
|
"@typescript-eslint/consistent-type-imports": "off",
|
|
},
|
|
},
|
|
storybook.configs["flat/recommended"],
|
|
);
|