-
Notifications
You must be signed in to change notification settings - Fork 4
/
eslint.config.mjs
45 lines (44 loc) · 1.11 KB
/
eslint.config.mjs
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
// @ts-check
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import globals from 'globals';
import react from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';
import prettierConfig from 'eslint-config-prettier';
import { fixupPluginRules } from '@eslint/compat';
export default tseslint.config(
{
// config with just ignores is the replacement for `.eslintignore`
ignores: ['dist/**']
},
{ languageOptions: { globals: globals.node } },
{
files: ['**/*.{ts,tsx}'],
languageOptions: {
parserOptions: {
ecmaFeatures: {
jsx: true
}
}
},
settings: {
react: {
version: 'detect'
}
},
plugins: {
'react': fixupPluginRules(react),
'react-hooks': reactHooks
},
extends: [js.configs.recommended, ...tseslint.configs.recommended],
rules: {
...prettierConfig.rules,
...react.configs.recommended.rules,
...reactHooks.configs.recommended.rules,
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-var-requires': 'off',
'no-case-declarations': 'off'
}
}
);