-
Notifications
You must be signed in to change notification settings - Fork 3
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
chore: upgrade deps #6
Conversation
], | ||
rules: { | ||
...jsConfig.rules, | ||
"@typescript-eslint/no-unsafe-argument": "off", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to be a new rule that didn't exist before. We had 123 violations which is too much to fix or disable by line.
"@typescript-eslint/array-type": "error", | ||
"@typescript-eslint/consistent-type-assertions": "error", | ||
"@typescript-eslint/consistent-type-definitions": "error", | ||
"@typescript-eslint/no-redundant-type-constituents": "error", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New rule that is on by default it seems, so I added it to be explicit as it seems useful.
"@typescript-eslint/array-type": "error", | ||
"@typescript-eslint/consistent-type-assertions": "error", | ||
"@typescript-eslint/consistent-type-definitions": "error", | ||
"@typescript-eslint/no-redundant-type-constituents": "error", | ||
"@typescript-eslint/no-shadow": "error", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ported from the js ruleset
"@typescript-eslint/array-type": "error", | ||
"@typescript-eslint/consistent-type-assertions": "error", | ||
"@typescript-eslint/consistent-type-definitions": "error", | ||
"@typescript-eslint/no-redundant-type-constituents": "error", | ||
"@typescript-eslint/no-shadow": "error", | ||
"@typescript-eslint/no-redeclare": "error", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ported from the js ruleset
"@typescript-eslint/no-redundant-type-constituents": "error", | ||
"@typescript-eslint/no-shadow": "error", | ||
"@typescript-eslint/no-redeclare": "error", | ||
"@typescript-eslint/no-base-to-string": ["error", { ignoredTypeNames: ["Error", "RegExp", "RegExpLike", "URL", "URLSearchParams"] }], // 1 instance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A new rule added by default. I have added some standard exceptions though the one that actually triggered in ajv was RegExpLike
.
"@typescript-eslint/no-shadow": "error", | ||
"@typescript-eslint/no-redeclare": "error", | ||
"@typescript-eslint/no-base-to-string": ["error", { ignoredTypeNames: ["Error", "RegExp", "RegExpLike", "URL", "URLSearchParams"] }], // 1 instance | ||
"@typescript-eslint/no-use-before-define": ["error", "nofunc"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ported from the js ruleset
@@ -29,7 +34,7 @@ module.exports = { | |||
"no-invalid-this": "off", | |||
"@typescript-eslint/no-invalid-this": "error", | |||
"@typescript-eslint/no-misused-new": "error", | |||
"@typescript-eslint/no-parameter-properties": "error", | |||
"@typescript-eslint/parameter-properties": ["error", {prefer: "parameter-property"}], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This way this rule works has been updated.
"no-template-curly-in-string": "error", | ||
"no-trailing-spaces": "error", | ||
"no-undef-init": "error", | ||
"no-use-before-define": ["error", "nofunc"], | ||
"no-use-before-define": "off", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must be off to enable the TS version.
"husky": "^9.0.11", | ||
"lint-staged": "^15.2.2", | ||
"prettier": "3.0.3", | ||
"typescript": "^4.9.5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have updated TS to the same version of the main repo.
See inline comments for an explanation of each config change. In general these choices were made to give the most protection and ensuring best practices while avoiding large changes in the AJV codebase.
You can see the result of these rules in the AJV PR.