diff --git a/.biomeignore b/.biomeignore new file mode 100644 index 0000000..fbb90ad --- /dev/null +++ b/.biomeignore @@ -0,0 +1,7 @@ +dist +**/vendor/** +**/locales/** +generated.* +node_modules +*.min.js +*.min.css \ No newline at end of file diff --git a/biome.json b/biome.json new file mode 100644 index 0000000..361107f --- /dev/null +++ b/biome.json @@ -0,0 +1,59 @@ +{ + "$schema": "https://biomejs.dev/schemas/2.0.0/schema.json", + "files": { + "ignoreUnknown": true + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true, + "style": { + "noUselessElse": "error", + "useConst": "warn", + "useImportType": "off", + "useNodejsImportProtocol": "off" + }, + "suspicious": { + "noConsole": "error", + "noRedeclare": "off", + "noDoubleEquals": "warn", + "noExplicitAny": "off" + }, + "correctness": { + "noUndeclaredVariables": "off", + "useExhaustiveDependencies": "off", + "noUnusedImports": "warn" + }, + "complexity": { + "noExtraBooleanCast": "warn", + "noBannedTypes": "off" + } + } + }, + "formatter": { + "enabled": true, + "formatWithErrors": false, + "indentStyle": "space", + "indentWidth": 2, + "lineWidth": 100 + }, + "javascript": { + "parser": { + "unsafeParameterDecoratorsEnabled": true + }, + "formatter": { + "quoteStyle": "single", + "jsxQuoteStyle": "double", + "semicolons": "asNeeded", + "trailingCommas": "all", + "arrowParentheses": "asNeeded" + } + }, + "json": { + "formatter": { + "enabled": true, + "indentStyle": "space", + "indentWidth": 2 + } + } +} diff --git a/eslint.config.cjs b/eslint.config.cjs deleted file mode 100644 index b1e9cb6..0000000 --- a/eslint.config.cjs +++ /dev/null @@ -1,54 +0,0 @@ -module.exports = { - settings: { - react: { - version: 'detect', - }, - }, - root: true, - env: { browser: true, es2020: true }, - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:react/recommended', - 'plugin:react-hooks/recommended', - 'plugin:react/jsx-runtime', - ], - ignorePatterns: ['dist', '.eslintrc.cjs', '**/vendor/**', '**/locales/**', 'generated.*'], - parser: '@typescript-eslint/parser', - parserOptions: { - project: true, - tsconfigRootDir: __dirname, - ecmaFeatures: { - jsx: true, - }, - }, - plugins: ['react-refresh', 'react'], - rules: { - 'no-extra-semi': 'off', // this one needs to stay off - '@react/no-children-prop': 'off', // tanstack form uses this as a pattern - 'react/no-children-prop': 'off', // tanstack form uses this as a pattern - 'no-duplicate-imports': 'warn', - '@typescript-eslint/no-extra-semi': 'off', - 'sort-imports': 'off', - 'react-hooks/exhaustive-deps': 'off', - 'react-refresh/only-export-components': 'off', - 'no-case-declarations': 'off', - 'no-redeclare': 'off', - 'no-undef': 'off', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/strict-boolean-expressions': ['error', { - "allowString": true, - "allowNumber": true, - "allowNullableObject": true, - "allowNullableBoolean": true, - "allowNullableString": true, - "allowNullableNumber": false, - "allowNullableEnum": true, - "allowAny": true - }], - 'react/prop-types': 'off', - 'no-lonely-if': 2, - 'no-console': 2, - }, -} - diff --git a/package.json b/package.json index ff2b2f0..702ce97 100644 --- a/package.json +++ b/package.json @@ -2,31 +2,29 @@ "name": "lifeto-shop", "private": true, "version": "0.0.0", + "type": "module", "scripts": { "dev": "vite", "build": "vite build", - "preview": "vite preview" + "preview": "vite preview", + "lint": "biome check .", + "lint:fix": "biome check --write .", + "format": "biome format --write ." }, "dependencies": { "@floating-ui/react": "^0.27.8", "@handsontable/react": "^15.3.0", "@mantine/hooks": "^8.0.0", + "@tailwindcss/vite": "^4.1.10", "@tanstack/react-query": "^5.76.0", "@tanstack/react-table": "^8.21.3", "@types/qs": "^6.9.18", "@types/react": "^19.1.4", "@types/react-dom": "^19.1.5", "@types/uuid": "^10.0.0", - "@typescript-eslint/eslint-plugin": "^8.32.1", - "@typescript-eslint/parser": "^8.32.1", "@vitejs/plugin-react": "^4.4.1", "arktype": "^2.1.20", "axios": "^1.9.0", - "eslint": "^9.26.0", - "eslint-config-react-app": "^7.0.1", - "eslint-plugin-react": "^7.37.5", - "eslint-plugin-react-hooks": "^5.2.0", - "eslint-plugin-react-refresh": "^0.4.20", "fuse.js": "^7.1.0", "handsontable": "^15.3.0", "jotai": "^2.12.4", @@ -49,6 +47,7 @@ "uuid": "^11.1.0" }, "devDependencies": { + "@biomejs/biome": "^2.0.0", "@tailwindcss/postcss": "^4.1.6", "@types/node": "^22.15.18", "postcss": "^8.5.3", diff --git a/postcss.config.cjs b/postcss.config.cjs deleted file mode 100644 index 52b9b4b..0000000 --- a/postcss.config.cjs +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - plugins: { - '@tailwindcss/postcss': {}, - }, -} diff --git a/public/cursor.png b/public/assets/cursor.png similarity index 100% rename from public/cursor.png rename to public/assets/cursor.png diff --git a/src/App.tsx b/src/App.tsx index 97b8bdb..da3fb07 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,23 +1,23 @@ -import { FC } from "react"; -import { LoginWidget } from "./components/login"; -import { CharacterRoulette } from "./components/characters"; -import { Inventory } from "./components/inventory/index"; +import { FC } from 'react' +import { CharacterRoulette } from './components/characters' +import { Inventory } from './components/inventory/index' +import { LoginWidget } from './components/login' export const App: FC = () => { return ( <>
- :
-
+ ) : (
+