-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.js
37 lines (35 loc) · 925 Bytes
/
.eslintrc.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
/**
* This is a very stripped-down eslintrc, because @khanacademy/eslint-config
* assumes you're using react & flow (and requires a lot of dependencies along
* with it).
*/
const khan = require("@khanacademy/eslint-config");
// Only keep the rules that have no prefix (so are included in eslint core)
// and the prettier rule.
const basicRules = {};
Object.keys(khan.rules).forEach((key) => {
if (!key.includes("/") || key.startsWith("prettier/")) {
basicRules[key] = khan.rules[key];
}
});
module.exports = {
extends: ["eslint:recommended", "prettier"],
plugins: ["prettier"],
rules: basicRules,
env: {
node: true,
jest: true,
},
parserOptions: {
sourceType: "module",
ecmaVersion: 2022,
},
overrides: [
{
files: "utils/*",
rules: {
"no-console": "off",
},
},
],
};