Files
website/eslint.config.mjs

53 lines
1.2 KiB
JavaScript

import tsPlugin from '@typescript-eslint/eslint-plugin'
import tsParser from '@typescript-eslint/parser'
import reactRefresh from 'eslint-plugin-react-refresh'
import reactHooks from 'eslint-plugin-react-hooks'
import globals from 'globals'
import js from '@eslint/js'
import prettierRecommended from 'eslint-plugin-prettier/recommended'
export default [
{
ignores: ['coverage', '**/dist', '**/.eslintrc.cjs', 'eslint.config.mjs', 'public/mockServiceWorker.js'],
},
js.configs.recommended,
...tsPlugin.configs['flat/recommended'],
reactHooks.configs.flat['recommended-latest'],
prettierRecommended,
{
plugins: {
'react-refresh': reactRefresh,
},
languageOptions: {
globals: {
...globals.browser,
},
parser: tsParser,
ecmaVersion: 'latest',
sourceType: 'module',
parserOptions: {
project: ['./tsconfig.json', './tsconfig.base.json'],
tsconfigRootDir: import.meta.dirname,
},
},
settings: {
react: {
version: 'detect',
},
},
rules: {
'react-refresh/only-export-components': [
'warn',
{
allowConstantExport: true,
},
],
},
},
]