-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy path.eslintrc.cjs
64 lines (46 loc) · 1.98 KB
/
.eslintrc.cjs
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
59
60
61
62
63
64
// This is the configuration file for ESLint, the TypeScript linter:
// https://eslint.org/docs/latest/use/configure/
/** @type {import("eslint").Linter.Config} */
const config = {
extends: [
// The linter base is the shared IsaacScript config:
// https://github.com/IsaacScript/isaacscript/blob/main/packages/eslint-config-isaacscript/base.js
"eslint-config-isaacscript/base",
],
// Don't bother linting compiled output.
ignorePatterns: ["**/dist/**", "*.min.js"],
parserOptions: {
// ESLint needs to know about the project's TypeScript settings in order for TypeScript-specific
// things to lint correctly. We do not point this at "./tsconfig.json" because certain files
// (such at this file) should be linted but not included in the actual project output.
project: "./tsconfig.eslint.json",
},
rules: {
// Insert changed or disabled rules here, if necessary.
// @template-customization-start
// We use old JQuery methods.
"deprecation/deprecation": "off",
// This project has cyclical dependencies.
"import/no-cycle": "off",
// Electron is supposed to be in "devDependencies".
"import/no-extraneous-dependencies": "off",
// This project uses IsaacScript-style enum members so that it can be consistent with the mod.
"isaacscript/consistent-enum-values": "off",
// Electron does not support ESM yet.
"n/file-extension-in-import": "off",
// Electron is supposed to be in "devDependencies".
"n/no-unpublished-import": "off",
// This project uses null.
"unicorn/no-null": "off",
// This project uses legacy methods for event listening.
"unicorn/prefer-add-event-listener": "off",
// This rule throws too many false positives.
"prefer-destructuring": "off",
// Electron does not support ESM yet.
"unicorn/prefer-module": "off",
// This rule throws too many false positives.
"unicorn/prefer-ternary": "off",
// @template-customization-end
},
};
module.exports = config;