-
Notifications
You must be signed in to change notification settings - Fork 179
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: update typescript to 5.3.3 #14407
Changes from all commits
da07cb6
f27782e
633dc61
89034ef
deaf8db
298f87f
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,6 +5,7 @@ | |
**/build/** | ||
**/venv/** | ||
.opentrons_config | ||
**/tsconfig*.json | ||
|
||
# prettier | ||
**/package.json | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,12 @@ module.exports = { | |
project: require('path').join(__dirname, 'tsconfig-eslint.json'), | ||
}, | ||
|
||
extends: ['standard-with-typescript', 'plugin:react/recommended', 'prettier'], | ||
extends: [ | ||
'standard-with-typescript', | ||
'plugin:react/recommended', | ||
'prettier', | ||
'plugin:json/recommended', | ||
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. turns out, without extending these rules we weren't actually linting json files in edge. so now we're actually linting json 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. downside: linting json via typescript-eslint/parser takes about an extra minute to run 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. lol fyi @sfoster1 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. twas a breaking change in a previous version of https://github.com/azeemba/eslint-plugin-json?tab=readme-ov-file#eslint-plugin-json |
||
], | ||
|
||
plugins: ['react', 'react-hooks', 'json', 'jest', 'testing-library'], | ||
|
||
|
@@ -50,7 +55,15 @@ module.exports = { | |
overrides: [ | ||
{ | ||
files: ['**/*.js'], | ||
parser: '@babel/eslint-parser', | ||
extends: ['plugin:@typescript-eslint/disable-type-checked'], | ||
parserOptions: { | ||
project: require('path').join(__dirname, 'tsconfig-eslint.json'), | ||
}, | ||
rules: { | ||
'@typescript-eslint/no-var-requires': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'warn', | ||
'@typescript-eslint/no-unused-vars': 'warn', | ||
}, | ||
}, | ||
{ | ||
// TODO(mc, 2021-03-18): remove to default these rules back to errors | ||
|
@@ -65,6 +78,17 @@ module.exports = { | |
'@typescript-eslint/no-floating-promises': 'warn', | ||
'@typescript-eslint/no-unnecessary-type-assertion': 'warn', | ||
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'warn', | ||
'@typescript-eslint/no-unsafe-argument': 'warn', | ||
'@typescript-eslint/consistent-type-imports': 'warn', | ||
'@typescript-eslint/consistent-indexed-object-style': 'warn', | ||
'@typescript-eslint/no-confusing-void-expression': 'warn', | ||
'@typescript-eslint/ban-types': 'warn', | ||
'@typescript-eslint/non-nullable-type-assertion-style': 'warn', | ||
'@typescript-eslint/await-thenable': 'warn', | ||
'@typescript-eslint/ban-ts-comment': 'warn', | ||
'@typescript-eslint/unbound-method': 'warn', | ||
'@typescript-eslint/consistent-generic-constructors': 'warn', | ||
'@typescript-eslint/no-misused-promises': 'warn', | ||
}, | ||
}, | ||
{ | ||
|
@@ -88,11 +112,14 @@ module.exports = { | |
'@typescript-eslint/consistent-type-assertions': 'off', | ||
'@typescript-eslint/no-var-requires': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/no-confusing-void-expression': 'warn', | ||
'node/handle-callback-err': 'off', | ||
// TODO(mc, 2021-01-29): fix these and remove warning overrides | ||
'jest/no-deprecated-functions': 'warn', | ||
'jest/valid-title': 'warn', | ||
'jest/no-conditional-expect': 'warn', | ||
'jest/no-alias-methods': 'warn', | ||
'jest/valid-describe-callback': 'warn', | ||
}, | ||
}, | ||
{ | ||
|
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.
typescript-eslint/parser seems unable to parse tsconfig json files, so we're ignoring them