Bump typedoc from 0.20.29 to 0.20.30 (#256)
[poolifier.git] / .eslintrc.js
CommitLineData
777b7824
S
1module.exports = {
2 env: {
3 es2021: true,
4 node: true,
5 mocha: true
6 },
7 parser: '@typescript-eslint/parser',
8 parserOptions: {
fa699c42 9 ecmaVersion: 2020,
e06dcd52
S
10 sourceType: 'module',
11 warnOnUnsupportedTypeScriptVersion: false
777b7824 12 },
5c5a1fb7
S
13 plugins: [
14 '@typescript-eslint',
15 'promise',
16 'prettierx',
17 'jsdoc',
18 'spellcheck'
19 ],
777b7824
S
20 extends: [
21 'standard',
22 'eslint:recommended',
23 'plugin:@typescript-eslint/recommended',
fa699c42
JB
24 'plugin:import/errors',
25 'plugin:import/warnings',
26 'plugin:import/typescript',
583a27ce 27 'plugin:promise/recommended',
777b7824 28 'plugin:prettierx/standardx',
583a27ce 29 'plugin:prettierx/@typescript-eslint'
777b7824
S
30 ],
31 rules: {
32 'no-void': 'off',
33
777b7824
S
34 // We have some intentionally empty functions
35 '@typescript-eslint/no-empty-function': 'off',
36
37 '@typescript-eslint/no-inferrable-types': [
38 'error',
39 { ignoreProperties: true }
fa699c42
JB
40 ],
41
42 'sort-imports': [
43 'warn',
44 {
45 ignoreMemberSort: true,
50aa7901 46 ignoreDeclarationSort: true
fa699c42 47 }
5c5a1fb7
S
48 ],
49
50 'spellcheck/spell-checker': [
51 'warn',
52 {
53 skipWords: [
5c5a1fb7
S
54 'christopher',
55 'ecma',
3832ad95 56 'enum',
a35560ba 57 'inheritdoc',
5c5a1fb7 58 'jsdoc',
3832ad95 59 'pioardi',
a35560ba 60 'poolifier',
5c5a1fb7
S
61 'readonly',
62 'serializable',
63 'unregister',
64 'workerpool'
65 ],
66 skipIfMatch: ['^@.*', '^plugin:.*']
67 }
777b7824 68 ]
3c5eaeb9
JB
69 },
70 overrides: [
50eceb07
S
71 {
72 files: ['src/**/*.ts'],
73 extends: 'plugin:jsdoc/recommended',
74 rules: {
a35560ba
S
75 'no-useless-constructor': 'off',
76
3832ad95
S
77 'jsdoc/match-description': [
78 'warn',
79 {
80 mainDescription:
81 '/^[A-Z`].+?(\\.|:)(\\n\\n.*((\\n{1,2}- .+)|(_.+_)|`.+`|\\n\\n---))?$/us',
82 matchDescription: '^[A-Z`].+(\\.|`.+`)$',
83 contexts: ['any'],
84 tags: {
85 param: true,
86 returns: true
87 }
88 }
89 ],
50eceb07 90 'jsdoc/no-types': 'error',
3832ad95
S
91 'jsdoc/require-jsdoc': [
92 'warn',
93 {
94 contexts: [
95 'ClassDeclaration',
96 'ClassProperty:not([accessibility=/(private|protected)/])',
97 'ExportNamedDeclaration:has(VariableDeclaration)',
98 'FunctionExpression',
99 'MethodDefinition:not([accessibility=/(private|protected)/]) > FunctionExpression',
100 'TSEnumDeclaration',
101 'TSInterfaceDeclaration',
102 'TSMethodSignature',
103 // 'TSPropertySignature',
104 'TSTypeAliasDeclaration'
105 ]
106 }
107 ],
50eceb07
S
108 'jsdoc/require-param-type': 'off',
109 'jsdoc/require-returns-type': 'off'
110 }
111 },
3c5eaeb9
JB
112 {
113 files: ['*.js'],
583a27ce 114 extends: 'plugin:node/recommended',
3c5eaeb9 115 rules: {
fa699c42 116 '@typescript-eslint/no-unused-vars': 'off',
3c5eaeb9
JB
117 '@typescript-eslint/no-var-requires': 'off'
118 }
fa699c42
JB
119 },
120 {
583a27ce 121 files: ['examples/typescript/**/*.ts'],
fa699c42
JB
122 rules: {
123 'import/no-unresolved': 'off'
124 }
583a27ce
JB
125 },
126 {
127 files: ['examples/**/*.js'],
128 rules: {
129 'node/no-missing-require': 'off'
130 }
3c5eaeb9 131 }
3832ad95
S
132 ],
133 settings: {
134 jsdoc: {
135 mode: 'typescript'
136 }
137 }
777b7824 138}