Skip to content

Commit

Permalink
Merge pull request #34 from yoriiis/feat/biome
Browse files Browse the repository at this point in the history
Biome migration and Node.js upgrade
  • Loading branch information
yoriiis authored Nov 18, 2024
2 parents de31059 + 01bbb29 commit 09609f6
Show file tree
Hide file tree
Showing 20 changed files with 1,482 additions and 3,844 deletions.
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:
strategy:
matrix:
node-version: [16, 18, 20]
node-version: [18, 20, 22]
os: [ubuntu-latest, macos-latest]
uses: yoriiis/actions/.github/workflows/test-and-build.yml@main
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@ jobs:
lint:
uses: yoriiis/actions/.github/workflows/lint.yml@main
with:
node-version: 20
stylelint-status: false
eslint-status: false
biome-status: true
eslint-config: 'config/.eslintrc.cjs'
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/iron
lts/jod
41 changes: 41 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false },
"files": {
"ignoreUnknown": false,
"ignore": ["**/node_modules", "**/coverage", "**/dist", "**/lib", "**/types"]
},
"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" }
}
},
"javascript": {
"formatter": {
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"trailingCommas": "none",
"semicolons": "always",
"arrowParentheses": "always",
"bracketSameLine": true,
"quoteStyle": "single",
"attributePosition": "auto",
"bracketSpacing": true
}
}
}
43 changes: 0 additions & 43 deletions config/.eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion config/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default {
{
diagnostics: {
// Disable error reporting with import assertions
ignoreCodes: ['TS1343', 'TS2821']
ignoreCodes: ['TS2823']
}
}
]
Expand Down
27 changes: 0 additions & 27 deletions config/prettier.config.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion example/svgo.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import crypto from 'crypto';
import crypto from 'node:crypto';

export default {
multipass: true,
Expand Down
10 changes: 4 additions & 6 deletions example/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import path from 'path';
import { fileURLToPath } from 'url';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import TerserJSPlugin from 'terser-webpack-plugin';
import CssMinimizerPlugin from 'css-minimizer-webpack-plugin';
import SvgChunkWebpackPlugin from '../lib/index.js';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

export default (env, argv) => {
export default (_env, argv) => {
const isProduction = argv.mode === 'production';

return {
Expand Down Expand Up @@ -75,8 +74,7 @@ export default (env, argv) => {
minimizer: [
new TerserJSPlugin({
extractComments: false
}),
new CssMinimizerPlugin()
})
],
chunkIds: 'deterministic', // or 'named'
removeAvailableModules: true,
Expand Down
Loading

0 comments on commit 09609f6

Please sign in to comment.