-
-
Notifications
You must be signed in to change notification settings - Fork 225
chore: update TypeScript to v6 #740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
af2c14e
58beda1
33f8b14
703a3a1
d1c4438
0e83e1d
2a28703
e878949
58a6e64
ffd5ede
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,13 +5,19 @@ | |
| "scripts": { | ||
| "build": "npm run build --workspaces --if-present", | ||
| "build:types": "npm run build:types --workspaces --if-present", | ||
| "prepare": "npm run build", | ||
| "lint": "eslint", | ||
| "lint:fix": "eslint --fix", | ||
| "lint:types": "npm run lint:types --workspaces --if-present", | ||
| "lint:unused": "knip", | ||
| "fmt": "prettier --write .", | ||
| "fmt:check": "prettier --check .", | ||
| "test": "npm test --workspaces --if-present" | ||
| "test": "npm test --workspaces --if-present", | ||
| "test:types": "npm run test:types --workspaces --if-present", | ||
| "test:types:5.3": "npx -p [email protected] -y -- tsc -p tsconfig.dist-legacy.json", | ||
| "test:types:5.x": "npx -p [email protected] -y -- tsc -p tsconfig.dist.json", | ||
| "test:types:7.x": "npx -p @typescript/native-preview@latest -y -- tsgo -p tsconfig.dist.json", | ||
| "test:types:all": "npm run test:types && npm run test:types:5.3 && npm run test:types:5.x && npm run test:types:7.x" | ||
| }, | ||
| "workspaces": [ | ||
| "packages/*" | ||
|
|
@@ -29,7 +35,7 @@ | |
| "devDependencies": { | ||
| "@arethetypeswrong/cli": "^0.18.2", | ||
| "@types/node": "^20.19.0", | ||
| "@typescript-eslint/parser": "^8.56.1", | ||
| "@typescript-eslint/parser": "^8.59.0", | ||
| "c8": "^11.0.0", | ||
| "eslint": "^10.0.3", | ||
| "eslint-config-eslint": "^14.0.0", | ||
|
|
@@ -41,7 +47,7 @@ | |
| "mocha": "^11.1.0", | ||
| "prettier": "3.8.3", | ||
| "rollup": "^4.55.2", | ||
| "typescript": "^5.9.3", | ||
| "typescript": "^6.0.3", | ||
| "yorkie": "^2.0.0" | ||
| } | ||
| } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason why the named export test was removed? This test verifies that the named export types exist correctly in the CJS export, so I think it need to be retained. |
|
sethamus marked this conversation as resolved.
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,15 @@ | ||
| { | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "allowJs": false, | ||
| "checkJs": false, | ||
| "strict": true | ||
| "noEmit": true, | ||
| "rootDir": "../..", | ||
| "noImplicitAny": true, | ||
| "exactOptionalPropertyTypes": true, | ||
| "verbatimModuleSyntax": true, | ||
| "erasableSyntaxOnly": true | ||
| }, | ||
| "include": [".", "../../lib"] | ||
| "files": [], | ||
| "include": [".", "../../dist"] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,9 @@ | ||
| { | ||
| "extends": "../../tsconfig.base.json", | ||
| "files": ["lib/index.js"], | ||
| "compilerOptions": { | ||
| "checkJs": true, | ||
| "exactOptionalPropertyTypes": true, | ||
| "forceConsistentCasingInFileNames": true, | ||
| "lib": ["es2022"], | ||
| "module": "nodenext", | ||
| "noEmit": true, | ||
| "noImplicitThis": true, | ||
| "strictNullChecks": true, | ||
| "strictFunctionTypes": true, | ||
| "types": [] | ||
| }, | ||
| "include": ["lib"] | ||
| "noImplicitAny": false, | ||
| "rootDir": "lib", | ||
| "outDir": "dist" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,6 +1,11 @@ | ||||||
| import { expectType, expectAssignable } from "tsd"; | ||||||
|
|
||||||
| import { KEYS, getKeys, unionWith, VisitorKeys } from "../"; | ||||||
| import { | ||||||
| KEYS, | ||||||
| getKeys, | ||||||
| unionWith, | ||||||
| VisitorKeys, | ||||||
| } from "../dist/eslint-visitor-keys.cjs"; | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I think simply using Additionally, using |
||||||
|
|
||||||
| const assignmentExpression = { | ||||||
| type: "AssignmentExpression", | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,8 @@ | ||
| { | ||
| "extends": "../../tsconfig.base.json", | ||
| "files": ["lib/index.js"], | ||
| "compilerOptions": { | ||
| "lib": ["esnext"], | ||
| "moduleResolution": "node", | ||
| "module": "esnext", | ||
| "resolveJsonModule": true, | ||
| "allowJs": true, | ||
| "checkJs": true, | ||
| "noEmit": false, | ||
| "declaration": true, | ||
| "declarationMap": true, | ||
| "emitDeclarationOnly": true, | ||
| "strict": true, | ||
| "exactOptionalPropertyTypes": true, | ||
| "target": "es6", | ||
| "rootDir": "lib", | ||
| "outDir": "dist" | ||
| }, | ||
| "include": ["lib/**/*.js"], | ||
| "exclude": ["node_modules"] | ||
| } | ||
| } |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,22 @@ | ||
| export default { | ||
| input: "espree.js", | ||
| external: ["acorn", "acorn-jsx", "eslint-visitor-keys"], | ||
| treeshake: false, | ||
| output: { | ||
| file: "dist/espree.cjs", | ||
| format: "cjs", | ||
| import { dts } from "rollup-plugin-dts"; | ||
|
|
||
| export default [ | ||
| { | ||
| input: "espree.js", | ||
| external: ["acorn", "acorn-jsx", "eslint-visitor-keys"], | ||
| treeshake: false, | ||
| output: { | ||
| file: "dist/espree.cjs", | ||
| format: "cjs", | ||
| }, | ||
| }, | ||
| }; | ||
| { | ||
| plugins: [dts()], | ||
| input: "espree.js", | ||
| treeshake: false, | ||
| output: { | ||
| file: "dist/espree.d.cts", | ||
| format: "cjs", | ||
| }, | ||
| }, | ||
| ]; |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,7 @@ | ||
| { | ||
| "extends": "../../tsconfig.base.json", | ||
| "files": ["espree.js"], | ||
| "compilerOptions": { | ||
| "lib": ["ESNext"], | ||
| "moduleResolution": "nodenext", | ||
| "module": "nodenext", | ||
| "allowJs": true, | ||
| "checkJs": true, | ||
| "noEmit": false, | ||
| "declaration": true, | ||
| "declarationMap": true, | ||
| "emitDeclarationOnly": true, | ||
| "strict": true, | ||
| "exactOptionalPropertyTypes": true, | ||
| "target": "es6", | ||
| "outDir": "dist" | ||
| }, | ||
| "include": ["espree.js", "lib/**/*.js"], | ||
| "exclude": ["node_modules"] | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "compilerOptions": { | ||
| "allowImportingTsExtensions": true, | ||
| "allowJs": true, | ||
| "checkJs": true, | ||
| "declaration": true, | ||
|
sethamus marked this conversation as resolved.
|
||
| "declarationMap": true, | ||
| "emitDeclarationOnly": true, | ||
| "module": "NodeNext", | ||
| "moduleResolution": "NodeNext", | ||
| "strict": true, | ||
| "target": "ES2022" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "extends": "./tsconfig.base.json", | ||
| "compilerOptions": { | ||
| "allowJs": false, | ||
| "checkJs": false, | ||
| "emitDeclarationOnly": false, | ||
| "noEmit": true, | ||
| "strict": true, | ||
| "exactOptionalPropertyTypes": true, | ||
| "verbatimModuleSyntax": true | ||
| // "erasableSyntaxOnly" is not supported in TypeScript < 5.8. | ||
| }, | ||
| "include": ["packages/*/dist", "packages/*/tests/types"] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "extends": "./tsconfig.base.json", | ||
| "compilerOptions": { | ||
| "allowJs": false, | ||
| "checkJs": false, | ||
| "emitDeclarationOnly": false, | ||
| "noEmit": true, | ||
| "strict": true, | ||
| "exactOptionalPropertyTypes": true, | ||
| "verbatimModuleSyntax": true, | ||
| "erasableSyntaxOnly": true | ||
| }, | ||
| "include": ["packages/*/dist", "packages/*/tests/types"] | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.