-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
38 lines (36 loc) · 844 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
36
37
38
module.exports = {
env: {
node: true,
es2021: true,
},
extends: [
'eslint:recommended',
'plugin:node/recommended',
'plugin:import/recommended',
'prettier',
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {
// Express/Node specific
'no-console': ['warn', { allow: ['log', 'error'] }],
'no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_|next|req|res',
},
],
// Best Practices
eqeqeq: ['error', 'always'],
'no-var': 'error',
'prefer-const': 'warn',
'no-multiple-empty-lines': ['error', { max: 2 }],
// Style
semi: ['error', 'always'],
quotes: ['error', 'single'],
'arrow-body-style': ['error', 'as-needed'],
},
ignorePatterns: ['node_modules/', 'client/', 'public/', '.env', 'docs/'],
};