Upload frontend/eslint.config.js with huggingface_hub
Browse files- frontend/eslint.config.js +40 -0
frontend/eslint.config.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import js from "@eslint/js";
|
| 2 |
+
import eslintPluginPrettier from "eslint-plugin-prettier/recommended";
|
| 3 |
+
import globals from "globals";
|
| 4 |
+
import reactHooks from "eslint-plugin-react-hooks";
|
| 5 |
+
import reactRefresh from "eslint-plugin-react-refresh";
|
| 6 |
+
import tseslint from "typescript-eslint";
|
| 7 |
+
|
| 8 |
+
export default tseslint.config(
|
| 9 |
+
{ ignores: ["dist", ".output", ".vinxi"] },
|
| 10 |
+
{
|
| 11 |
+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
| 12 |
+
files: ["**/*.{ts,tsx}"],
|
| 13 |
+
languageOptions: {
|
| 14 |
+
ecmaVersion: 2020,
|
| 15 |
+
globals: globals.browser,
|
| 16 |
+
},
|
| 17 |
+
plugins: {
|
| 18 |
+
"react-hooks": reactHooks,
|
| 19 |
+
"react-refresh": reactRefresh,
|
| 20 |
+
},
|
| 21 |
+
rules: {
|
| 22 |
+
...reactHooks.configs.recommended.rules,
|
| 23 |
+
"no-restricted-imports": [
|
| 24 |
+
"error",
|
| 25 |
+
{
|
| 26 |
+
paths: [
|
| 27 |
+
{
|
| 28 |
+
name: "server-only",
|
| 29 |
+
message:
|
| 30 |
+
"TanStack Start does not use the Next.js `server-only` package. Rename the module to `*.server.ts` or mark it with `@tanstack/react-start/server-only`.",
|
| 31 |
+
},
|
| 32 |
+
],
|
| 33 |
+
},
|
| 34 |
+
],
|
| 35 |
+
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
|
| 36 |
+
"@typescript-eslint/no-unused-vars": "off",
|
| 37 |
+
},
|
| 38 |
+
},
|
| 39 |
+
eslintPluginPrettier,
|
| 40 |
+
);
|