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: add/configure code style toolchain #17

Merged
merged 29 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3a7c842
chore: add/configure formatter
helmturner Feb 16, 2024
06525d5
style: format
helmturner Feb 16, 2024
5c79cc4
chore: revert to whole-file format on save
helmturner Feb 16, 2024
f910763
Revert "style: format"
helmturner Feb 20, 2024
26a6ac3
chore: pin dependencies
helmturner Feb 20, 2024
47734ca
chore: add TS style guide
helmturner Feb 20, 2024
98d5d90
chore: add explicit typescript dependency
helmturner Feb 21, 2024
af862c8
chore: allow comments in tsconfig
helmturner Feb 21, 2024
c5c0976
style: make tsconfig slightly more strict
helmturner Feb 21, 2024
c1c2197
chore: customize TYPESCRIPT.md
helmturner Feb 21, 2024
c4fb4fc
style: udpate prettier to use tabs, single quotes
helmturner Feb 21, 2024
0935930
chore: cleanup prettier config
helmturner Feb 21, 2024
7acb958
style: enable type acquisition
helmturner Feb 21, 2024
e951191
chore: remove temp comments
helmturner Feb 21, 2024
4df590f
Merge branch 'chore/with-formatting' into style/typescript
helmturner Feb 21, 2024
66b26f2
chore: consolidate toolchain related branches
helmturner Feb 21, 2024
7aa5c48
chore: fix typos in tsconfig/settings.json
helmturner Feb 21, 2024
3abf020
chore: add linter dependencies
helmturner Feb 21, 2024
e8b6fe9
chore: configure eslint for unicorn/airbnb
helmturner Feb 21, 2024
55e9641
chore: force using npm as package manager
helmturner Feb 21, 2024
fdae600
chore: revert to spaces over tabs
helmturner Feb 22, 2024
3abd727
chore: add eslint extension to recommendations
helmturner Feb 22, 2024
60fada2
chore: fix type errors, refine tsconfig
helmturner Feb 22, 2024
6577df3
chore: add eslint script
helmturner Feb 22, 2024
d0b9176
chore: exclude node_modules from type checking
helmturner Feb 22, 2024
a375419
chore: add unicorn, fix lint config + eslint types
helmturner Feb 22, 2024
b082e08
chore: refine eslint config, fix errors
helmturner Feb 22, 2024
d5cfccc
chore: pin deps
helmturner Feb 22, 2024
518a099
chore: update workspace recommendations
helmturner Feb 22, 2024
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
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
; https://editorconfig.org/
; https://prettier.io/docs/en/configuration.html#editorconfig
[*]
root = true
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
7 changes: 6 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"recommendations": ["astro-build.astro-vscode"],
"recommendations": [
"astro-build.astro-vscode",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"mattpocock.ts-error-translator"
],
"unwantedRecommendations": []
}
47 changes: 47 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"javascript.preferences.renameMatchingJsxTags": true,
"typescript.preferences.renameMatchingJsxTags": true,
"editor.linkedEditing": true,
"files.associations": {
"tsconfig.json": "jsonc"
},
/*
Linting with ESLint
*/
"eslint.experimental.useFlatConfig": true,
"eslint.codeActionsOnSave.mode": "problems",
"eslint.codeAction.showDocumentation": { "enable": true },
"eslint.codeAction.disableRuleComment": {
"enable": true,
"location": "separateLine",
"commentStyle": "line"
},
/*
Formatting with Prettier
*/
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
// Show a line for the prettier print width
"editor.rulers": [80, 120],
// Helps in edge-cases where prettier fails to resolve the config
"prettier.requireConfig": true,
"prettier.configPath": "./prettier.config.mjs",
// https://github.com/withastro/prettier-plugin-astro/blob/main/README.md#formatting-with-the-vs-code-prettier-extension-directly
"prettier.documentSelectors": ["**/*.astro"],
"[astro]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
// override any preconfigured defaults
"[html]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[css]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[javascriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[typescriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[jsx-tags]": {},
"[markdown]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
Loading
Loading