Skip to content

Commit

Permalink
feat: update typegen import (#21)
Browse files Browse the repository at this point in the history
* chore: update dependencies

* chore: allow js

* feat: update typegen import

* fix: prevent typescript warn overwrite input file

* chore: dont remove files array
  • Loading branch information
Garfield550 authored Jan 12, 2025
1 parent b23ce6f commit 3d12e69
Show file tree
Hide file tree
Showing 8 changed files with 477 additions and 563 deletions.
4 changes: 0 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@

"eslint.format.enable": true,

"eslint.options": {
"flags": ["unstable_ts_config"]
},

"eslint.runtime": "node",

// Silent the stylistic rules in you IDE, but still auto fix them
Expand Down
8 changes: 4 additions & 4 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

/** @type {import('lint-staged').Config} */
const config = {
'*.?([cm])[jt]s?(x)': ['eslint --flag unstable_ts_config --fix'],
'*.json?(c|5)': ['eslint --flag unstable_ts_config --fix'],
'*.{md,htm,html,yml,yaml}': ['eslint --flag unstable_ts_config --fix'],
'*.{c,le,sc,pc,postc}ss': ['eslint --flag unstable_ts_config --fix'],
'*.?([cm])[jt]s?(x)': ['eslint --fix'],
'*.json?(c|5)': ['eslint --fix'],
'*.{md,htm,html,yml,yaml}': ['eslint --fix'],
'*.{c,le,sc,pc,postc}ss': ['eslint --fix'],
}

export default config
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"test": "vitest --run --logHeapUsage",
"coverage": "vitest run --coverage",
"typegen": "tsx scripts/typegen.ts",
"lint": "eslint --cache --flag unstable_ts_config .",
"lint": "eslint --cache .",
"prepare": "husky"
},
"devDependencies": {
Expand All @@ -33,11 +33,11 @@
"@types/node": "^22.10.5",
"@vitest/coverage-v8": "^2.1.8",
"dprint": "^0.48.0",
"eslint": "^9.17.0",
"eslint": "^9.18.0",
"eslint-typegen": "^1.0.0",
"happy-dom": "^16.5.3",
"husky": "^9.1.7",
"jiek": "2.2.7",
"jiek": "^2.3.3",
"jiti": "^2.4.2",
"lint-staged": "^15.3.0",
"tsx": "^4.19.2",
Expand All @@ -46,8 +46,6 @@
},
"pnpm": {
"overrides": {
"@jiek/pkger": "npm:@jiek/[email protected]",
"@jiek/rollup-plugin-dts": "npm:@jiek/[email protected]",
"deep-equal": "npm:@nolyfill/deep-equal@^1",
"is-core-module": "npm:@nolyfill/is-core-module@^1",
"is-generator-function": "npm:@nolyfill/is-generator-function@^1",
Expand Down
6 changes: 5 additions & 1 deletion packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@
"./package.json": "./package.json",
".": "./src/index.ts"
},
"imports": {
"#typegen": "./typegen.d.ts"
},
"files": [
"LICENSE",
"README.md",
"dist"
"dist",
"typegen.d.ts"
],
"publishConfig": {
"provenance": true
Expand Down
3 changes: 1 addition & 2 deletions packages/eslint-config/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { ConfigNames, RuleOptions } from '#typegen'
import type { Linter } from 'eslint'

import type { ConfigNames, RuleOptions } from './typegen.d.ts'

/**
* Copied from antfu/eslint-config
* Ref: https://github.com/antfu/eslint-config/blob/5d0c2a5ef25a7bc3a2d6d55c1ce157cc47b0bf55/src/types.ts#L9
Expand Down
Loading

0 comments on commit 3d12e69

Please sign in to comment.