-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy patheslint.config.js
More file actions
36 lines (34 loc) · 1.1 KB
/
eslint.config.js
File metadata and controls
36 lines (34 loc) · 1.1 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
"use strict";
const js = require("@eslint/js");
const jestPlugin = require("eslint-plugin-jest");
const prettierConfig = require("eslint-config-prettier");
const globals = require("globals");
module.exports = [
{
ignores: ["node_modules/", ".idea/", "temp/", "docs/vendor/", "docs/_site/", "out/", "default-env.json"],
},
js.configs.recommended,
jestPlugin.configs["flat/recommended"],
prettierConfig,
{
languageOptions: {
ecmaVersion: 2022,
sourceType: "commonjs",
globals: {
...globals.node,
},
},
rules: {
"no-unused-vars": ["error", { argsIgnorePattern: "req|res|next", caughtErrors: "none" }],
"no-eval": ["error"], // security
"no-implied-eval": ["error"], // security
"no-console": ["error"], // ops
strict: ["error"],
curly: ["error"],
"no-constant-condition": ["error", { checkLoops: false }],
// NOTE: the jest intended way of adding __mocks__ in the production code structure is not an option for me and this
// is the best alternative I could find.
"jest/no-mocks-import": "off",
},
},
];