-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.cjs
More file actions
44 lines (42 loc) · 1.48 KB
/
eslint.config.cjs
File metadata and controls
44 lines (42 loc) · 1.48 KB
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
"use strict";
const js = require("@eslint/js");
const globals = require("globals");
const { defineConfig } = require("eslint/config");
const eslintPluginSecurity = require("eslint-plugin-security");
module.exports = defineConfig([
{
name: "docs-as-code-tools/markdownlint-rules",
files: ["markdownlint-rules/**/*.js"],
plugins: { js, security: eslintPluginSecurity },
extends: ["js/recommended"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "script",
globals: { ...globals.node },
},
rules: {
"max-lines": ["warn", {
max: 500,
skipBlankLines: true,
skipComments: true,
}],
complexity: ["error", { max: 10 }],
"max-depth": ["error", 4],
"max-params": ["warn", 4],
"security/detect-eval-with-expression": "warn",
"security/detect-non-literal-require": "warn",
"security/detect-child-process": "warn",
"security/detect-non-literal-fs-filename": "warn",
"security/detect-new-buffer": "warn",
"security/detect-buffer-noassert": "warn",
"security/detect-disable-mustache-escape": "warn",
"security/detect-no-csrf-before-method-override": "warn",
"security/detect-possible-timing-attacks": "warn",
"security/detect-pseudoRandomBytes": "warn",
"security/detect-bidi-characters": "warn",
"security/detect-non-literal-regexp": "warn",
"security/detect-object-injection": "off",
"security/detect-unsafe-regex": "off",
},
},
]);