-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy patheslint.config.js
40 lines (38 loc) · 1.57 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
const globals = require('globals')
const js = require('@eslint/js')
const baseConfig = {
files: ['**/*.js'],
languageOptions: {
ecmaVersion: 'latest',
globals: {
...globals.jest,
...globals.node,
}
},
rules: {
...js.configs.recommended.rules,
'array-bracket-spacing': ['error', 'never'],
'arrow-parens': ['error', 'as-needed'],
'arrow-spacing': 'error',
'brace-style': ['error', '1tbs', {allowSingleLine: true}],
'comma-spacing': ['error', {before: false, after: true}],
'computed-property-spacing': ['error', 'never'],
'eol-last': ['error', 'always'],
'indent': ['error', 4],
'key-spacing': ['error', {beforeColon: false, afterColon: true, mode: 'strict'}],
'linebreak-style': ['error', 'unix'],
'no-console': ['error', {allow: ['info', 'warn', 'error']}],
'no-multi-spaces': ['error', {ignoreEOLComments: true}],
'no-multiple-empty-lines': ['error', {max: 1, maxBOF: 0, maxEOF: 1}],
'no-trailing-spaces': ['error', {skipBlankLines: true, ignoreComments: false}],
'no-unused-vars': ['error', {argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_'}],
'object-curly-spacing': ['error', 'never'],
'quotes': ['error', 'single'],
'semi': ['error', 'never'],
'space-before-blocks': 'error',
'space-in-parens': ['error', 'never'],
'space-infix-ops': 'error',
'template-curly-spacing': 'error'
}
}
module.exports = [baseConfig]