deploy linting and first unit test maybe

This commit is contained in:
2025-11-11 20:55:41 -08:00
parent 164c077682
commit 23ba726da6
3 changed files with 37 additions and 18 deletions

View File

@@ -1,18 +0,0 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.gitea', 'supabase', 'node_modules', '*.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}

35
eslint.config.js Normal file
View File

@@ -0,0 +1,35 @@
import globals from "globals";
import tseslint from "typescript-eslint";
import pluginReact from "eslint-plugin-react";
import pluginReactHooks from "eslint-plugin-react-hooks";
import pluginReactRefresh from "eslint-plugin-react-refresh";
export default tseslint.config(
{
// Global ignores
ignores: ["dist", ".gitea", "supabase", "node_modules", "*.cjs"],
},
{
// All files
files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"],
plugins: {
react: pluginReact,
"react-hooks": pluginReactHooks,
"react-refresh": pluginReactRefresh,
},
languageOptions: {
globals: {
...globals.browser,
...globals.es2020,
},
},
rules: {
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
},
},
// TypeScript files
...tseslint.configs.recommended,
);

View File

@@ -28,9 +28,11 @@
"@vitejs/plugin-react": "^5.1.0",
"@vitest/coverage-v8": "^4.0.8",
"autoprefixer": "^10.4.22",
"eslint-plugin-react": "^7.35.0",
"eslint": "^9.39.1",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-react-refresh": "^0.4.24",
"globals": "^15.9.0",
"jsdom": "^27.1.0",
"postcss": "^8.5.6",
"tailwindcss": "^4.1.17",