Skip to content

Commit

Permalink
bump biome, added vscode settings and removed dependency caching
Browse files Browse the repository at this point in the history
  • Loading branch information
colodenn committed Sep 30, 2024
1 parent 994bb70 commit 93cbc47
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 43 deletions.
34 changes: 2 additions & 32 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,8 @@ jobs:
with:
bun-version: 1.1.6

# Cache the local `node_modules` directory.
- name: Restore npm cache
id: cache-node-modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('patches/**') }}-${{ hashFiles('bun.lockb') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('patches/**') }}-
${{ runner.os }}-build-${{ hashFiles('patches/**') }}-
${{ runner.os }}-${{ hashFiles('patches/**') }}-
- name: Install Dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: bun install --frozen-lockfile
run: bun install

- name: Code Linting
run: bun run lint
Expand All @@ -51,23 +36,8 @@ jobs:
with:
bun-version: 1.1.6

# Cache the local `node_modules` directory.
- name: Restore npm cache
id: cache-node-modules
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('patches/**') }}-${{ hashFiles('bun.lockb') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('patches/**') }}-
${{ runner.os }}-build-${{ hashFiles('patches/**') }}-
${{ runner.os }}-${{ hashFiles('patches/**') }}-
- name: Install Dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: bun install --frozen-lockfile
run: bun install

- name: Testing
run: bun run test
30 changes: 24 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,30 @@
{
"editor.rulers": [80, 120],

"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true,

"editor.defaultFormatter": "biomejs.biome",
"editor.rulers": [90, 120],
"editor.insertSpaces": true,
"editor.detectIndentation": true,
"editor.codeActionsOnSave": {
"source.organizeImports.biome": "explicit"
},

"javascript.updateImportsOnFileMove.enabled": "always",
"typescript.updateImportsOnFileMove.enabled": "always",
"javascript.preferences.importModuleSpecifier": "non-relative",
"typescript.preferences.importModuleSpecifier": "non-relative",
"typescript.suggest.autoImports": true,
"typescript.preferences.quoteStyle": "single",
"javascript.preferences.quoteStyle": "single",
"[json][javascript][javascriptreact][typescript][typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},

"typescript.updateImportsOnFileMove.enabled": "always",
"typescript.preferences.importModuleSpecifier": "non-relative"
"typescript.format.enable": false,
"javascript.format.enable": false,

"yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": ".github/workflows/*.yml"
},

"tailwindCSS.colorDecorators": false
}
65 changes: 61 additions & 4 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,78 @@
{
"$schema": "https://biomejs.dev/schemas/1.7.1/schema.json",
"organizeImports": {
"enabled": true
"$schema": "https://biomejs.dev/schemas/1.9.2/schema.json",
"files": {
"include": ["./**/*.ts", "./**/*.json"],
"ignore": ["node_modules/", "bun.lockb"]
},
"formatter": {
"enabled": true,
"attributePosition": "multiline",
"indentStyle": "space",
"indentWidth": 2
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 90
},
"javascript": {
"formatter": {
"enabled": true,
"arrowParentheses": "always",
"attributePosition": "multiline",
"bracketSameLine": true,
"bracketSpacing": true,
"jsxQuoteStyle": "double",
"quoteStyle": "single",
"semicolons": "always",
"trailingCommas": "all"
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,

"a11y": { "all": true },
"complexity": { "all": true },
"correctness": {
"noUnusedImports": "warn",
"noUnusedVariables": "warn"
},
"nursery": {
"all": true,
"useSortedClasses": "warn"
},
"performance": {
"all": true,

"noBarrelFile": "off"
},
"security": { "all": true },
"style": {
"all": true,
"noDefaultExport": "off",
"useBlockStatements": "off",
"noNonNullAssertion": "off",
"useConsistentArrayType": {
"level": "warn",
"options": {
"syntax": "generic"
}
},
"useFilenamingConvention": "off",
"useNamingConvention": "off",
"useShorthandArrayType": "off"
},
"suspicious": {
"all": true,
"noConsoleLog": "off"
}
}
},
"organizeImports": {
"enabled": true
},
"vcs": {
"clientKind": "git",
"defaultBranch": "main",
"enabled": true
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"ronin": "4.3.1"
},
"devDependencies": {
"@biomejs/biome": "1.8.3",
"@biomejs/biome": "1.9.2",
"@types/bun": "1.1.8",
"bunchee": "5.4.0",
"hono": "4.5.11",
Expand Down

0 comments on commit 93cbc47

Please sign in to comment.