Skip to content

Commit

Permalink
feat(lint): eslint to biome (#635)
Browse files Browse the repository at this point in the history
* drop eslint

* remove eslintrc

* drop prettier dep

* drop vscode extensions

* feat: add biome

* feat: ci

* feat: last biome

* fix: missing extensions

* more linting

* feat(lint): more linting + tabs in vscode config
  • Loading branch information
gjuchault authored Jan 30, 2024
1 parent 9ddb820 commit e59d0a4
Show file tree
Hide file tree
Showing 24 changed files with 12,786 additions and 12,723 deletions.
42 changes: 21 additions & 21 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"version": "0.2",
"language": "en",
"words": [
"degit",
"esbuild",
"gjuchault",
"octocat",
"outdir",
"rmrf",
"ryansonshine",
"socio",
"tsdoc"
],
"flagWords": [],
"ignorePaths": [
"package.json",
"package-lock.json",
"yarn.lock",
"tsconfig.json",
"node_modules/**"
]
"version": "0.2",
"language": "en",
"words": [
"degit",
"esbuild",
"gjuchault",
"octocat",
"outdir",
"rmrf",
"ryansonshine",
"socio",
"tsdoc"
],
"flagWords": [],
"ignorePaths": [
"package.json",
"package-lock.json",
"yarn.lock",
"tsconfig.json",
"node_modules/**"
]
}
3 changes: 0 additions & 3 deletions .czrc

This file was deleted.

39 changes: 0 additions & 39 deletions .eslintrc.json

This file was deleted.

20 changes: 3 additions & 17 deletions .github/workflows/typescript-library-starter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- run: npm ci

lint:
name: ⬣ ESLint
name: 🔬 Lint & Format
runs-on: ubuntu-latest
needs: [dependencies]
steps:
Expand All @@ -28,7 +28,7 @@ jobs:
node-version-file: package.json
cache: "npm"
- run: npm ci
- name: ⬣ ESLint
- name: 🔬 Lint & Format
run: npm run lint:check

audit:
Expand All @@ -44,20 +44,6 @@ jobs:
- name: 🛡️ Audit
run: npm audit --audit-level=high

format:
name: 🔬 Format
runs-on: ubuntu-latest
needs: [dependencies]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: "npm"
- run: npm ci
- name: 🔬 Format
run: npm run format:check

spell:
name: 🈸 Spellcheck
runs-on: ubuntu-latest
Expand Down Expand Up @@ -116,7 +102,7 @@ jobs:

build-and-release:
name: 🚀 Build & release
needs: [lint, audit, format, spell, type, test, test-setup]
needs: [lint, audit, spell, type, test, test-setup]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
58 changes: 29 additions & 29 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
{
"branches": [
"+([0-9])?(.{+([0-9]),x}).x",
"main",
"master",
"next",
"next-major",
{
"name": "beta",
"prerelease": true
},
{
"name": "alpha",
"prerelease": true
}
],
"repositoryUrl": "https://github.com/gjuchault/typescript-library-starter.git",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
[
"@semantic-release/github",
{
"successComment": false,
"failTitle": false
}
]
]
"branches": [
"+([0-9])?(.{+([0-9]),x}).x",
"main",
"master",
"next",
"next-major",
{
"name": "beta",
"prerelease": true
},
{
"name": "alpha",
"prerelease": true
}
],
"repositoryUrl": "https://github.com/gjuchault/typescript-library-starter.git",
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
[
"@semantic-release/github",
{
"successComment": false,
"failTitle": false
}
]
]
}
11 changes: 5 additions & 6 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"eamodio.gitlens",
"streetsidesoftware.code-spell-checker"
]
"recommendations": [
"biomejs.biome",
"eamodio.gitlens",
"streetsidesoftware.code-spell-checker"
]
}
37 changes: 18 additions & 19 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug Current Test File",
"autoAttachChildProcesses": true,
"skipFiles": ["<node_internals>/**", "**/node_modules/**"],
"program": "${relativeFile}",
"runtimeArgs": [
"--import=@nitrogql/esbuild-register",
"--inspect",
"--test"
],
"smartStep": true,
"console": "integratedTerminal"
}
]
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug Current Test File",
"autoAttachChildProcesses": true,
"skipFiles": ["<node_internals>/**", "**/node_modules/**"],
"program": "${relativeFile}",
"runtimeArgs": [
"--import=@nitrogql/esbuild-register",
"--inspect",
"--test"
],
"smartStep": true,
"console": "integratedTerminal"
}
]
}
37 changes: 30 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,32 @@
{
// only use words from .cspell.json
"cSpell.userWords": [],
"cSpell.enabled": true,
"editor.formatOnSave": true,
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"files.associations": { "*.json": "jsonc" }
"cSpell.userWords": [],
"cSpell.enabled": true,
"editor.formatOnSave": true,
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"files.associations": { "*.json": "jsonc" },
"editor.indentSize": 2,
"editor.insertSpaces": false,
"editor.detectIndentation": false,
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[javascriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[jsonc]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[jsonl]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
44 changes: 22 additions & 22 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Run Current Test File",
"type": "shell",
"command": "node",
"args": [
"--import=@nitrogql/esbuild-register",
"--test",
"${relativeFile}"
],
"presentation": {
"clear": true,
"showReuseMessage": false,
"echo": false
},
"group": {
"kind": "test",
"isDefault": true
}
}
]
"version": "2.0.0",
"tasks": [
{
"label": "Run Current Test File",
"type": "shell",
"command": "node",
"args": [
"--import=@nitrogql/esbuild-register",
"--test",
"${relativeFile}"
],
"presentation": {
"clear": true,
"showReuseMessage": false,
"echo": false
},
"group": {
"kind": "test",
"isDefault": true
}
}
]
}
22 changes: 11 additions & 11 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down Expand Up @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand Down
Loading

0 comments on commit e59d0a4

Please sign in to comment.