-
Notifications
You must be signed in to change notification settings - Fork 137
chore: update eslint to v9 #1439
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
Changes from 1 commit
c614a12
d7c5f6d
206ce7a
84dbe32
20c3730
d67af38
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| import react from 'eslint-plugin-react'; | ||
| import globals from 'globals'; | ||
|
|
||
| import apify from '@apify/eslint-config'; | ||
|
|
||
| export default [ | ||
| { | ||
| ignores: ['**/dist', 'node_modules', '.docusaurus', 'build', 'sources/api'], | ||
| }, | ||
| ...apify, | ||
| { | ||
| languageOptions: { | ||
| parserOptions: { | ||
| project: 'tsconfig.eslint.json', | ||
| }, | ||
| }, | ||
| }, | ||
|
Comment on lines
+11
to
+17
Member
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. I'm not fully sure if this works, in my own project I had to do something like this to define tsconfig for the rules but maybe it works without it anymore
Member
Author
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. i believe it does, without it i get warnings like and before I've added the sources and examples folders it was complaining about that like so i guess this is enough (and the CI confirms that)
Member
Author
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. i guess its because the apify eslint config is using that plugin https://github.com/apify/apify-eslint-config/blob/master/index.js#L145 |
||
| { | ||
| rules: { | ||
| '@typescript-eslint/consistent-type-imports': 'off', | ||
| 'no-promise-executor-return': 'off', | ||
| '@typescript-eslint/no-explicit-any': 'off', | ||
| 'no-param-reassign': 'off', | ||
| 'no-void': 'off', | ||
| 'no-console': 'off', | ||
| 'no-unused-vars': 'off', | ||
| 'import/no-extraneous-dependencies': 'off', | ||
| 'import/extensions': 'off', | ||
| 'import/no-default-export': 'off', | ||
| 'quote-props': ['error', 'consistent'], | ||
| }, | ||
| }, | ||
| { | ||
| files: ['**/*.{js,jsx,mjs,cjs,ts,tsx}'], | ||
| plugins: { | ||
| react, | ||
| }, | ||
| languageOptions: { | ||
| parserOptions: { | ||
| ecmaFeatures: { | ||
| jsx: true, | ||
| }, | ||
| }, | ||
| globals: { | ||
| ...globals.browser, | ||
| }, | ||
| }, | ||
| rules: { | ||
| // ... any rules you want | ||
| 'react/jsx-uses-react': 'error', | ||
| 'react/jsx-uses-vars': 'error', | ||
| }, | ||
| // ... others are omitted for brevity | ||
| }, | ||
| ]; | ||
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.
I have a hunch this might be why the
apify-sdk-pythondocs build is stalling, as returning an index from the visitor means "continue by visiting my n-th sibling", which, with 0, might potentially cause an infinite loop.Was this a quick eslint's
consistent-returnfix, or did you have a deeper reason for this? 😅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.
Yeah, exactly, feel free to revert that.
Mixed return types are evil, especially in vanilla JS. This is just another proof :D