-
Notifications
You must be signed in to change notification settings - Fork 3
/
eslint.config.js
50 lines (49 loc) · 1.32 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
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: ["**/*.js"],
rules: {
...jsdoc.configs.recommended.rules,
"jsdoc/check-indentation": "error",
"jsdoc/check-line-alignment": "error",
"jsdoc/check-syntax": "error",
"jsdoc/convert-to-jsdoc-comments": "warn",
"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",
{
publicOnly: true,
require: {
ArrowFunctionExpression: true,
ClassDeclaration: true,
ClassExpression: true,
FunctionDeclaration: true,
FunctionExpression: true,
MethodDefinition: true,
},
},
],
"jsdoc/require-throws": "error",
"jsdoc/sort-tags": "warn",
},
},
];