-
Notifications
You must be signed in to change notification settings - Fork 16
/
.eslintrc.js
43 lines (42 loc) · 1.01 KB
/
.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
36
37
38
39
40
41
42
43
const path = require('path')
const pkg = require('./package.json')
module.exports = {
env: {
browser: true,
es6: true,
greasemonkey: true,
},
extends: ['airbnb', 'prettier', 'prettier/react'],
globals: {
preact: true,
GM: true,
},
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
},
plugins: ['prettier', 'react', 'react-hooks'],
rules: {
'prettier/prettier': 'error',
'no-console': 'off',
'react/jsx-props-no-spreading': 'off',
'react/prop-types': 'off',
'jsx-a11y/accessible-emoji': 'off',
'jsx-a11y/label-has-associated-control': ['error', { assert: 'either' }],
'no-unused-vars': ['error', { varsIgnorePattern: '^Fragment$' }],
},
settings: {
'import/core-modules': ['preact', 'preact/hooks'],
'import/resolver': {
alias: {
map: [[pkg.name, path.resolve(__dirname, 'src')]],
extensions: ['.js', '.jsx'],
},
},
react: {
pragma: 'h',
version: '16.2',
},
},
}