-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
43 lines (42 loc) · 1.39 KB
/
Copy patheslint.config.mjs
File metadata and controls
43 lines (42 loc) · 1.39 KB
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
import pluginJs from '@eslint/js'
import eslintPluginImport from 'eslint-plugin-import'
import simpleImportSort from 'eslint-plugin-simple-import-sort'
import unusedImports from 'eslint-plugin-unused-imports'
import globals from 'globals'
import tseslint from 'typescript-eslint'
import eslintPluginReact from 'eslint-plugin-react';
import eslintPluginReactHooks from 'eslint-plugin-react-hooks';
import { fixupPluginRules } from '@eslint/compat'
export default [
pluginJs.configs.recommended,
...tseslint.configs.recommended,
{
ignores: ['dist', 'node_modules', 'coverage'],
plugins: {
'eslint-plugin-import': eslintPluginImport,
'simple-import-sort': simpleImportSort,
'unused-imports': unusedImports,
'react': eslintPluginReact,
'react-hooks': fixupPluginRules(eslintPluginReactHooks),
},
languageOptions: {
parserOptions: { ecmaFeatures: { jsx: true } },
globals: { ...globals.browser },
},
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'interface-name-prefix': 'off',
'explicit-function-return-type': 'off',
'explicit-module-boundary-types': 'off',
'simple-import-sort/imports': 'error',
'unused-imports/no-unused-imports': 'error',
camelcase: [
'error',
{
properties: 'never',
},
],
...eslintPluginReactHooks.configs.recommended.rules,
},
},
]