Skip to content
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
29 changes: 0 additions & 29 deletions .eslintrc.json

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'pnpm'
- name: Check size
uses: andresz1/size-limit-action@master
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'pnpm'
- name: Check package.json files
run: pnpm dlx @trigen/lint-package-json
2 changes: 1 addition & 1 deletion .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
Expand Down
25 changes: 22 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,31 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Check types
run: pnpm test:types
lint:
runs-on: ubuntu-latest
name: lint
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Lint files
run: pnpm lint
unit:
runs-on: ubuntu-latest
name: unit
Expand All @@ -38,12 +57,12 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run tests
run: pnpm test
run: pnpm test:unit
- name: Collect coverage
uses: codecov/codecov-action@v5
if: success()
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
Expand Down
2 changes: 1 addition & 1 deletion .nano-staged.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"*.{js,ts,tsx}": "eslint --fix"
"*.{c,m,}{js,ts}{x,}": "eslint --flag v10_config_lookup_from_file --fix"
}
29 changes: 29 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { globalIgnores } from 'eslint/config'
import baseConfig from '@trigen/eslint-config'
import moduleConfig from '@trigen/eslint-config/module'
import tsConfig from '@trigen/eslint-config/typescript'
// import tsTypeCheckedConfig from '@trigen/eslint-config/typescript-type-checked'
import testConfig from '@trigen/eslint-config/test'
import env from '@trigen/eslint-config/env'

export default [
globalIgnores(['**/dist/', '**/package/']),
...baseConfig,
...moduleConfig,
...tsConfig,
// ...tsTypeCheckedConfig,
...testConfig,
env.node,
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname
}
},
rules: {
'@typescript-eslint/no-magic-numbers': 'off',
'@stylistic/array-element-newline': 'off'
}
}
]
5 changes: 0 additions & 5 deletions examples/.eslintrc.json

This file was deleted.

10 changes: 10 additions & 0 deletions examples/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import rootConfig from '../eslint.config.js'

export default [
...rootConfig,
{
rules: {
'no-console': 'off'
}
}
]
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
"clear": "del ./package ./dist ./coverage",
"prepublishOnly": "run test build clear:package clean-publish",
"postpublish": "pnpm clear:package",
"emitDeclarations": "tsc --emitDeclarationOnly",
"emitDeclarations": "tsc -p tsconfig.build.json --emitDeclarationOnly",
"build": "run -p [ rollup -c ] emitDeclarations",
"lint": "eslint './*{js,ts}' './src/**/*.{js,ts}' './examples/**/*.{js,ts}'",
"lint": "eslint --flag v10_config_lookup_from_file",
"test:unit": "vitest run --coverage",
"test:unit:watch": "vitest watch",
"test:types": "tsc --noEmit",
"test:types": "tsc -p tsconfig.build.json --noEmit",
"test:size": "size-limit",
"test": "run -p lint test:unit",
"build:demo": "node examples/buildDemo > ./docs/demo.html && cp -R examples/demojs/ docs/demojs/",
Expand Down Expand Up @@ -80,16 +80,16 @@
"@size-limit/file": "^11.0.0",
"@swc/core": "^1.3.20",
"@swc/helpers": "^0.5.1",
"@trigen/browserslist-config": "8.0.0",
"@trigen/eslint-config": "8.0.0-alpha.32",
"@trigen/scripts": "8.0.0",
"@trigen/browserslist-config": "^8.0.0",
"@trigen/eslint-config": "^8.0.3",
"@trigen/scripts": "^8.0.0",
"@types/node": "^22.0.0",
"@vitest/coverage-v8": "^3.0.0",
"browserslist": "^4.22.2",
"clean-publish": "^5.0.0",
"commitizen": "^4.2.5",
"del-cli": "^6.0.0",
"eslint": "^8.28.0",
"eslint": "^9.31.0",
"nano-staged": "^0.8.0",
"rollup": "^4.6.1",
"rollup-plugin-add-shebang": "^0.3.1",
Expand All @@ -99,7 +99,7 @@
"size-limit": "^11.0.0",
"standard-version": "^9.5.0",
"typedoc": "^0.25.1",
"typescript": "5.1.3",
"typescript": "^5.8.3",
"vite": "^5.0.4",
"vitest": "^3.0.0"
}
Expand Down
Loading
Loading