-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
35 lines (33 loc) · 889 Bytes
/
.eslintrc.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
const { defineConfig } = require('eslint-define-config')
const options = defineConfig({
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
'@antfu/eslint-config-ts',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
],
plugins: ['jsx-a11y', 'react', 'react-hooks', 'simple-import-sort'],
rules: {
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'import/order': 'off',
'sort-imports': 'off',
'jsx-quotes': ['error', 'prefer-double'],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'react/react-in-jsx-scope': 'off',
'@typescript-eslint/brace-style': ['error', '1tbs'],
'curly': ['error', 'all'],
},
settings: {
react: {
version: 'detect',
},
},
})
module.exports = options