Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ jobs:
node-version: "20"
cache: "npm"
- run: npm ci
- run: npx prettier --check .
- run: npx biome format .
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# Add PATH setup to ensure npx is found
export PATH="/usr/local/bin:$HOME/.npm-global/bin:$HOME/.nvm/versions/node/$(node -v)/bin:$PATH"

Expand Down
1 change: 0 additions & 1 deletion .prettierignore

This file was deleted.

17 changes: 0 additions & 17 deletions .prettierrc

This file was deleted.

49 changes: 49 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"$schema": "https://biomejs.dev/schemas/2.2.2/schema.json",
"assist": {
"actions": {
"source": {
"organizeImports": "on"
}
},
"enabled": true
},
"files": {
"ignoreUnknown": true
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2
},
"javascript": {
"formatter": {
"quoteStyle": "double"
}
},
"linter": {
"enabled": false
},
"overrides": [
{
"assist": {
"actions": {
"source": {
"useSortedKeys": "on"
}
}
},
"includes": [
"eslint-plugin-local/**/*.{js,ts,jsx,tsx}",
"src/**/*.{js,ts,jsx,tsx}",
"**/*.test.{js,ts,jsx,tsx}",
"tests/**/*.{js,ts,jsx,tsx}"
]
}
],
"vcs": {
"clientKind": "git",
"enabled": true,
"useIgnoreFile": true
}
}
72 changes: 31 additions & 41 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import eslintConfigPrettier from "eslint-config-prettier/flat";
import eslintPluginLocal from "./eslint-plugin-local/plugin.js";
import path from "node:path";
import { fileURLToPath } from "node:url";
import globals from "globals";
import { includeIgnoreFile } from "@eslint/compat";
import jest from "eslint-plugin-jest";
import path from "node:path";
import pluginJs from "@eslint/js";
import stylistic from "@stylistic/eslint-plugin";
import jest from "eslint-plugin-jest";
import globals from "globals";
import tseslint from "typescript-eslint";
import eslintPluginLocal from "./eslint-plugin-local/plugin.js";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand All @@ -21,7 +20,6 @@ export default [
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
eslintConfigPrettier,
{
languageOptions: {
parserOptions: {
Expand Down Expand Up @@ -55,7 +53,6 @@ export default [
rules: {
// Enable rules
"@stylistic/quotes": ["error", "double", { avoidEscape: true }],
"@stylistic/indent": ["error", 2],
"@stylistic/semi": "error",
"@stylistic/space-infix-ops": "error",
"@stylistic/type-annotation-spacing": [
Expand All @@ -71,10 +68,7 @@ export default [
},
],
"@stylistic/eol-last": "error",
"@typescript-eslint/consistent-type-definitions": [
"error",
"type",
],
"@typescript-eslint/consistent-type-definitions": ["error", "type"],
"@typescript-eslint/no-duplicate-enum-values": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-inferrable-types": "error",
Expand All @@ -88,9 +82,7 @@ export default [
"@typescript-eslint/prefer-literal-enum-member": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-readonly": "error",
"eqeqeq": "error",
"indent": "off", // @stylistic/indent
"sort-keys": "error",
eqeqeq: "error",
"@typescript-eslint/no-unsafe-argument": "error",
"@typescript-eslint/no-unsafe-assignment": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
Expand All @@ -107,30 +99,41 @@ export default [
"function-call-argument-newline": ["error", "consistent"],
"max-depth": ["error", { max: 5 }],
"max-len": ["error", { code: 120 }],
"max-lines": ["error", { max: 677, skipBlankLines: true, skipComments: true }],
"max-lines": [
"error",
{ max: 677, skipBlankLines: true, skipComments: true },
],
"max-lines-per-function": ["error", { max: 561 }],
"no-loss-of-precision": "error",
"no-multi-spaces": "error",
"no-multiple-empty-lines": ["error", { max: 1, maxEOF: 0 }],
"no-trailing-spaces": "error",
"object-curly-newline": ["error", { multiline: true, consistent: true }],
"object-curly-spacing": ["error", "always"],
"object-property-newline": ["error", { allowAllPropertiesOnSameLine: true }],
"object-property-newline": [
"error",
{ allowAllPropertiesOnSameLine: true },
],
"object-shorthand": ["error", "always"],
"no-undef": "error",
"no-unused-vars": "off", // @typescript-eslint/no-unused-vars
"prefer-destructuring": ["error", {
array: false,
object: true,
}],
"quote-props": ["error", "consistent-as-needed"],
"sort-imports": "error",
"prefer-destructuring": [
"error",
{
array: false,
object: true,
},
],
"quote-props": ["error", "as-needed"],
"space-before-blocks": ["error", "always"],
"space-before-function-paren": ["error", {
anonymous: "always",
named: "never",
asyncArrow: "always",
}],
"space-before-function-paren": [
"error",
{
anonymous: "always",
named: "never",
asyncArrow: "always",
},
],
"space-infix-ops": "off",
},
},
Expand All @@ -149,7 +152,6 @@ export default [
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"max-len": "off",
"sort-keys": "off",
},
},
{
Expand All @@ -158,22 +160,10 @@ export default [
...globals.jest,
},
},
files: [
"**/*.test.{js,ts,jsx,tsx}",
"tests/**/*.{js,ts,jsx,tsx}",
],
files: ["**/*.test.{js,ts,jsx,tsx}", "tests/**/*.{js,ts,jsx,tsx}"],
plugins: ["jest"],
...jest.configs["flat/style"],
},
{
files: [
"src/client/**/*.{js,ts,jsx,tsx}",
],
rules: {
// Disabled rules for frontend
"sort-keys": "off",
},
},
{
plugins: {
local: eslintPluginLocal,
Expand Down
Loading
Loading