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

deps: Upgrade various packages #208

Merged
merged 9 commits into from
Oct 10, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ jobs:
SENTRY_ESLINT_RELAXED: 1
run: |
cd sentry
yarn lint
Copy link
Member Author

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

yarn lint:prettier && yarn lint:js && yarn lint:css
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"release": "yarn lerna exec -- yarn && yarn lerna version minor --conventional-commits"
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@biomejs/biome": "^1.9.3",
"lerna": "3.20.2"
},
"repository": "getsentry/eslint-config-sentry",
Expand Down
52 changes: 20 additions & 32 deletions packages/eslint-config-sentry-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -86,6 +89,8 @@ module.exports = {
//
varsIgnorePattern: '^_',
argsIgnorePattern: '^_',
argsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
},
],

Expand Down Expand Up @@ -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
Copy link
Member Author

@scttcper scttcper Oct 10, 2024

Choose a reason for hiding this comment

The 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 (...any) => any


// Naming convention enforcements
'@typescript-eslint/naming-convention': [
Expand Down
16 changes: 8 additions & 8 deletions packages/eslint-config-sentry-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@
},
"homepage": "https://github.com/getsentry/eslint-config-sentry#readme",
"dependencies": {
"@emotion/eslint-plugin": "^11.11.0",
"@typescript-eslint/eslint-plugin": "^7.14.1",
"@typescript-eslint/parser": "^7.14.1",
"@emotion/eslint-plugin": "^11.12.0",
"@typescript-eslint/eslint-plugin": "^8.8.1",
"@typescript-eslint/parser": "^8.8.1",
"eslint-config-sentry": "^2.8.0",
"eslint-config-sentry-react": "^2.8.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^28.6.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest": "^28.8.3",
"eslint-plugin-no-lookahead-lookbehind-regexp": "0.1.0",
"eslint-plugin-react": "^7.34.3",
"eslint-plugin-react": "^7.37.1",
"eslint-plugin-sentry": "^2.8.0",
"eslint-plugin-simple-import-sort": "^12.1.0"
"eslint-plugin-simple-import-sort": "^12.1.1"
},
"volta": {
"node": "20.10.0",
Expand Down
Loading
Loading