Skip to content

Commit

Permalink
feat: typescript-eslint@8
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillgroshkov committed Jul 31, 2024
1 parent 6d2c6bd commit fbfadd6
Show file tree
Hide file tree
Showing 4 changed files with 290 additions and 244 deletions.
3 changes: 2 additions & 1 deletion cfg/eslint-rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
rules: {
'@typescript-eslint/adjacent-overload-signatures': 2,
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/ban-types': [
'@typescript-eslint/no-restricted-types': [
2,
{
types: {
Expand Down Expand Up @@ -345,6 +345,7 @@ module.exports = {
'@typescript-eslint/no-redundant-type-constituents': 0, // `'a' | string` is still useful for DX
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-require-imports': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/explicit-module-boundary-types': [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"timekeeper": "^2.2.0",
"ts-jest": "^29.0.0",
"typescript": "^5.0.2",
"typescript-eslint": "^7.16.1",
"typescript-eslint": "^8.0.0",
"yargs": "^17.0.0"
},
"devDependencies": {
Expand Down
71 changes: 40 additions & 31 deletions src/test/cfg/eslint.config.dump.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"0": ".vue",
"1": ".html"
},
"parser": "typescript-eslint/parser@7.17.0",
"parser": "typescript-eslint/parser@8.0.0",
"project": "tsconfig.json"
},
"sourceType": "module"
Expand All @@ -18,7 +18,7 @@
},
"plugins": [
"@",
"@typescript-eslint:@typescript-eslint/eslint-plugin@7.17.0",
"@typescript-eslint:@typescript-eslint/eslint-plugin@8.0.0",
"unicorn:eslint-plugin-unicorn@55.0.0",
"vue:eslint-plugin-vue@9.27.0",
"import",
Expand Down Expand Up @@ -50,31 +50,6 @@
"@typescript-eslint/ban-tslint-comment": [
2
],
"@typescript-eslint/ban-types": [
2,
{
"types": {
"Boolean": {
"message": "Avoid using the `Boolean` type. Did you mean `boolean`?"
},
"Number": {
"message": "Avoid using the `Number` type. Did you mean `number`?"
},
"object": {
"message": "The `object` type is currently hard to use ([see this issue](https://github.com/microsoft/TypeScript/issues/21732)).\nConsider using `Record<string, any>` instead, as it allows you to more easily inspect and use the keys."
},
"Object": {
"message": "Avoid using the `Object` type. Did you mean `object`? Consider using Record<string, any> instead"
},
"String": {
"message": "Avoid using the `String` type. Did you mean `string`?"
},
"Symbol": {
"message": "Avoid using the `Symbol` type. Did you mean `symbol`?"
}
}
}
],
"@typescript-eslint/block-spacing": [
0
],
Expand Down Expand Up @@ -266,6 +241,9 @@
"@typescript-eslint/no-array-constructor": [
2
],
"@typescript-eslint/no-array-delete": [
2
],
"@typescript-eslint/no-base-to-string": [
2
],
Expand Down Expand Up @@ -317,9 +295,6 @@
"ignoreParameters": true
}
],
"@typescript-eslint/no-loss-of-precision": [
2
],
"@typescript-eslint/no-misused-new": [
2
],
Expand Down Expand Up @@ -347,6 +322,34 @@
"@typescript-eslint/no-redundant-type-constituents": [
0
],
"@typescript-eslint/no-require-imports": [
0
],
"@typescript-eslint/no-restricted-types": [
2,
{
"types": {
"Boolean": {
"message": "Avoid using the `Boolean` type. Did you mean `boolean`?"
},
"Number": {
"message": "Avoid using the `Number` type. Did you mean `number`?"
},
"object": {
"message": "The `object` type is currently hard to use ([see this issue](https://github.com/microsoft/TypeScript/issues/21732)).\nConsider using `Record<string, any>` instead, as it allows you to more easily inspect and use the keys."
},
"Object": {
"message": "Avoid using the `Object` type. Did you mean `object`? Consider using Record<string, any> instead"
},
"String": {
"message": "Avoid using the `String` type. Did you mean `string`?"
},
"Symbol": {
"message": "Avoid using the `Symbol` type. Did you mean `symbol`?"
}
}
}
],
"@typescript-eslint/no-this-alias": [
0
],
Expand Down Expand Up @@ -392,6 +395,9 @@
"@typescript-eslint/no-unsafe-return": [
0
],
"@typescript-eslint/no-unsafe-unary-minus": [
2
],
"@typescript-eslint/no-unused-expressions": [
2
],
Expand Down Expand Up @@ -929,7 +935,7 @@
2
],
"no-loss-of-precision": [
0
2
],
"no-misleading-character-class": [
2
Expand Down Expand Up @@ -1077,6 +1083,9 @@
"no-unsafe-optional-chaining": [
2
],
"no-unused-expressions": [
0
],
"no-unused-labels": [
2
],
Expand Down
Loading

0 comments on commit fbfadd6

Please sign in to comment.