-
Notifications
You must be signed in to change notification settings - Fork 153
/
eslint.config.js
53 lines (52 loc) · 1.43 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
41
42
43
44
45
46
47
48
49
50
51
52
53
const { configs: eslintConfigs } = require("@eslint/js");
const eslintPluginPrettierRecommended = require("eslint-plugin-prettier/recommended");
const globals = require("globals");
const jsdoc = require("eslint-plugin-jsdoc");
module.exports = [
{
languageOptions: {
globals: {
...globals.node,
...globals.mocha,
},
},
},
eslintConfigs.recommended,
eslintPluginPrettierRecommended,
{
plugins: {
jsdoc,
},
files: ["src/**/*.js", "index.js"],
rules: {
...jsdoc.configs.recommended.rules,
"jsdoc/check-indentation": "error",
"jsdoc/check-line-alignment": "error",
"jsdoc/check-syntax": "error",
"jsdoc/convert-to-jsdoc-comments": "error",
"jsdoc/no-bad-blocks": "error",
"jsdoc/no-blank-block-descriptions": "error",
"jsdoc/no-blank-blocks": "error",
"jsdoc/require-asterisk-prefix": "error",
"jsdoc/require-jsdoc": [
"error",
{
checkGetters: false,
checkSetters: false,
publicOnly: true,
require: {
ArrowFunctionExpression: true,
ClassDeclaration: true,
ClassExpression: true,
FunctionDeclaration: true,
FunctionExpression: true,
MethodDefinition: true,
},
},
],
"jsdoc/require-throws": "error",
"jsdoc/sort-tags": "error",
"jsdoc/tag-lines": "off",
},
},
];