Skip to content

Commit

Permalink
update eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisc64 committed Aug 17, 2024
1 parent a43636e commit d185f06
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 21 deletions.
21 changes: 0 additions & 21 deletions quick-pokemon-type-matchup/.eslintrc.cjs

This file was deleted.

38 changes: 38 additions & 0 deletions quick-pokemon-type-matchup/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import js from '@eslint/js'
import globals from 'globals'
import react from 'eslint-plugin-react'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'

export default [
{ ignores: ['dist'] },
{
files: ['**/*.{js,jsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
},
settings: { react: { version: '18.3' } },
plugins: {
react,
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...js.configs.recommended.rules,
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
...reactHooks.configs.recommended.rules,
'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
]

0 comments on commit d185f06

Please sign in to comment.