-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.cjs
82 lines (78 loc) · 2.09 KB
/
.eslintrc.cjs
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
const MAX_LINE_LENGTH = 120;
const TAB_WIDTH = 4;
module.exports = {
root: true,
env: { jest: true },
parserOptions: {
ecmaVersion: 'latest',
},
plugins: [
'import',
'import-newlines',
],
extends: [
'eslint:recommended',
'airbnb-base',
'plugin:jsdoc/recommended',
],
ignorePatterns: [
'dist',
'coverage',
'examples',
],
rules: {
'max-len': [
'error',
{
code: MAX_LINE_LENGTH,
comments: MAX_LINE_LENGTH,
tabWidth: TAB_WIDTH,
ignoreUrls: true,
ignoreTrailingComments: false,
ignoreComments: false,
},
],
indent: [
'error',
TAB_WIDTH,
{
SwitchCase: 1,
},
],
'arrow-body-style': 'off',
'no-await-in-loop': 'off',
'no-continue': 'off',
'no-new': 'off',
'no-restricted-syntax': ['error', 'LabeledStatement', 'WithStatement'],
'import/prefer-default-export': 'off',
'import-newlines/enforce': ['error', { items: 3, 'max-len': MAX_LINE_LENGTH }],
// Split external and internal imports with an empty line
'import/order': [
'error',
{
groups: [
['builtin', 'external'],
],
'newlines-between': 'always',
},
],
'jsdoc/multiline-blocks': ['error', { noSingleLineBlocks: true }],
'jsdoc/require-param-type': 'off',
'jsdoc/require-returns-type': 'off',
'jsdoc/tag-lines': [
'warn',
'any',
{
startLines: 1,
},
],
'jsdoc/check-tag-names': [
'warn',
{
// Define additional tags
// https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-tag-names.md#definedtags
definedTags: ['note'],
},
],
},
};