-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
deps: Upgrade various packages #208
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c5d2774
deps: Upgrade various packages
scttcper c31f776
update biome
scttcper 786d313
remove biome lint test
scttcper 3a505aa
downgrade
scttcper f036d61
migrate to new restrict types
scttcper 727423b
apply fixes
scttcper f90fcb2
no empty object
scttcper de9a32a
add more areas to ignore
scttcper 8fe35e7
ignore errors
scttcper File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,4 +38,4 @@ jobs: | |
SENTRY_ESLINT_RELAXED: 1 | ||
run: | | ||
cd sentry | ||
yarn lint | ||
yarn lint:prettier && yarn lint:js && yarn lint:css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,6 +78,9 @@ module.exports = { | |
{ | ||
vars: 'all', | ||
args: 'all', | ||
// TODO(scttcper): We could enable this to enforce catch (error) | ||
// https://eslint.org/docs/latest/rules/no-unused-vars#caughterrors | ||
caughtErrors: 'none', | ||
|
||
// Ignore vars that start with an underscore | ||
// e.g. if you want to omit a property using object spread: | ||
|
@@ -86,6 +89,8 @@ module.exports = { | |
// | ||
varsIgnorePattern: '^_', | ||
argsIgnorePattern: '^_', | ||
argsIgnorePattern: '^_', | ||
destructuredArrayIgnorePattern: '^_', | ||
}, | ||
], | ||
|
||
|
@@ -217,50 +222,33 @@ module.exports = { | |
|
||
'sentry/no-dynamic-translations': ['error'], | ||
|
||
// Based on https://github.com/xojs/eslint-config-xo-typescript/blob/2a7e3b0b3c28b0c25866721298e67947a95767ab/index.js#L123 | ||
'@typescript-eslint/ban-types': [ | ||
// https://github.com/xojs/eslint-config-xo-typescript/blob/9791a067d6a119a21a4db72c02f1da95e25ffbb6/index.js#L95 | ||
'@typescript-eslint/no-restricted-types': [ | ||
'error', | ||
{ | ||
extendDefaults: false, | ||
types: { | ||
String: { | ||
message: 'Use `string` instead.', | ||
fixWith: 'string', | ||
}, | ||
Number: { | ||
message: 'Use `number` instead.', | ||
fixWith: 'number', | ||
}, | ||
Boolean: { | ||
message: 'Use `boolean` instead.', | ||
fixWith: 'boolean', | ||
}, | ||
Symbol: { | ||
message: 'Use `symbol` instead.', | ||
fixWith: 'symbol', | ||
}, | ||
BigInt: { | ||
message: 'Use `bigint` instead.', | ||
fixWith: 'bigint', | ||
}, | ||
Object: { | ||
message: | ||
'The `Object` type is mostly the same as `unknown`. You probably want `Record<string, unknown>` instead. See https://github.com/typescript-eslint/typescript-eslint/pull/848', | ||
fixWith: 'Record<string, unknown>', | ||
}, | ||
// TODO(scttcper): Turn these on to make our types more strict | ||
// TODO(scttcper): Turn object on to make our types more strict | ||
// object: { | ||
// message: 'The `object` type is hard to use. Use `Record<string, unknown>` instead. See: https://github.com/typescript-eslint/typescript-eslint/pull/848', | ||
// fixWith: 'Record<string, unknown>' | ||
// message: 'The `object` type is hard to use. Use `Record<string, unknown>` instead. See: https://github.com/typescript-eslint/typescript-eslint/pull/848', | ||
// fixWith: 'Record<string, unknown>' | ||
// }, | ||
// Function: 'Use a specific function type instead, like `() => void`.', | ||
Buffer: { | ||
message: | ||
'Use Uint8Array instead. See: https://sindresorhus.com/blog/goodbye-nodejs-buffer', | ||
suggest: ['Uint8Array'], | ||
}, | ||
'[]': "Don't use the empty array type `[]`. It only allows empty arrays. Use `SomeType[]` instead.", | ||
'[[]]': | ||
"Don't use `[[]]`. It only allows an array with a single element which is an empty array. Use `SomeType[][]` instead.", | ||
'[[[]]]': "Don't use `[[[]]]`. Use `SomeType[][][]` instead.", | ||
}, | ||
}, | ||
], | ||
// TODO(scttcper): Turn no-empty-object-type on to make our types more strict | ||
// '@typescript-eslint/no-empty-object-type': 'error', | ||
// TODO(scttcper): Turn no-function on to make our types more strict | ||
// '@typescript-eslint/no-unsafe-function-type': 'error', | ||
'@typescript-eslint/no-wrapper-object-types': 'error', | ||
Comment on lines
+247
to
+251
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. ban-types is now a mix of no-restricted-types and these others that could be enabled. would be nice to ban Function type. it s the same as |
||
|
||
// Naming convention enforcements | ||
'@typescript-eslint/naming-convention': [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
biome kept running and throwing errors? we don't inherit the biome lint rules though