Skip to content

Commit fc477af

Browse files
committed
feat(lint): migrate to eslint 9
1 parent 0df9afd commit fc477af

File tree

13 files changed

+2309
-1655
lines changed

13 files changed

+2309
-1655
lines changed

.eslintrc.cjs

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ jobs:
4545
# Check status
4646
git status
4747
git diff --color -U0 | cat
48-
48+
4949
# Publish
5050
pnpm publish

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
- name: 🏷️ Generate Release changelog
7676
run: |
7777
# ================= 🏷️ Changelog =================
78-
78+
7979
pnpm run release:changelog
8080
8181
- name: 📦 Push Release to github

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# typescript-lib-template
2+
23
A basic typescript pnpm library template

eslint.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { defineTypescriptConfig } from '@dvcol/eslint-config';
2+
3+
export default defineTypescriptConfig();

lib/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { describe, it, expect } from 'vitest';
1+
import { describe, expect, it } from 'vitest';
22

33
import { LIB_CONTENT } from './index';
44

package.json

Lines changed: 21 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,45 @@
44
"version": "1.0.0",
55
"packageManager": "pnpm@10.8.1",
66
"description": "<description>",
7+
"author": "dvcol",
8+
"license": "MIT",
79
"homepage": "https://github.com/dvcol/typescript-lib-template",
10+
"repository": {
11+
"type": "git",
12+
"url": "https://github.com/dvcol/typescript-lib-template.git"
13+
},
814
"bugs": "https://github.com/dvcol/typescript-lib-template/issues",
915
"keywords": [
1016
"typescript",
1117
"library",
1218
"typescript-lib-template"
1319
],
14-
"license": "MIT",
15-
"author": "dvcol",
16-
"repository": {
17-
"type": "git",
18-
"url": "https://github.com/dvcol/typescript-lib-template.git"
19-
},
20-
"engines": {
21-
"node": ">=20",
22-
"pnpm": ">= 8"
23-
},
24-
"main": "./dist/index.cjs",
25-
"module": "./dist/index.js",
26-
"types": "./dist/index.d.ts",
2720
"exports": {
2821
".": {
2922
"import.types": "./dist/index.d.ts",
3023
"require.types": "./dist/index.d.cts",
31-
"require": "./dist/index.cjs",
32-
"import": "./dist/index.js"
24+
"import": "./dist/index.js",
25+
"require": "./dist/index.cjs"
3326
}
3427
},
28+
"main": "./dist/index.cjs",
29+
"module": "./dist/index.js",
30+
"types": "./dist/index.d.ts",
3531
"files": [
3632
"*.md",
3733
"LICENSE",
3834
"dist"
3935
],
36+
"engines": {
37+
"node": ">=20",
38+
"pnpm": ">= 8"
39+
},
4040
"scripts": {
4141
"prepare": "husky",
4242
"build": "tsup && publint",
4343
"watch": "npm run build -- --watch lib",
44-
"lint": "eslint lib",
45-
"lint:fix": "eslint lib --fix",
44+
"lint": "eslint .",
45+
"lint:fix": "eslint . --fix",
4646
"lint:package": "publint",
4747
"test:unit": "vitest --run --coverage",
4848
"test:watch": "vitest",
@@ -55,23 +55,11 @@
5555
"devDependencies": {
5656
"@commitlint/cli": "^19.8.0",
5757
"@commitlint/config-conventional": "^19.8.0",
58-
"@dvcol/eslint-plugin-presets": "^1.3.11",
59-
"@typescript-eslint/eslint-plugin": "^7.18.0",
60-
"@typescript-eslint/parser": "^7.18.0",
61-
"@vitest/coverage-v8": "^3.1.1",
62-
"eslint": "^8.57.0",
63-
"eslint-config-airbnb-base": "^15.0.0",
64-
"eslint-config-prettier": "^9.1.0",
65-
"eslint-plugin-eslint-comments": "^3.2.0",
66-
"eslint-plugin-import": "^2.29.1",
67-
"eslint-plugin-jsonc": "^2.16.0",
68-
"eslint-plugin-markdown": "^3.0.1",
69-
"eslint-plugin-prettier": "^5.2.1",
70-
"eslint-plugin-vitest": "^0.4.1",
71-
"eslint-plugin-yml": "^1.14.0",
58+
"@dvcol/eslint-config": "^1.6.0",
59+
"@vitest/coverage-v8": "^3.1.2",
60+
"eslint": "^9.25.1",
7261
"extract-changelog-release": "^1.0.2",
7362
"husky": "^9.1.7",
74-
"jsonc-eslint-parser": "^2.4.0",
7563
"lint-staged": "^15.5.1",
7664
"prettier": "^3.5.3",
7765
"publint": "^0.3.12",
@@ -81,7 +69,7 @@
8169
"vitest": "^3.1.1"
8270
},
8371
"lint-staged": {
84-
"*.{js,jsx,ts,tsx,vue,svelte,json,md}": [
72+
"*.{js,cjs,mjs,jsx,ts,tsx,vue,svelte,json,md,yml,html,md,svg,xml}": [
8573
"eslint --fix"
8674
]
8775
}

0 commit comments

Comments
 (0)