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

chore: upgrade deps #6

Merged
merged 2 commits into from Mar 22, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 8 additions & 3 deletions .eslintrc.js
Expand Up @@ -11,15 +11,20 @@ module.exports = {
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier/@typescript-eslint",
"prettier",
],
rules: {
...jsConfig.rules,
"@typescript-eslint/no-unsafe-argument": "off",
Copy link
Collaborator Author

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",
Copy link
Collaborator Author

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/no-shadow": "error",
Copy link
Collaborator Author

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-redeclare": "error",
Copy link
Collaborator Author

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-base-to-string": ["error", { ignoredTypeNames: ["Error", "RegExp", "RegExpLike", "URL", "URLSearchParams"] }], // 1 instance
Copy link
Collaborator Author

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-use-before-define": ["error", "nofunc"],
Copy link
Collaborator Author

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

"no-duplicate-imports": "off",
// "@typescript-eslint/consistent-type-imports": "error", // temporarily removed from eslint
"@typescript-eslint/default-param-last": "error",
"dot-notation": "off",
"@typescript-eslint/dot-notation": "error",
Expand All @@ -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"}],
Copy link
Collaborator Author

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.

"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-unused-vars": ["error", {argsIgnorePattern: "^_"}],
"@typescript-eslint/prefer-for-of": "error",
Expand Down
4 changes: 1 addition & 3 deletions .eslintrc_js.js
Expand Up @@ -25,14 +25,12 @@ module.exports = {
"no-invalid-this": "error",
"no-new-wrappers": "error",
"no-path-concat": "error",
"no-redeclare": "error",
"no-return-assign": "error",
"no-sequences": "error",
"no-shadow": "warn",
"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",
Copy link
Collaborator Author

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.

"prefer-arrow-callback": "error",
"prefer-const": "error",
"prefer-destructuring": ["warn", {VariableDeclarator: {object: true}}],
Expand Down
18 changes: 9 additions & 9 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "@ajv-validator/config",
"version": "0.4.0",
"version": "0.5.0",
"description": "Shared typescript, eslint and prettier configuration",
"main": "index.js",
"scripts": {
Expand All @@ -21,14 +21,14 @@
},
"homepage": "https://github.com/ajv-validator/config#readme",
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^3.7.0",
"@typescript-eslint/parser": "^3.7.0",
"eslint": "^7.5.0",
"eslint-config-prettier": "^6.11.0",
"husky": "^4.2.5",
"lint-staged": "^10.2.11",
"prettier": "^2.0.5",
"typescript": "^3.9.7"
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"prettier": "3.0.3",
"typescript": "^4.9.5"
Copy link
Collaborator Author

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.

},
"husky": {
"hooks": {
Expand Down