Skip to content

Commit

Permalink
chore: modernize dependencies (#440)
Browse files Browse the repository at this point in the history
* chore: migrate configs

* chore: update vitest

* chore: regenerate `package-lock.json`

* ci: use node 22

* ci: update to `actions/checkout@v4` and `actions/setup-node@v4`
  • Loading branch information
schoero committed May 13, 2024
1 parent 5438cfc commit d1f4239
Show file tree
Hide file tree
Showing 31 changed files with 2,760 additions and 2,997 deletions.
18 changes: 9 additions & 9 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
{
"ignorePaths": [
"node_modules/**",
"lib/**",
"tests/output/**",
"src/shared/qr-code-generator.ts"
],
"import": [
"@schoero/cspell-config",
"@schoero/configs/cspell",
"@cspell/dict-fr-fr/cspell-ext.json",
"@cspell/dict-it-it/cspell-ext.json"
],
"overrides": [
{
"caseSensitive": false,
"filename": "**/translations.ts",
"language": "en, de, fr, it",
"caseSensitive": false
"language": "en, de, fr, it"
}
],
"words": [
Expand Down Expand Up @@ -37,11 +43,5 @@
"Twint",
"TWINT",
"undash"
],
"ignorePaths": [
"node_modules/**",
"lib/**",
"tests/output/**",
"src/shared/qr-code-generator.ts"
]
}
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

43 changes: 0 additions & 43 deletions .eslintrc.json

This file was deleted.

12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: npm
node-version: 20
node-version: 22

- name: Install dependencies
run: npm ci
Expand All @@ -37,8 +37,8 @@ jobs:
github.event.pull_request.base.repo.full_name
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: npm
node-version: ${{ matrix.node }}
Expand All @@ -55,7 +55,7 @@ jobs:
node:
- 18
- 20
- 21
- 22
os:
- ubuntu-latest
- windows-latest
Expand Down
2 changes: 1 addition & 1 deletion .markdownlint.jsonc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "@schoero/markdownlint-config"
"extends": "@schoero/configs/markdownlint"
}
2 changes: 1 addition & 1 deletion .unwritten.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "../unwritten/schemas/renderer/config.json",
"extends": "@schoero/unwritten-config",
"extends": "@schoero/configs/unwritten",
"renderConfig": {
"markdown": {
"sectionSeparator": "<br/>"
Expand Down
13 changes: 9 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"eslint.validate": ["javascript", "typescript", "json", "jsonc", "json5", "yaml"],
"[html]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"eslint.validate": ["javascript", "typescript", "json", "jsonc", "json5", "yaml", "html"],
"eslint.experimental.useFlatConfig": true,
"eslint.debug": true,
"editor.formatOnSave": false,

// Prettier
Expand Down Expand Up @@ -50,9 +55,9 @@

// VSCode
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.markdownlint": true,
"source.organizeImports": false
"source.fixAll.eslint": "explicit",
"source.fixAll.markdownlint": "explicit",
"source.organizeImports": "never"
},

"editor.rulers": [
Expand Down
1 change: 1 addition & 0 deletions changelog.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "@schoero/configs/changelogen";
1 change: 0 additions & 1 deletion changelog.config.ts

This file was deleted.

43 changes: 43 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import eslintPluginTypeScript from "@typescript-eslint/eslint-plugin";
import eslintParserTypeScript from "@typescript-eslint/parser";

import sharedRules from "@schoero/configs/eslint";

/** @type { import("eslint").Linter.FlatConfig[] } */
export default [
...sharedRules,

{
ignores: ["src/shared/qr-code-generator.ts"]
},
{
files: ["**/*.ts"],
rules: {
"eslint-plugin-typescript/no-unnecessary-condition": "off"
}
},
{
files: ["examples/**/*.js", "examples/**/*.ts"],
rules: {
"no-undef": "off"
}
},
{
files: ["vite.config.ts", "vite.config.cjs.ts", "vite.config.bundle.ts"],
languageOptions: {
parser: eslintParserTypeScript,
parserOptions: {
project: "./tsconfig.vite.json"
}
},
plugins: {
"eslint-plugin-typescript": eslintPluginTypeScript
}
},
{
files: ["examples/**/*.js", "examples/**/*.ts"],
rules: {
"eslint-plugin-unicorn/prefer-node-protocol": "off"
}
}
];
Loading

0 comments on commit d1f4239

Please sign in to comment.