Skip to content

Commit

Permalink
feat: use biome (#580)
Browse files Browse the repository at this point in the history
  • Loading branch information
martines3000 authored Mar 10, 2024
1 parent 1576193 commit 27a3671
Show file tree
Hide file tree
Showing 267 changed files with 4,689 additions and 5,273 deletions.
8 changes: 0 additions & 8 deletions .ci.prettierignore

This file was deleted.

111 changes: 0 additions & 111 deletions .eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
number-of-agents: 4
main-branch-name: 'develop'
init-commands: |
npx nx-cloud record -- pnpm exec prettier . --ignore-path .ci.prettierignore --check
npx nx-cloud record -- pnpm exec biome check --config-path configs .
parallel-commands-on-agents: |
pnpm exec nx run-many --target=lint --parallel=4
pnpm exec nx run-many --target=test:ci --parallel=4
Expand Down
5 changes: 0 additions & 5 deletions .prettierignore

This file was deleted.

35 changes: 0 additions & 35 deletions .prettierrc

This file was deleted.

19 changes: 17 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
{
"editor.defaultFormatter": "biomejs.biome",
"typescript.tsdk": "node_modules/typescript/lib",
"editor.formatOnSave": true,
"json.format.enable": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"editor.codeActionsOnSave": {
"source.fixAll": "always",
"source.organizeImports": "never"
}
}
82 changes: 82 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"$schema": "https://biomejs.dev/schemas/1.5.3/schema.json",
"files": {
"include": [
"**/*.js",
"**/*.ts",
"**/*.jsx",
"**/*.tsx",
"**/*.cjs",
"**/*.cts",
"**/*.mjs",
"**/*.mts",
"**/*.json"
],
"ignore": [
"**/node_modules/**",
"**/dist/**",
"**/build/**",
"**/coverage/**",
"**/.next/**",
"**/files/**",
"**/typia-generated/**",
"**/.docusaurus/**",
"**/out/**",
"patches/**",
"assets/**",
".nx/**",
"post-process.js"
]
},
"organizeImports": {
"enabled": false
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"complexity": {
"noStaticOnlyClass": "off",
"noForEach": "off"
},
"style": {
"noNonNullAssertion": "off"
},
"suspicious": {
"noExplicitAny": "off",
"noImplicitAnyLet": "off"
},
"security": {
"noDangerouslySetInnerHtml": "off"
},
"correctness": {
"useExhaustiveDependencies": "off"
},
"a11y": {
"useKeyWithClickEvents": "off"
}
}
},
"formatter": {
"enabled": true,
"indentStyle": "tab"
},
"javascript": {
"formatter": {
"indentStyle": "space",
"quoteStyle": "single",
"trailingComma": "es5",
"indentWidth": 2,
"lineEnding": "lf",
"semicolons": "always"
}
},
"json": {
"formatter": {
"enabled": true,
"indentWidth": 2,
"indentStyle": "space",
"lineEnding": "lf"
}
}
}
84 changes: 84 additions & 0 deletions configs/biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"$schema": "https://biomejs.dev/schemas/1.5.3/schema.json",
"files": {
"include": [
"**/*.js",
"**/*.ts",
"**/*.tsx",
"**/*.jsx",
"**/*.json",
"**/*.md",
"**/*.yml",
"**/*.yaml",
"**/*.html"
],
"ignore": [
"**/packages/**",
"**/libs/**",
"**/node_modules/**",
"**/dist/**",
"**/build/**",
"**/coverage/**",
"**/.next/**",
"**/files/**",
"**/typia-generated/**",
"**/.docusaurus/**",
"**/out/**",
"patches/**",
"assets/**",
".nx/**",
"post-process.js"
]
},
"organizeImports": {
"enabled": false
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"complexity": {
"noStaticOnlyClass": "off",
"noForEach": "off"
},
"style": {
"noNonNullAssertion": "off"
},
"suspicious": {
"noExplicitAny": "off",
"noImplicitAnyLet": "off"
},
"security": {
"noDangerouslySetInnerHtml": "off"
},
"correctness": {
"useExhaustiveDependencies": "off"
},
"a11y": {
"useKeyWithClickEvents": "off"
}
}
},
"formatter": {
"enabled": true,
"indentStyle": "tab"
},
"javascript": {
"formatter": {
"indentStyle": "space",
"quoteStyle": "single",
"trailingComma": "es5",
"indentWidth": 2,
"lineEnding": "lf",
"semicolons": "always"
}
},
"json": {
"formatter": {
"enabled": true,
"indentWidth": 2,
"indentStyle": "space",
"lineEnding": "lf"
}
}
}
9 changes: 0 additions & 9 deletions libs/did-provider-ebsi/.eslintrc.cjs

This file was deleted.

3 changes: 1 addition & 2 deletions libs/did-provider-ebsi/.lintstagedrc.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
module.exports = {
'*.{js,ts}': ['eslint --fix'],
'*.{md,json,yml,yaml}': ['prettier --write'],
'*.{js,ts,mts,mjs,cjs,cts,jsx,tsx,json}': ['biome check --apply'],
};
4 changes: 0 additions & 4 deletions libs/did-provider-ebsi/.prettierignore

This file was deleted.

Loading

0 comments on commit 27a3671

Please sign in to comment.