generated from rustworthy/npm-javascript-starter-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
54 lines (54 loc) · 1.29 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
44
45
46
47
48
49
50
51
52
53
54
module.exports = {
plugins: ['prettier', 'unused-imports', 'import'],
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
},
extends: ['plugin:prettier/recommended'],
root: true,
env: {
node: true,
jest: true,
es6: true,
},
settings: {
'import/resolver': {
typescript: true,
node: {
extensions: ['.js', 'ts'],
},
},
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'array-bracket-spacing': 'error',
'arrow-parens': ['error', 'always'],
'arrow-spacing': 'error',
camelcase: 'error',
'no-console': 'error',
'no-debugger': 'error',
'no-duplicate-case': 'error',
'no-unused-vars': ['error', { vars: 'all', args: 'after-used', ignoreRestSiblings: false }],
'no-undef': ['error', { typeof: true }],
'object-curly-spacing': ['error', 'always'],
'prefer-const': 'error',
semi: ['error', 'always'],
'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal'],
'newlines-between': 'always',
},
],
'comma-spacing': ['error', { before: false, after: true }],
quotes: [
'error',
'single',
{
avoidEscape: false,
allowTemplateLiterals: true,
},
],
'unused-imports/no-unused-imports': 'error',
},
};