We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When creating project from template React + TypeScript we got this ESLint config
import js from '@eslint/js' import globals from 'globals' import reactHooks from 'eslint-plugin-react-hooks' import reactRefresh from 'eslint-plugin-react-refresh' import tseslint from 'typescript-eslint' export default tseslint.config( { ignores: ['dist'] }, { extends: [js.configs.recommended, ...tseslint.configs.recommended], files: ['**/*.{ts,tsx}'], languageOptions: { ecmaVersion: 2020, globals: globals.browser, }, plugins: { 'react-hooks': reactHooks, 'react-refresh': reactRefresh, }, rules: { ...reactHooks.configs.recommended.rules, 'react-refresh/only-export-components': [ 'warn', { allowConstantExport: true }, ], }, }, )
I think we should simplify it to this version.
import js from '@eslint/js' import globals from 'globals' import reactHooks from 'eslint-plugin-react-hooks' import reactRefresh from 'eslint-plugin-react-refresh' import tseslint from 'typescript-eslint' export default tseslint.config( { ignores: ['dist'], files: ['**/*.{ts,tsx}'], languageOptions: { ecmaVersion: 2020, globals: globals.browser, }, }, js.configs.recommended, tseslint.configs.recommended, reactHooks.configs['recommended-latest'], reactRefresh.configs.vite, )
This updated version is also more compliant with docs for various packages, i.e.
https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks https://github.com/ArnaudBarre/eslint-plugin-react-refresh
Simplify ESLint config in templates
No response
The text was updated successfully, but these errors were encountered:
Probably it makes sense to wait for it to be supported in the JS variant too before doing that: #19524 (comment)
Sorry, something went wrong.
@bluwy ESLint now supports extends
extends
Feel free to send a PR 👍
No branches or pull requests
Description
When creating project from template React + TypeScript we got this ESLint config
I think we should simplify it to this version.
This updated version is also more compliant with docs for various packages, i.e.
https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks
https://github.com/ArnaudBarre/eslint-plugin-react-refresh
Suggested solution
Simplify ESLint config in templates
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: