Browse Source

♻️ Replace ESLint and Prettier with Biome to format and lint frontend (#719)

Co-authored-by: User <alejsdev@gmail.com>
Co-authored-by: Alejandra <90076947+alejsdev@users.noreply.github.com>
pull/13907/head
Santiago Gandolfo 1 year ago
committed by GitHub
parent
commit
43435d50dd
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 18
      frontend/.eslintrc.cjs
  2. 1
      frontend/.prettierignore
  3. 8
      frontend/.prettierrc
  4. 31
      frontend/biome.json
  5. 2700
      frontend/package-lock.json
  6. 10
      frontend/package.json

18
frontend/.eslintrc.cjs

@ -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', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}

1
frontend/.prettierignore

@ -1 +0,0 @@
src/client/

8
frontend/.prettierrc

@ -1,8 +0,0 @@
{
"bracketSpacing": true,
"semi": false,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 80,
"tabWidth": 2
}

31
frontend/biome.json

@ -0,0 +1,31 @@
{
"$schema": "https://biomejs.dev/schemas/1.6.1/schema.json",
"organizeImports": {
"enabled": true
},
"files": {
"ignore": ["node_modules", "src/client/"]
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"suspicious": {
"noExplicitAny": "off",
"noArrayIndexKey": "off"
},
"style": {
"noNonNullAssertion": "off"
}
}
},
"formatter": {
"indentStyle": "space"
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "asNeeded"
}
}
}

2700
frontend/package-lock.json

File diff suppressed because it is too large

10
frontend/package.json

@ -6,8 +6,7 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint ./src --ext .ts,.tsx --fix",
"format": "prettier --write ./src/**/*.{ts,tsx,js,jsx,json,md} --ignore-path .prettierignore",
"lint": "biome check --apply-unsafe --no-errors-on-unmatched --files-ignore-unknown=true ./",
"preview": "vite preview",
"generate-client": "openapi --input ./openapi.json --useOptions --useUnionTypes --output ./src/client --client axios --exportSchemas true"
},
@ -28,19 +27,14 @@
"zustand": "4.5.0"
},
"devDependencies": {
"@biomejs/biome": "1.6.1",
"@tanstack/router-devtools": "1.19.1",
"@tanstack/router-vite-plugin": "1.19.0",
"@types/node": "20.10.5",
"@types/react": "^18.2.37",
"@types/react-dom": "^18.2.15",
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"@vitejs/plugin-react-swc": "^3.5.0",
"eslint": "^8.53.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.4",
"openapi-typescript-codegen": "0.25.0",
"prettier": "3.2.5",
"typescript": "^5.2.2",
"vite": "^5.0.12"
}

Loading…
Cancel
Save