Skip to content

Commit

Permalink
fix: incorrect eslint project setting for ts in md/mdx, incompatible …
Browse files Browse the repository at this point in the history
…tsconfig module option for Node16 and NodeNext (#220)
  • Loading branch information
JounQin committed Dec 10, 2023
1 parent 9ac862e commit 9268bd0
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .changeset/fair-kiwis-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@1stg/app-config": patch
"@1stg/common-config": patch
"@1stg/lib-config": patch
"@1stg/tsconfig": patch
---

fix(tsconfig): incompatible module option for Node16 and NodeNext
8 changes: 8 additions & 0 deletions .changeset/sweet-squids-reply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@1stg/app-config": patch
"@1stg/common-config": patch
"@1stg/eslint-config": patch
"@1stg/lib-config": patch
---

fix(eslint): incorrect project setting for ts in md/mdx
10 changes: 8 additions & 2 deletions packages/eslint-config/overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,14 @@ exports.ts = [
},
},
{
files: ['*.cts', '*.mts', '*.ts', '*.tsx'],
excludedFiles: ['*.d.cts', '*.d.mts', '*.d.ts'],
files: '**/*.{md,mdx}/**/*.{cts,mts,ts,tsx}',
parserOptions: {
project: null,
},
},
{
files: '*.{cts,mts,ts,tsx}',
excludedFiles: ['**/*.{md,mdx}/**/*.{cts,mts,ts,tsx}', '*.d.{cts,mts,ts}'],
extends: ['plugin:@typescript-eslint/recommended-requiring-type-checking'],
rules: {
'@typescript-eslint/no-floating-promises': [
Expand Down
1 change: 1 addition & 0 deletions packages/tsconfig/node16.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"$schema": "http://json.schemastore.org/tsconfig",
"extends": "./lib.json",
"compilerOptions": {
"module": "Node16",
"moduleResolution": "Node16",
"target": "ES2021"
}
Expand Down
1 change: 1 addition & 0 deletions packages/tsconfig/nodenext.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"$schema": "http://json.schemastore.org/tsconfig",
"extends": "./lib.json",
"compilerOptions": {
"module": "NodeNext",
"moduleResolution": "NodeNext",
"target": "ESNext"
}
Expand Down

0 comments on commit 9268bd0

Please sign in to comment.