This repository was archived by the owner on Feb 18, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
58 lines (57 loc) · 1.56 KB
/
eslint.config.mjs
File metadata and controls
58 lines (57 loc) · 1.56 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import pluginJs from "@eslint/js";
import regexp_plugin from "eslint-plugin-regexp";
import security from "eslint-plugin-security";
import globals from "globals";
import ts_eslint from "typescript-eslint";
/** @type {import('eslint').Linter.Config[]} */
export default [
{
files: ["tests/**/*.ts"],
languageOptions: {
globals: {
...globals.node,
},
},
},
{
ignores: [
"build",
"coverage",
"dist",
"vendor",
"node_modules",
"*.cjs",
"**/*.cjs",
],
},
pluginJs.configs.recommended,
...ts_eslint.configs.recommended,
...ts_eslint.configs.strict,
regexp_plugin.configs["flat/recommended"],
{
plugins: {
security,
},
rules: {
"@typescript-eslint/no-shadow": "error",
"security/detect-object-injection": "warn",
"security/detect-non-literal-require": "warn",
"security/detect-eval-with-expression": "error",
"security/detect-non-literal-regexp": "warn",
"security/detect-unsafe-regex": "error",
"security/detect-buffer-noassert": "error",
"security/detect-child-process": "warn",
"security/detect-disable-mustache-escape": "error",
"security/detect-no-csrf-before-method-override": "error",
"security/detect-possible-timing-attacks": "warn",
"security/detect-pseudoRandomBytes": "error",
},
},
{
files: ["**/*.test.ts"],
rules: {
"@typescript-eslint/no-non-null-assertion": "off",
"security/detect-object-injection": "off", // False positives on array indexing in tests
},
},
];