Skip to content
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

feat: typescript v5 #1406

Merged
merged 1 commit into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
{
"selector": "enumMember",
"format": ["PascalCase"]
},
Copy link
Contributor Author

@yue4u yue4u May 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for THREE, V1MToonSchema, V0VRM ...

{
"selector": "import",
"format": ["camelCase", "PascalCase", "UPPER_CASE"]
}
],
"@typescript-eslint/no-unused-vars": ["warn", { "args": "none" }], // we sometimes have to define unused arguments
Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@
},
"devDependencies": {
"@gltf-transform/core": "^3.7.4",
"@rollup/plugin-typescript": "^11.0.0",
"@types/jest": "^26.0.15",
"@typescript-eslint/eslint-plugin": "^4.6.1",
"@typescript-eslint/parser": "^4.6.1",
"@rollup/plugin-typescript": "^11.1.6",
"@types/jest": "^29.5.12",
"@typescript-eslint/eslint-plugin": "^7.9.0",
"@typescript-eslint/parser": "^7.9.0",
"cross-env": "^7.0.2",
"downlevel-dts": "^0.11.0",
"eslint": "^7.12.1",
"eslint": "8",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the version specifier intentional? eslint seems to bump minor frequently so it might be reasonable enough to do this though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ESlint v9 is out but not very well supported by plugins for now. Basically this means latest v8 and I don't think there'll be many v8 releases from now on.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure! if it's intentional it's fine

"eslint-config-mdcs": "^5.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-html": "^7.1.0",
"husky": "^8.0.2",
"jest": "^26.6.3",
"jest": "^29.7.0",
"lerna": "^6.6.2",
"lint-staged": "^15.1.0",
"prettier": "^2.1.2",
Expand All @@ -38,11 +38,11 @@
"rollup-plugin-serve": "^2.0.2",
"rollup-plugin-string": "^3.0.0",
"rollup-plugin-terser": "^7.0.2",
"ts-jest": "^26.4.4",
"ts-node": "^9.0.0",
"tslib": "^2.0.3",
"typedoc": "^0.25.4",
"typescript": "^4.3.5"
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2",
"tslib": "^2.6.2",
"typedoc": "^0.25.13",
"typescript": "^5.4.5"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think three-vrm still does not require users to use typescript v5 yet after this PR.

Copy link
Contributor Author

@yue4u yue4u May 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR to remove downlevel-dts #1302 . I think that is still valid and can be merged either before or after this PR.

},
"name": "three-vrm"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import * as THREE from 'three';

const encodingColorSpaceMap: Record<any, '' | 'srgb'> = {
// eslint-disable-next-line @typescript-eslint/naming-convention
Copy link
Contributor Author

@yue4u yue4u May 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's possible to avoid this comment via tweaking eslint config but that needs some regex magic. I think it's easier to disable here.

3000: '',
// eslint-disable-next-line @typescript-eslint/naming-convention
3001: 'srgb',
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as THREE from 'three';

const colorSpaceEncodingMap: Record<'' | 'srgb', any> = {
// eslint-disable-next-line @typescript-eslint/naming-convention
'': 3000,
srgb: 3001,
};
Expand Down
Loading
Loading