-
Notifications
You must be signed in to change notification settings - Fork 20
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
build: configure ESLint for JSDoc types #249
build: configure ESLint for JSDoc types #249
Conversation
|
||
return { | ||
presets: ['@wordpress/babel-preset-default'], | ||
presets: [ '@wordpress/babel-preset-default' ], |
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.
Most the configs didn't follow the linting rules.
"include": [ | ||
".eslintrc.js", | ||
".prettierrc.js", | ||
"babel.config.js", | ||
"jest.config.js", | ||
"webpack.config.js" | ||
] |
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.
Another benefit to this is it lints the config files in the top level now. |
7f7ed04
to
8368936
Compare
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.
LGTM 🚀
What?
ESLint configuration requires some tweaks to work well with JSDoc types.
Why?
Without this changes there are linting errors when importing JSDoc types from other files.
How?
Add the TypeScript import resolver and configure properly.
Details of why
jsconfig.eslint.json
is also necessary can be found here https://typescript-eslint.io/linting/troubleshooting/#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file