-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc
40 lines (39 loc) · 1.42 KB
/
.eslintrc
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
/**
* Loads https://github.com/typhonjs-config/eslint-config/blob/main/esm/2022/browser.js
* Loads https://github.com/typhonjs-fvtt-lib/eslint-config-foundry.js/blob/main/0.8.0.js
*
* NPM: https://www.npmjs.com/package/@typhonjs-config/eslint-config
* NPM: https://www.npmjs.com/package/@typhonjs-fvtt/eslint-config-foundry.js
*/
{
// ESLint configs are prone to particular choices, so if the first config below doesn't work for you then replace
// with one that you do prefer. The second config defines globals defined in `foundry.js` for use w/ `no-shadow`.
"extends": [
"@typhonjs-config/eslint-config/esm/2022/browser",
"@typhonjs-config/eslint-config/esm/2022/no-undefined-types",
"@typhonjs-fvtt/eslint-config-foundry.js"
],
// Prevents overwriting any built in globals particularly from `@typhonjs-fvtt/eslint-config-foundry.js`, but also
// node & browser environments. `event / window.event` shadowing is allowed due to being a common variable name and
// an uncommonly used browser feature.
//
// Note: if you are using Typescript you must use `@typescript-eslint/no-shadow`
"rules": {
"no-shadow": ["error", {
"builtinGlobals": true,
"hoist": "all",
"allow": [
"context",
"debounce",
"document",
"event",
"name",
"parent",
"Plugin", // From ProseMirror
"status",
"toolbar",
"top"
]
}]
}
}