-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy patheslint.config.mjs
67 lines (60 loc) · 1.64 KB
/
eslint.config.mjs
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
65
66
67
// @ts-check
// eslint-disable-next-line import-x/no-extraneous-dependencies
import {
completeConfigBase,
completeConfigMonorepo,
} from "eslint-config-complete";
import tseslint from "typescript-eslint";
import { isaacScriptModConfigBase } from "../eslint-config-isaacscript/src/mod.js";
// @ts-expect-error https://github.com/jrdrg/eslint-plugin-sort-exports/issues/44
import ESLintPluginSortExports from "eslint-plugin-sort-exports";
export default tseslint.config(
...completeConfigBase,
...completeConfigMonorepo,
...isaacScriptModConfigBase,
{
plugins: {
/** The `sort-exports` rule is used in some specific files. */
"sort-exports": ESLintPluginSortExports,
},
rules: {
/** Not defined in the parent configs. */
"@typescript-eslint/explicit-member-accessibility": [
"warn",
{
overrides: {
constructors: "off",
},
},
],
/**
* Defined at: mod.js
*
* Since we transpile this library to both Lua and JavaScript, we need to re-enable this lint
* rule.
*/
"@typescript-eslint/require-array-sort-compare": "warn",
},
},
{
files: ["src/functions/**"],
rules: {
/** Not defined in the parent configs. */
"sort-exports/sort-exports": [
"warn",
{
sortDir: "asc",
},
],
},
},
{
ignores: [
// When building and linting at the same time, the "indexLua.ts" file can cause a linting
// error.
"src/indexLua.ts",
// Ignore files that were transpiled from Lua to JavaScript.
"src/lib/jsonLua.js",
],
},
);