Skip to content

Commit e0a1cd9

Browse files
committed
removed prettier and enable @antfu/eslint-config
1 parent 2f6d80c commit e0a1cd9

File tree

11 files changed

+1127
-778
lines changed

11 files changed

+1127
-778
lines changed

.eslintrc.json

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

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ jobs:
3535
cache: 'pnpm'
3636
- run: pnpm install --frozen-lockfile
3737
- run: pnpm lint-fix
38-
- run: pnpm prettier
3938
- name: Auto commit fixed code
4039
id: auto-commit-action
4140
uses: stefanzweifel/git-auto-commit-action@v4

.prettierignore

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
1-
node_modules
2-
dist
3-
.npmignore
4-
package-lock.json
5-
.DS_Store
6-
tsconfig.tsbuildinfo
7-
example
8-
vitest.config.ts
1+
**

.prettierrc.json

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

eslint.config.mjs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import antfu from '@antfu/eslint-config'
2+
3+
export default antfu({
4+
typescript: true,
5+
// `.eslintignore` is no longer supported in Flat config, use `ignores` instead
6+
ignores: [
7+
'dist/**',
8+
'node_modules/**',
9+
'example/**',
10+
'vitest.config.ts',
11+
'tsconfig.json',
12+
],
13+
})

package.json

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,18 @@
77
"url": "https://github.com/Code-Hex/graphql-codegen-typescript-validation-schema.git"
88
},
99
"main": "dist/main/index.js",
10-
"typings": "dist/main/index.d.ts",
10+
"typings": "dist/types/index.d.ts",
1111
"module": "dist/module/index.js",
12+
"exports": {
13+
".": {
14+
"types": "./dist/types/index.d.ts",
15+
"import": "./dist/module/index.js",
16+
"require": "./dist/main/index.js"
17+
}
18+
},
1219
"files": [
1320
"dist/**/*.{js,ts}",
21+
"!**/*.tsbuildinfo",
1422
"LICENSE",
1523
"README.md"
1624
],
@@ -23,10 +31,9 @@
2331
"build": "run-p build:*",
2432
"build:main": "tsc -p tsconfig.main.json",
2533
"build:module": "tsc -p tsconfig.module.json",
34+
"build:types": "tsc -p tsconfig.types.json",
2635
"lint": "eslint --ext .ts .",
2736
"lint-fix": "eslint --fix --ext .ts .",
28-
"prettier": "prettier --write --list-different \"**/*.{ts,graphql,yml}\"",
29-
"prettier:check": "prettier --check \"**/*.{ts,graphql,yml}\"",
3037
"generate": "run-p build:* && graphql-codegen",
3138
"prepublish": "run-p build:*"
3239
},
@@ -47,21 +54,16 @@
4754
"author": "codehex",
4855
"license": "MIT",
4956
"devDependencies": {
57+
"@antfu/eslint-config": "^2.12.2",
5058
"@graphql-codegen/cli": "5.0.2",
5159
"@graphql-codegen/typescript": "^4.0.0",
5260
"@tsconfig/recommended": "1.0.6",
5361
"@types/graphlib": "^2.1.8",
54-
"@types/jest": "29.5.12",
5562
"@types/node": "^20.0.0",
56-
"@typescript-eslint/eslint-plugin": "7.5.0",
57-
"@typescript-eslint/parser": "7.5.0",
5863
"eslint": "9.0.0",
59-
"eslint-plugin-import": "^2.27.5",
60-
"eslint-plugin-simple-import-sort": "^12.0.0",
6164
"jest": "29.7.0",
6265
"myzod": "1.11.0",
6366
"npm-run-all2": "6.1.2",
64-
"prettier": "3.2.5",
6567
"ts-dedent": "^2.2.0",
6668
"ts-jest": "29.1.2",
6769
"typescript": "5.4.4",

0 commit comments

Comments
 (0)