Created
November 7, 2024 12:39
-
-
Save dexfs/53d90be4d66fd15f20ffbffcc7dc545b to your computer and use it in GitHub Desktop.
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 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' | |
import eslintPluginPrettier from "eslint-plugin-prettier"; | |
import prettierConfig from 'eslint-config-prettier'; | |
export default tseslint.config( | |
{ ignores: ['dist'] }, | |
{ | |
extends: [ | |
js.configs.recommended, | |
...tseslint.configs.recommended, | |
prettierConfig | |
], | |
files: ['**/*.{ts,tsx}'], | |
languageOptions: { | |
ecmaVersion: 2020, | |
globals: globals.browser, | |
}, | |
plugins: { | |
'react-hooks': reactHooks, | |
'react-refresh': reactRefresh, | |
'prettier': eslintPluginPrettier | |
}, | |
rules: { | |
...reactHooks.configs.recommended.rules, | |
'react-refresh/only-export-components': [ | |
'warn', | |
{ allowConstantExport: true }, | |
], | |
'prettier/prettier': 'warn' | |
}, | |
}, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment