-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
47 lines (46 loc) · 1.35 KB
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/** @type {import('eslint').Linter.Config} */
import ts from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import react from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import jsxa11y from 'eslint-plugin-jsx-a11y';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
export default [
{
ignores: ['public/*'],
},
{
files: ['app/**/*.{ts,tsx}'],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaFeatures: { jsx: true, jsxPragma: null },
ecmaVersion: 'latest',
project: './tsconfig.json',
},
},
plugins: {
'@typescript-eslint': ts,
react,
'react-hooks': reactHooks,
'jsx-a11y': jsxa11y,
},
rules: {
...ts.configs['eslint-recommended'].rules,
...ts.configs['recommended'].rules,
...react.configs['recommended'].rules,
...react.configs['jsx-runtime'].rules,
...jsxa11y.configs['recommended'].rules,
...reactHooks.configs['recommended'].rules,
'@typescript-eslint/no-explicit-any': 'warn',
'jsx-a11y/click-events-have-key-events': 'warn',
'jsx-a11y/no-noninteractive-element-interactions': 'warn',
},
settings: {
react: {
version: 'detect',
},
},
},
eslintPluginPrettierRecommended,
];