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

Biome migration and Node.js upgrade #39

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build:
uses: yoriiis/actions/.github/workflows/test-and-build.yml@main
with:
node-version: 18
node-version: 20
command-build: |
npm run release:v3
npm run release:v2
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,8 @@ jobs:
lint:
uses: yoriiis/actions/.github/workflows/lint.yml@main
with:
node-version: 20
publint-status: false
eslint-status: false
stylelint-status: false
biome-status: true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.12.0
lts/iron
11 changes: 3 additions & 8 deletions abtasty-debugger.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}
],
"settings": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.defaultFormatter": "biomejs.biome",
"[javascript][typescript][typescriptreact][postcss][html][markdown][json]": {
"editor.formatOnSave": true,
"editor.tabSize": 4,
Expand All @@ -32,15 +32,10 @@
"search.exclude": {
"**/node_modules": true
},
"files.eol": "\n",
"files.eol": "\n"
},
"extensions": {
"recommendations": [
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"stylelint.vscode-stylelint",
"csstools.postcss"
]
"recommendations": ["esbenp.prettier-vscode", "biomejs.biome", "csstools.postcss"]
},
"launch": {
"configurations": [
Expand Down
47 changes: 47 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false },
"files": {
"ignoreUnknown": false,
"ignore": ["**/node_modules", "**/coverage", "**/web", "**/lib"]
},
"formatter": {
"enabled": true,
"useEditorconfig": true,
"formatWithErrors": false,
"indentStyle": "tab",
"indentWidth": 2,
"lineEnding": "lf",
"lineWidth": 100,
"attributePosition": "auto",
"bracketSpacing": true
},
"organizeImports": { "enabled": true },
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"complexity": { "noForEach": "off" },
"suspicious": { "noExplicitAny": "off" },
"correctness": { "useJsxKeyInIterable": "off" }
}
},
"css": {
"formatter": {
"quoteStyle": "single"
}
},
"javascript": {
"formatter": {
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"trailingCommas": "none",
"semicolons": "asNeeded",
"arrowParentheses": "always",
"bracketSameLine": true,
"quoteStyle": "single",
"attributePosition": "auto",
"bracketSpacing": true
}
}
}
62 changes: 0 additions & 62 deletions config/.eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion config/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = function (api) {
module.exports = (api) => {
api.cache(true)

const presets = [
Expand Down
5 changes: 2 additions & 3 deletions config/postcss.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const crypto = require('crypto')
const crypto = require('node:crypto')
const md5 = (string) => crypto.createHash('md5').update(string).digest('hex')

module.exports = (api) => {
Expand All @@ -12,8 +12,7 @@ module.exports = (api) => {
[
'postcss-custom-properties-transformer',
{
transformer: ({ property }) =>
isProduction ? md5(property).slice(0, 4) : property
transformer: ({ property }) => (isProduction ? md5(property).slice(0, 4) : property)
}
],
[
Expand Down
19 changes: 0 additions & 19 deletions config/prettier.config.js

This file was deleted.

12 changes: 0 additions & 12 deletions config/stylelint.config.js

This file was deleted.

4 changes: 2 additions & 2 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const fs = require('fs')
const path = require('path')
const fs = require('node:fs')
const path = require('node:path')
const webpack = require('webpack')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const TerserPlugin = require('terser-webpack-plugin')
Expand Down
Loading