-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
41 lines (39 loc) · 1.07 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
import globals from 'globals'
import pluginJs from '@eslint/js'
import pluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
import pluginUnicorn from 'eslint-plugin-unicorn'
import babelParser from '@babel/eslint-parser'
export default [
pluginJs.configs.recommended,
pluginPrettierRecommended,
{
languageOptions: {
globals: {
...globals.browser,
...globals.mocha,
},
parser: babelParser,
},
plugins: {
unicorn: pluginUnicorn,
},
rules: {
'unicorn/no-lonely-if': 'error',
'unicorn/no-array-for-each': 'error',
'unicorn/no-nested-ternary': 'error',
'unicorn/no-new-array': 'error',
'unicorn/no-unused-properties': 'error',
'unicorn/no-useless-length-check': 'error',
'unicorn/prefer-array-some': 'error',
'unicorn/prefer-includes': 'error',
'unicorn/prefer-module': 'error',
'unicorn/prefer-number-properties': 'error',
'unicorn/prefer-query-selector': 'error',
'unicorn/prefer-switch': 'error',
'unicorn/prefer-ternary': 'error',
},
},
{
ignores: ['.babelrc.cjs', '.yarn/', 'public/main.js'],
},
]