Created
April 3, 2025 04:04
-
-
Save pyratin/1a5632133dc6c0953dd59fad53096327 to your computer and use it in GitHub Desktop.
eslint.config.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import globals from 'globals'; | |
import pluginJs from '@eslint/js'; | |
import tseslint from 'typescript-eslint'; | |
import pluginReact from 'eslint-plugin-react'; | |
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; | |
import eslintPluginReactHooks from 'eslint-plugin-react-hooks'; | |
export default [ | |
{ files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'] }, | |
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } }, | |
pluginJs.configs.recommended, | |
...tseslint.configs.recommended, | |
pluginReact.configs.flat.recommended, | |
eslintPluginReactHooks.configs['recommended-latest'], | |
eslintPluginPrettierRecommended, | |
{ | |
rules: { | |
'no-console': 'error', | |
'@typescript-eslint/no-unused-vars': [ | |
'error', | |
{ ignoreRestSiblings: true } | |
], | |
'@typescript-eslint/no-unused-expressions': [ | |
'error', | |
{ allowShortCircuit: true, allowTernary: true } | |
], | |
'react/no-unknown-property': 'off', | |
'react/prop-types': 'off' | |
} | |
} | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment