-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[core] Update @typescript-eslint/*
packages and remove deprecated eslint-config-airbnb-typescript
package
#45245
[core] Update @typescript-eslint/*
packages and remove deprecated eslint-config-airbnb-typescript
package
#45245
Conversation
Netlify deploy previewhttps://deploy-preview-45245--material-ui.netlify.app/ Bundle size report |
@typescript-eslint/*
packages and remove eslint-config-airbnb-typescript
@typescript-eslint/*
packages and remove deprecated eslint-config-airbnb-typescript
package
args: 'after-used', | ||
ignoreRestSiblings: true, | ||
argsIgnorePattern: '^_', | ||
caughtErrors: 'none', |
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.
Override caughtErrors
to none
here to avoid an unused error
parameter eslint error in the catch block. It's a breaking change in v8—the default is changed to all
. See https://typescript-eslint.io/blog/announcing-typescript-eslint-v8/#rule-breaking-changes. So I had to override it.
Just to get us started on properly abstracting the basic rules, can this go in its own file and use the diff --git a/.eslintrc.js b/.eslintrc.js
index 24f8b126a7..7b402f1b33 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -64,7 +64,7 @@ module.exports = /** @type {Config} */ ({
'plugin:eslint-plugin-import/recommended',
'plugin:eslint-plugin-import/typescript',
'eslint-config-airbnb',
- 'eslint-config-airbnb-typescript',
+ './eslint/config-airbnb-typescript.js',
'eslint-config-prettier',
],
parser: '@typescript-eslint/parser', |
@Janpot Done. |
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.
👍 Thanks, let's go with this for now. We'll revisit the abstractions once we move to flat config
Resolves #44532
Part of mui/mui-public#264
I have applied the rules from
eslint-config-airbnb-typescript
here.For the record, these style rules which were applied in
eslint-config-airbnb-typescript
are no longer supported in@typescript-eslint/eslint-plugin
and they have moved it tostylistic
:comma-dangle
brace-style
comma-spacing
func-call-spacing
indent
keyword-spacing
lines-between-class-members
no-extra-parens
no-extra-semi
space-before-blocks
quotes
semi
space-before-function-paren
space-infix-ops
object-curly-spacing
These should be handle by Prettier.
Questions:
eslint-config-airbnb-base
and directly hardcode the rules here? The rules options will be the same.@typescript-eslint
' srecommended
preset?