Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve setup & CI config #6

Merged
merged 16 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = tab
insert_final_newline = true
max_line_length = 100
trim_trailing_whitespace = true

[*.json]
indent_style = space

[*.{yaml,yml}]
indent_style = space
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ jobs:
cache: 'npm'
- run: npm ci
- run: node --run lint
- run: node --run format
- run: node --run type-check

tests:
Expand Down
11 changes: 8 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "biomejs.biome",
"javascript.updateImportsOnFileMove.enabled": "always",
"typescript.updateImportsOnFileMove.enabled": "always"
}
"typescript.updateImportsOnFileMove.enabled": "always",
"editor.formatOnPaste": true,
"editor.wordWrap": "wordWrapColumn",
"editor.wordWrapColumn": 100,
"[markdown]": {
"editor.wordWrap": "off"
}
}
12 changes: 7 additions & 5 deletions biome.jsonc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we set options for use-block-statements? (I think we should use "multi")

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I think we should use "multi")

It's sad but I don't see support for an equivalent to multi. But I don't find it a problem personally, because I think it's fine to force the {...} block whatever the condition.

Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
"**/*.snap.cjs"
]
},
"formatter": {
"indentStyle": "tab",
"lineWidth": 100
},
// "formatter": {
// "indentStyle": "tab",
// "lineWidth": 100,
// "useEditorconfig": true
// },
JakobJingleheimer marked this conversation as resolved.
Show resolved Hide resolved
"organizeImports": {
"enabled": false
},
Expand Down Expand Up @@ -57,7 +58,8 @@
},
"json": {
"formatter": {
"enabled": false
"enabled": true,
"indentStyle": "space"
}
},
// VSC specific settings
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
"version": "1.0.0",
"description": "A collection of migration recipes for userland code.",
"scripts": {
"format:fix": "biome format --fix ./",
"format": "biome format ./",
"lint:fix": "biome lint --fix ./",
"lint": "biome lint ./",
"pre-commit": "node --run lint:fix; node --run format:fix; node --run type-check; node --run test",
"pre-commit": "node --run lint:fix; node --run type-check; node --run test",
"test": "npm run test --workspaces -- --no-warnings --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout",
"type-check": "tsc"
},
Expand Down
Loading