forked from EddieDover/fvtt-player-achievements
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
63 lines (60 loc) · 2.26 KB
/
.eslintrc.json
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
/**
* Loads https://github.com/typhonjs-node-config/typhonjs-config-eslint/blob/master/3.0/basic/es8/server/node/.eslintrc
* Loads https://github.com/typhonjs-fvtt/eslint-config-foundry.js/blob/main/0.8.0.js
*
* NPM: https://www.npmjs.com/package/typhonjs-config-eslint
* 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": [
"plugin:unicorn/recommended",
// "eslint:recommended",
"@typhonjs-fvtt/eslint-config-foundry.js/0.8.0",
"plugin:jest/recommended",
"plugin:prettier/recommended",
"plugin:jsdoc/recommended"
],
"plugins": ["jest","unicorn","prettier", "jsdoc"],
"parserOptions": {
"ecmaVersion": 2020,
"extraFileExtensions": [".cjs", ".mjs"],
"sourceType": "module"
},
// Defines / overrides a few more environment parameters not provided in the configs above.
"env": {
"jquery": true,
"browser": true
},
// 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": {
"linebreak-style": ["error", "unix"],
// "no-shadow": ["error", { "builtinGlobals": true, "hoist": "all", "allow": ["event"] }],
// "brace-style": ["error", "1tbs"],
"require-jsdoc": 2,
"require-await": "error",
"no-return-await": "error"
// "quotes": ["error", "double", { "avoidEscape": true }],
// "no-unused-vars": [2, {"args": "all", "argsIgnorePattern": "^_"}],
//"unicorn/better-regex": "error"
},
"overrides": [
{
"files": ["./src/**/*.js", "./*.cjs", "./*.mjs"],
"env": {
"node": true
}
},
{
"files": ["./test/**/*.js"],
"env": {
"jest/globals": true
}
}
]
}