eslint-config-isaacscript 1.0.70 → 1.0.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cspell.json +5 -15
- package/.eslintrc.js +1 -1
- package/.github/workflows/ci.yml +2 -3
- package/.prettierrc.js +2 -3
- package/.vscode/extensions.json +1 -1
- package/.vscode/settings.json +8 -8
- package/base.js +247 -147
- package/jsdoc.js +236 -40
- package/lint.sh +1 -1
- package/mod.js +91 -34
- package/package.json +1 -1
- package/publish.sh +1 -1
- package/update.sh +1 -1
package/.cspell.json
CHANGED
|
@@ -1,24 +1,14 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"dictionaries": [
|
|
5
|
-
"en_US"
|
|
6
|
-
],
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
|
|
3
|
+
"version": "0.2",
|
|
7
4
|
"words": [
|
|
8
5
|
"backticks",
|
|
9
|
-
"chdir",
|
|
10
|
-
"config",
|
|
11
|
-
"deno",
|
|
12
|
-
"eqeqeq",
|
|
13
|
-
"eslint",
|
|
14
6
|
"isaacscript",
|
|
15
7
|
"plusplus",
|
|
16
8
|
"sarisia",
|
|
17
9
|
"technote",
|
|
18
|
-
"
|
|
19
|
-
"unexported",
|
|
10
|
+
"Turnbull",
|
|
20
11
|
"unfixable",
|
|
21
|
-
"
|
|
22
|
-
"zamiell"
|
|
12
|
+
"Zamiell"
|
|
23
13
|
]
|
|
24
|
-
}
|
|
14
|
+
}
|
package/.eslintrc.js
CHANGED
package/.github/workflows/ci.yml
CHANGED
|
@@ -12,8 +12,7 @@ jobs:
|
|
|
12
12
|
- name: Setup Node.js
|
|
13
13
|
uses: actions/setup-node@v2
|
|
14
14
|
with:
|
|
15
|
-
# The default version is 14
|
|
16
|
-
# The ESLint config requires Node 16 to work properly
|
|
15
|
+
# The default version is 14. The ESLint config requires Node 16 to work properly.
|
|
17
16
|
node-version: '16'
|
|
18
17
|
|
|
19
18
|
- name: Retrieve the cached "node_modules" directory (if present)
|
|
@@ -33,7 +32,7 @@ jobs:
|
|
|
33
32
|
discord:
|
|
34
33
|
name: Discord Failure Notification
|
|
35
34
|
needs: [lint]
|
|
36
|
-
if: always() # This is needed to always run this job, even if the other jobs fail
|
|
35
|
+
if: always() # This is needed to always run this job, even if the other jobs fail.
|
|
37
36
|
runs-on: ubuntu-latest
|
|
38
37
|
steps:
|
|
39
38
|
- uses: technote-space/workflow-conclusion-action@v2
|
package/.prettierrc.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
// This is the configuration file for Prettier, the auto-formatter
|
|
1
|
+
// This is the configuration file for Prettier, the auto-formatter:
|
|
2
2
|
// https://prettier.io/docs/en/configuration.html
|
|
3
3
|
module.exports = {
|
|
4
4
|
// https://prettier.io/docs/en/options.html#trailing-commas
|
|
5
5
|
// The default is "es5" - Trailing commas where valid in ES5 (objects, arrays, etc.)
|
|
6
|
-
// However, always having trailing commas is objectively better
|
|
7
|
-
// The Airbnb style guide agrees:
|
|
6
|
+
// However, always having trailing commas is objectively better. The Airbnb style guide agrees:
|
|
8
7
|
// https://github.com/airbnb/javascript#commas--dangling
|
|
9
8
|
// Prettier itself also acknowledges Nik Graf's blog in their official blog:
|
|
10
9
|
// https://prettier.io/blog/2020/03/21/2.0.0.html#change-default-value-for-trailingcomma-to-es5-6963httpsgithubcomprettierprettierpull6963-by-fiskerhttpsgithubcomfisker
|
package/.vscode/extensions.json
CHANGED
package/.vscode/settings.json
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
// These are Visual Studio Code settings that should apply to this particular repository
|
|
1
|
+
// These are Visual Studio Code settings that should apply to this particular repository.
|
|
2
2
|
{
|
|
3
3
|
// ----------------
|
|
4
4
|
// Vanilla settings
|
|
5
5
|
// ----------------
|
|
6
6
|
|
|
7
|
-
// This matches the Airbnb JavaScript style guide
|
|
7
|
+
// This matches the Airbnb JavaScript style guide.
|
|
8
8
|
"editor.rulers": [100],
|
|
9
9
|
"editor.tabSize": 2,
|
|
10
10
|
|
|
11
|
-
// Linux line endings are used in this project
|
|
11
|
+
// Linux line endings are used in this project.
|
|
12
12
|
"files.eol": "\n",
|
|
13
13
|
|
|
14
|
-
// Automatically removing all trailing whitespace when saving a file
|
|
14
|
+
// Automatically removing all trailing whitespace when saving a file.
|
|
15
15
|
"files.trimTrailingWhitespace": true,
|
|
16
16
|
|
|
17
17
|
// ----------
|
|
18
18
|
// JavaScript
|
|
19
19
|
// ----------
|
|
20
20
|
|
|
21
|
-
// Automatically run the formatter when
|
|
21
|
+
// Automatically run the formatter when certain files are saved.
|
|
22
22
|
"[javascript]": {
|
|
23
|
+
"editor.codeActionsOnSave": [
|
|
24
|
+
"source.fixAll.eslint",
|
|
25
|
+
],
|
|
23
26
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
24
27
|
"editor.formatOnSave": true,
|
|
25
|
-
"editor.codeActionsOnSave": {
|
|
26
|
-
"source.fixAll.eslint": true,
|
|
27
|
-
},
|
|
28
28
|
"editor.tabSize": 2,
|
|
29
29
|
},
|
|
30
30
|
}
|
package/base.js
CHANGED
|
@@ -1,127 +1,174 @@
|
|
|
1
|
-
// This is a shared configuration file for ESLint
|
|
1
|
+
// This is a shared configuration file for ESLint:
|
|
2
2
|
// https://eslint.org/docs/user-guide/configuring
|
|
3
3
|
module.exports = {
|
|
4
4
|
extends: [
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// This includes the "parser" declaration of "@typescript-eslint/parser"
|
|
5
|
+
/**
|
|
6
|
+
* The linter base is the Airbnb style guide, which is the most popular JavaScript style guide
|
|
7
|
+
* in the world: https://github.com/airbnb/javascript
|
|
8
|
+
*
|
|
9
|
+
* The actual ESLint config is located here:
|
|
10
|
+
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules
|
|
11
|
+
*/
|
|
13
12
|
"airbnb-base",
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The TypeScript config extends it:
|
|
16
|
+
* https://github.com/iamturns/eslint-config-airbnb-typescript/blob/master/lib/shared.js
|
|
17
|
+
* (This includes the "parser" declaration of "@typescript-eslint/parser".)
|
|
18
|
+
*/
|
|
14
19
|
"airbnb-typescript/base",
|
|
15
20
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
/**
|
|
22
|
+
* We extend the Airbnb rules with the "recommended" and "recommended-requiring-type-checking"
|
|
23
|
+
* rules from the "typescript-eslint" plugin, which is also recommended by Matt Turnbull, the
|
|
24
|
+
* author of "airbnb-typescript/base":
|
|
25
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/README.md#recommended
|
|
26
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/recommended.ts
|
|
27
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/recommended-requiring-type-checking.ts
|
|
28
|
+
*/
|
|
22
29
|
"plugin:@typescript-eslint/recommended",
|
|
23
30
|
"plugin:@typescript-eslint/recommended-requiring-type-checking",
|
|
24
31
|
|
|
25
|
-
|
|
32
|
+
/**
|
|
33
|
+
* This provides extra miscellaneous rules to keep code safe:
|
|
34
|
+
* https://github.com/IsaacScript/eslint-plugin-isaacscript
|
|
35
|
+
*/
|
|
26
36
|
"plugin:isaacscript/recommended",
|
|
27
37
|
|
|
28
|
-
|
|
29
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Find unused "eslint-disable" comments:
|
|
40
|
+
* https://github.com/mysticatea/eslint-plugin-eslint-comments
|
|
41
|
+
*/
|
|
30
42
|
"plugin:eslint-comments/recommended",
|
|
31
43
|
|
|
32
|
-
|
|
44
|
+
/** Lint JSDoc comments. */
|
|
33
45
|
"./jsdoc",
|
|
34
46
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
47
|
+
/**
|
|
48
|
+
* Disable any ESLint rules that conflict with Prettier:
|
|
49
|
+
* https://github.com/prettier/eslint-config-prettier
|
|
50
|
+
* (Otherwise, we will have unfixable ESLint errors.)
|
|
51
|
+
*/
|
|
38
52
|
"prettier",
|
|
39
53
|
],
|
|
40
54
|
|
|
41
55
|
plugins: [
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
56
|
+
/**
|
|
57
|
+
* Use the "eslint-plugin-only-warn" plugin to change all errors to warnings:
|
|
58
|
+
* https://github.com/bfanger/eslint-plugin-only-warn
|
|
59
|
+
*
|
|
60
|
+
* This allows the end-user to more easily distinguish between errors from the TypeScript
|
|
61
|
+
* compiler (which show up in red) and ESLint rule violations (which show up in yellow).
|
|
62
|
+
*/
|
|
45
63
|
"only-warn",
|
|
46
64
|
|
|
47
|
-
|
|
48
|
-
|
|
65
|
+
/**
|
|
66
|
+
* Activate the "sort-exports" plugin, which allows the "sort-exports" rule to be optionally
|
|
67
|
+
* enabled on a per-project basis.
|
|
68
|
+
*/
|
|
49
69
|
"sort-exports",
|
|
50
70
|
],
|
|
51
71
|
|
|
52
|
-
// We modify the linting rules from the base for some specific things
|
|
53
|
-
// (listed in alphabetical order)
|
|
54
72
|
rules: {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
73
|
+
/**
|
|
74
|
+
* Documentation:
|
|
75
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/array-type.md
|
|
76
|
+
*
|
|
77
|
+
* Not defined in the parent configs.
|
|
78
|
+
*
|
|
79
|
+
* Prefer the "string[]" syntax over "Array<string>".
|
|
80
|
+
*/
|
|
81
|
+
"@typescript-eslint/array-type": [
|
|
82
|
+
"warn",
|
|
83
|
+
{
|
|
84
|
+
default: "array-simple",
|
|
85
|
+
},
|
|
86
|
+
],
|
|
60
87
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Documentation:
|
|
90
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md
|
|
91
|
+
*
|
|
92
|
+
* Not defined in the parent configs.
|
|
93
|
+
*
|
|
94
|
+
* Specifying explicit return types can help prevent bugs, but only require it on exported
|
|
95
|
+
* functions.
|
|
96
|
+
*/
|
|
66
97
|
"@typescript-eslint/explicit-module-boundary-types": "warn",
|
|
67
98
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
99
|
+
/**
|
|
100
|
+
* Documentation:
|
|
101
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/lines-between-class-members.md
|
|
102
|
+
*
|
|
103
|
+
* Defined at:
|
|
104
|
+
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/style.js
|
|
105
|
+
*
|
|
106
|
+
* Airbnb has "exceptAfterSingleLine" turned off by default. A list of single-line variable
|
|
107
|
+
* declarations at the top of a class is common in TypeScript.
|
|
108
|
+
*/
|
|
75
109
|
"@typescript-eslint/lines-between-class-members": [
|
|
76
110
|
"warn",
|
|
77
111
|
"always",
|
|
78
|
-
{
|
|
112
|
+
{
|
|
113
|
+
exceptAfterSingleLine: true,
|
|
114
|
+
},
|
|
79
115
|
],
|
|
80
116
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
117
|
+
/**
|
|
118
|
+
* Documentation:
|
|
119
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/naming-convention.md
|
|
120
|
+
*
|
|
121
|
+
* Defined at:
|
|
122
|
+
* https://github.com/iamturns/eslint-config-airbnb-typescript/blob/master/lib/shared.js
|
|
123
|
+
*
|
|
124
|
+
* Modify the Airbnb config to allow for a leading underscore, which signifies that it is
|
|
125
|
+
* temporarily not being used.
|
|
126
|
+
*/
|
|
87
127
|
"@typescript-eslint/naming-convention": [
|
|
88
128
|
"warn",
|
|
89
|
-
// Allow camelCase variables (23.2), PascalCase variables (23.8),
|
|
90
|
-
//
|
|
129
|
+
// Allow camelCase variables (23.2), PascalCase variables (23.8), and UPPER_CASE variables
|
|
130
|
+
// (23.10).
|
|
91
131
|
{
|
|
92
132
|
selector: "variable",
|
|
93
133
|
format: ["camelCase", "PascalCase", "UPPER_CASE"],
|
|
94
134
|
leadingUnderscore: "allow",
|
|
95
135
|
},
|
|
96
|
-
// Allow camelCase functions (23.2), and PascalCase functions (23.8)
|
|
136
|
+
// Allow camelCase functions (23.2), and PascalCase functions (23.8).
|
|
97
137
|
{
|
|
98
138
|
selector: "function",
|
|
99
139
|
format: ["camelCase", "PascalCase"],
|
|
100
140
|
leadingUnderscore: "allow",
|
|
101
141
|
},
|
|
102
|
-
// Airbnb recommends PascalCase for classes (23.3),
|
|
103
|
-
//
|
|
104
|
-
//
|
|
105
|
-
// including interfaces, type aliases, and enums
|
|
142
|
+
// Airbnb recommends PascalCase for classes (23.3), and although Airbnb does not make
|
|
143
|
+
// TypeScript recommendations, we are assuming this rule would similarly apply to anything
|
|
144
|
+
// "type like", including interfaces, type aliases, and enums.
|
|
106
145
|
{
|
|
107
146
|
selector: "typeLike",
|
|
108
147
|
format: ["PascalCase"],
|
|
109
148
|
},
|
|
110
149
|
],
|
|
111
150
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
151
|
+
/**
|
|
152
|
+
* Documentation:
|
|
153
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md
|
|
154
|
+
*
|
|
155
|
+
* Not defined in the parent configs.
|
|
156
|
+
*
|
|
157
|
+
* This prevents useless code after refactoring variables to pure booleans.
|
|
158
|
+
*/
|
|
116
159
|
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "warn",
|
|
117
160
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
161
|
+
/**
|
|
162
|
+
* Documentation:
|
|
163
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-unused-vars.md
|
|
164
|
+
*
|
|
165
|
+
* Defined at:
|
|
166
|
+
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/variables.js
|
|
167
|
+
*
|
|
168
|
+
* We want to lint unused arguments (the default is "after-used"). We also want to ignore
|
|
169
|
+
* arguments/variables that start with an underscore. This matches the behavior of the
|
|
170
|
+
* TypeScript compiler flag "--noUnusedLocals".
|
|
171
|
+
*/
|
|
125
172
|
"@typescript-eslint/no-unused-vars": [
|
|
126
173
|
"warn",
|
|
127
174
|
{
|
|
@@ -131,39 +178,57 @@ module.exports = {
|
|
|
131
178
|
},
|
|
132
179
|
],
|
|
133
180
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
181
|
+
/**
|
|
182
|
+
* Documentation:
|
|
183
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-use-before-define.md
|
|
184
|
+
*
|
|
185
|
+
* Defined at:
|
|
186
|
+
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/variables.js
|
|
187
|
+
*
|
|
188
|
+
* This allows code to be structured in a more logical order.
|
|
189
|
+
*/
|
|
140
190
|
"@typescript-eslint/no-use-before-define": "off",
|
|
141
191
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
192
|
+
/**
|
|
193
|
+
* Documentation:
|
|
194
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/quotes.md
|
|
195
|
+
*
|
|
196
|
+
* Defined at:
|
|
197
|
+
* https://github.com/prettier/eslint-config-prettier/blob/main/%40typescript-eslint.js
|
|
198
|
+
*
|
|
199
|
+
* In order to forbid unnecessary backticks, we must re-enable the "@typescript-eslint/quotes"
|
|
200
|
+
* rule as specified in the eslint-config-prettier documentation:
|
|
201
|
+
* https://github.com/prettier/eslint-config-prettier#enforce-backticks
|
|
202
|
+
*/
|
|
149
203
|
"@typescript-eslint/quotes": [
|
|
150
204
|
"warn",
|
|
151
205
|
"double",
|
|
152
|
-
{
|
|
206
|
+
{
|
|
207
|
+
avoidEscape: true,
|
|
208
|
+
allowTemplateLiterals: false,
|
|
209
|
+
},
|
|
153
210
|
],
|
|
154
211
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
212
|
+
/**
|
|
213
|
+
* Documentation:
|
|
214
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/restrict-template-expressions.md
|
|
215
|
+
*
|
|
216
|
+
* Defined at:
|
|
217
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/recommended-requiring-type-checking.ts
|
|
218
|
+
*
|
|
219
|
+
* This rule disallows booleans and nulls in template expressions. However, a common use-case of
|
|
220
|
+
* template strings is to coerce everything to a string.
|
|
221
|
+
*/
|
|
161
222
|
"@typescript-eslint/restrict-template-expressions": "off",
|
|
162
223
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
224
|
+
/**
|
|
225
|
+
* Documentation:
|
|
226
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/restrict-template-expressions.md
|
|
227
|
+
*
|
|
228
|
+
* Not defined in the parent configs.
|
|
229
|
+
*
|
|
230
|
+
* This rule prevents bugs when refactoring a boolean to a number.
|
|
231
|
+
*/
|
|
167
232
|
"@typescript-eslint/strict-boolean-expressions": [
|
|
168
233
|
"warn",
|
|
169
234
|
{
|
|
@@ -177,12 +242,16 @@ module.exports = {
|
|
|
177
242
|
},
|
|
178
243
|
],
|
|
179
244
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
245
|
+
/**
|
|
246
|
+
* Documentation:
|
|
247
|
+
* https://github.com/mysticatea/eslint-plugin-eslint-comments/blob/master/docs/rules/disable-enable-pair.md
|
|
248
|
+
*
|
|
249
|
+
* Defined at:
|
|
250
|
+
* https://github.com/mysticatea/eslint-plugin-eslint-comments/blob/master/lib/configs/recommended.js
|
|
251
|
+
*
|
|
252
|
+
* By default, it does not allow "eslint-disable" comments for a whole file, which is standard
|
|
253
|
+
* practice.
|
|
254
|
+
*/
|
|
186
255
|
"eslint-comments/disable-enable-pair": [
|
|
187
256
|
"warn",
|
|
188
257
|
{
|
|
@@ -190,56 +259,85 @@ module.exports = {
|
|
|
190
259
|
},
|
|
191
260
|
],
|
|
192
261
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
262
|
+
/**
|
|
263
|
+
* Documentation:
|
|
264
|
+
* https://github.com/mysticatea/eslint-plugin-eslint-comments/blob/master/docs/rules/no-unlimited-disable.md
|
|
265
|
+
*
|
|
266
|
+
* Defined at:
|
|
267
|
+
* https://github.com/mysticatea/eslint-plugin-eslint-comments/blob/master/lib/configs/recommended.js
|
|
268
|
+
*
|
|
269
|
+
* If a line breaks two or more ESLint rules, then it is useful to use a single "eslint-disable"
|
|
270
|
+
* comment.
|
|
271
|
+
*/
|
|
199
272
|
"eslint-comments/no-unlimited-disable": "off",
|
|
200
273
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
274
|
+
/**
|
|
275
|
+
* Documentation:
|
|
276
|
+
* https://github.com/mysticatea/eslint-plugin-eslint-comments/blob/master/docs/rules/no-unused-disable.md
|
|
277
|
+
*
|
|
278
|
+
* Not defined in the parent configs.
|
|
279
|
+
*
|
|
280
|
+
* This can help clean up unnecessary comments.
|
|
281
|
+
*/
|
|
205
282
|
"eslint-comments/no-unused-disable": "warn",
|
|
206
283
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
284
|
+
/**
|
|
285
|
+
* Documentation:
|
|
286
|
+
* https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/prefer-default-export.md
|
|
287
|
+
*
|
|
288
|
+
* Defined at:
|
|
289
|
+
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/imports.js
|
|
290
|
+
*
|
|
291
|
+
* The case against default exports is layed out here:
|
|
292
|
+
* https://basarat.gitbook.io/typescript/main-1/defaultisbad
|
|
293
|
+
*/
|
|
213
294
|
"import/prefer-default-export": "off",
|
|
214
295
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
296
|
+
/**
|
|
297
|
+
* Documentation: https://eslint.org/docs/rules/no-console
|
|
298
|
+
*
|
|
299
|
+
* Defined at:
|
|
300
|
+
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/errors.js
|
|
301
|
+
*
|
|
302
|
+
* Command-line programs commonly write to standard out and standard error.
|
|
303
|
+
*/
|
|
220
304
|
"no-console": "off",
|
|
221
305
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
306
|
+
/**
|
|
307
|
+
* Documentation: https://eslint.org/docs/rules/no-continue
|
|
308
|
+
*
|
|
309
|
+
* Defined at:
|
|
310
|
+
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/style.js
|
|
311
|
+
*
|
|
312
|
+
* Proper use of continues can reduce indentation for long blocks of code.
|
|
313
|
+
*/
|
|
227
314
|
"no-continue": "off",
|
|
228
315
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
316
|
+
/**
|
|
317
|
+
* Documentation: https://eslint.org/docs/rules/no-plusplus
|
|
318
|
+
*
|
|
319
|
+
* Defined at:
|
|
320
|
+
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/style.js
|
|
321
|
+
*
|
|
322
|
+
* Airbnb disallows these because it can lead to errors with minified code. We don't have to
|
|
323
|
+
* worry about this in for loops though.
|
|
324
|
+
*/
|
|
325
|
+
"no-plusplus": [
|
|
326
|
+
"warn",
|
|
327
|
+
{
|
|
328
|
+
allowForLoopAfterthoughts: true,
|
|
329
|
+
},
|
|
330
|
+
],
|
|
236
331
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
332
|
+
/**
|
|
333
|
+
* Documentation: https://eslint.org/docs/rules/no-restricted-syntax
|
|
334
|
+
*
|
|
335
|
+
* Defined at:
|
|
336
|
+
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/style.js
|
|
337
|
+
*
|
|
338
|
+
* - We move the selector for "for..of" loops, since they are commonly used.
|
|
339
|
+
* - We add a selector for "empty" invocations of the "array.push()" method.
|
|
340
|
+
*/
|
|
243
341
|
"no-restricted-syntax": [
|
|
244
342
|
"warn",
|
|
245
343
|
{
|
|
@@ -264,13 +362,15 @@ module.exports = {
|
|
|
264
362
|
},
|
|
265
363
|
],
|
|
266
364
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
365
|
+
/**
|
|
366
|
+
* Documentation: https://eslint.org/docs/rules/prefer-destructuring
|
|
367
|
+
*
|
|
368
|
+
* Defined at:
|
|
369
|
+
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/es6.js
|
|
370
|
+
*
|
|
371
|
+
* - Array destructuring can result in non-intuitive code.
|
|
372
|
+
* - Object destructuring is disgustingly verbose in TypeScript.
|
|
373
|
+
*/
|
|
274
374
|
"prefer-destructuring": "off",
|
|
275
375
|
},
|
|
276
376
|
};
|
package/jsdoc.js
CHANGED
|
@@ -1,62 +1,258 @@
|
|
|
1
|
-
// This is a shared configuration file for ESLint
|
|
1
|
+
// This is a shared configuration file for ESLint:
|
|
2
2
|
// https://eslint.org/docs/user-guide/configuring
|
|
3
3
|
module.exports = {
|
|
4
4
|
plugins: [
|
|
5
|
-
|
|
6
|
-
// https://github.com/gajus/eslint-plugin-jsdoc
|
|
5
|
+
/** Lint JSDoc style comments: https://github.com/gajus/eslint-plugin-jsdoc */
|
|
7
6
|
"jsdoc",
|
|
8
7
|
],
|
|
9
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Instead of using the recommended config, we specifically turn on every rule that is useful.
|
|
11
|
+
*
|
|
12
|
+
* We must specify `contexts: "any"` for every rule because by default, the JSDoc rules will only
|
|
13
|
+
* affect a subset of AST node types.
|
|
14
|
+
*/
|
|
10
15
|
rules: {
|
|
11
|
-
// jsdoc/check-access
|
|
12
|
-
// jsdoc/check-alignment
|
|
13
|
-
// jsdoc/check-examples
|
|
14
|
-
// jsdoc/check-indentation
|
|
15
|
-
// jsdoc/check-line-alignment - This is not a common formatting scheme in the wild. It's also
|
|
16
|
-
//
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
16
|
+
// - jsdoc/check-access - Not needed in TypeScript.
|
|
17
|
+
// - jsdoc/check-alignment - Overlaps with `isaacscript/limit-jsdoc-comments`.
|
|
18
|
+
// - jsdoc/check-examples - Not worth it since some ESLint rules may not apply to examples.
|
|
19
|
+
// - jsdoc/check-indentation - Overlaps with `isaacscript/limit-jsdoc-comments`.
|
|
20
|
+
// - jsdoc/check-line-alignment - This is not a common formatting scheme in the wild. It's also
|
|
21
|
+
// not recommended by the plugin.
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Documentation: https://github.com/gajus/eslint-plugin-jsdoc#check-param-names
|
|
25
|
+
*
|
|
26
|
+
* Ensures that parameter names in JSDoc match those in the function declaration.
|
|
27
|
+
*/
|
|
28
|
+
"jsdoc/check-param-names": [
|
|
29
|
+
"warn",
|
|
30
|
+
{
|
|
31
|
+
contexts: "any",
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
|
|
35
|
+
// - jsdoc/check-property-names - Not needed in TypeScript.
|
|
36
|
+
// - jsdoc/check-syntax - Not needed in TypeScript.
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Documentation: https://github.com/gajus/eslint-plugin-jsdoc#check-tag-names
|
|
40
|
+
*
|
|
41
|
+
* Reports invalid block tag names.
|
|
42
|
+
*/
|
|
30
43
|
"jsdoc/check-tag-names": [
|
|
31
44
|
"warn",
|
|
32
45
|
{
|
|
46
|
+
contexts: "any",
|
|
33
47
|
definedTags: [
|
|
34
|
-
|
|
35
|
-
|
|
48
|
+
// Used by the TypeScript compiler:
|
|
49
|
+
// https://www.typescriptlang.org/tsconfig#stripInternal
|
|
36
50
|
"internal", // Used by TypeScript
|
|
37
|
-
|
|
38
|
-
|
|
51
|
+
|
|
52
|
+
// Add tags used in TypeDoc:
|
|
53
|
+
// https://typedoc.org/guides/doccomments/
|
|
54
|
+
"category",
|
|
55
|
+
"hidden",
|
|
56
|
+
|
|
57
|
+
// Add tags used in TypeScriptToLua:
|
|
58
|
+
// https://typescripttolua.github.io/docs/advanced/compiler-annotations
|
|
59
|
+
"noResolution",
|
|
60
|
+
"noSelf",
|
|
39
61
|
],
|
|
40
62
|
},
|
|
41
63
|
],
|
|
42
64
|
|
|
43
|
-
// jsdoc/check-types - Not needed in TypeScript.
|
|
65
|
+
// - jsdoc/check-types - Not needed in TypeScript.
|
|
44
66
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
67
|
+
/**
|
|
68
|
+
* Documentation: https://github.com/gajus/eslint-plugin-jsdoc#check-values
|
|
69
|
+
*
|
|
70
|
+
* Validates the content of some uncommon JSDoc tags.
|
|
71
|
+
*/
|
|
72
|
+
"jsdoc/check-values": [
|
|
73
|
+
"warn",
|
|
74
|
+
{
|
|
75
|
+
contexts: "any",
|
|
76
|
+
},
|
|
77
|
+
],
|
|
49
78
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
79
|
+
/**
|
|
80
|
+
* Documentation: https://github.com/gajus/eslint-plugin-jsdoc#check-values
|
|
81
|
+
*
|
|
82
|
+
* Validates that specific tags are never empty.
|
|
83
|
+
*/
|
|
84
|
+
"jsdoc/empty-tags": [
|
|
85
|
+
"warn",
|
|
86
|
+
{
|
|
87
|
+
contexts: "any",
|
|
88
|
+
},
|
|
89
|
+
],
|
|
54
90
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
91
|
+
/**
|
|
92
|
+
* Documentation: https://github.com/gajus/eslint-plugin-jsdoc#implements-on-classes
|
|
93
|
+
*
|
|
94
|
+
* Reports issues with incorrect usage of `@implements`.
|
|
95
|
+
*/
|
|
96
|
+
"jsdoc/implements-on-classes": [
|
|
97
|
+
"warn",
|
|
98
|
+
{
|
|
99
|
+
contexts: "any",
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
|
|
103
|
+
// - jsdoc/match-description - Overlaps with `isaacscript/jsdoc-full-sentences`.
|
|
104
|
+
// - jsdoc/match-name - Only needed for projects with specific JSDoc requirements.
|
|
105
|
+
// - jsdoc/multiline-blocks - Overlaps with `isaacscript/limit-jsdoc-comments`.
|
|
106
|
+
// - jsdoc/newline-after-description - Overlaps with `isaacscript/limit-jsdoc-comments`.
|
|
107
|
+
// - jsdoc/no-bad-blocks - Provides little value, since it only detects JSDoc comments with tags
|
|
108
|
+
// in them.
|
|
109
|
+
// - jsdoc/no-defaults - Provides little value, since the @default tag is rare.
|
|
110
|
+
// - jsdoc/no-missing-syntax - Not generally relevant.
|
|
111
|
+
// - jsdoc/no-multi-asterisks - Overlaps with `isaacscript/limit-jsdoc-comments`.
|
|
112
|
+
// - jsdoc/no-restricted-syntax - Not generally relevant.
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Documentation: https://github.com/gajus/eslint-plugin-jsdoc#no-types
|
|
116
|
+
*
|
|
117
|
+
* Disallows types being used on `@param` or `@returns`.
|
|
118
|
+
*/
|
|
119
|
+
"jsdoc/no-types": [
|
|
120
|
+
"warn",
|
|
121
|
+
{
|
|
122
|
+
contexts: "any",
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
|
|
126
|
+
// - jsdoc/no-undefined-types - Not needed in TypeScript.
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Documentation: https://github.com/gajus/eslint-plugin-jsdoc#require-asterisk-prefix
|
|
130
|
+
*
|
|
131
|
+
* Requires that each JSDoc line starts with an `*`.
|
|
132
|
+
*/
|
|
133
|
+
"jsdoc/require-asterisk-prefix": [
|
|
134
|
+
"warn",
|
|
135
|
+
{
|
|
136
|
+
contexts: "any",
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
|
|
140
|
+
// - jsdoc/require-description-complete-sentence - Overlaps with
|
|
141
|
+
// `isaacscript/jsdoc-complete-sentences`.
|
|
142
|
+
// - jsdoc/require-description - It's overboard for every function to have a description.
|
|
143
|
+
// - jsdoc/require-example - It's overboard for every function to require an example.
|
|
144
|
+
// - jsdoc/require-file-overview - It's overboard for every file to require an overview.
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Documentation:
|
|
148
|
+
* https://github.com/gajus/eslint-plugin-jsdoc#require-hyphen-before-param-description
|
|
149
|
+
*
|
|
150
|
+
* Disallow hyphens before parameter descriptions, as it is non-standard syntax.
|
|
151
|
+
*/
|
|
152
|
+
"jsdoc/require-hyphen-before-param-description": [
|
|
153
|
+
"warn",
|
|
154
|
+
"never",
|
|
155
|
+
{
|
|
156
|
+
contexts: "any",
|
|
157
|
+
},
|
|
158
|
+
],
|
|
159
|
+
|
|
160
|
+
// - jsdoc/require-jsdoc - It's overboard for every function to have a JSDoc comment.
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Documentation:
|
|
164
|
+
* https://github.com/gajus/eslint-plugin-jsdoc#require-param-description
|
|
165
|
+
*
|
|
166
|
+
* Requires that each `@param` tag has a description.
|
|
167
|
+
*/
|
|
168
|
+
"jsdoc/require-param-description": [
|
|
169
|
+
"warn",
|
|
170
|
+
{
|
|
171
|
+
contexts: "any",
|
|
172
|
+
},
|
|
173
|
+
],
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Documentation:
|
|
177
|
+
* https://github.com/gajus/eslint-plugin-jsdoc#require-param-name
|
|
178
|
+
*
|
|
179
|
+
* Requires that each `@param` tag has a name.
|
|
180
|
+
*/
|
|
181
|
+
"jsdoc/require-param-name": [
|
|
182
|
+
"warn",
|
|
183
|
+
{
|
|
184
|
+
contexts: "any",
|
|
185
|
+
},
|
|
186
|
+
],
|
|
187
|
+
|
|
188
|
+
// - jsdoc/require-param-type - Not needed in TypeScript.
|
|
189
|
+
// - jsdoc/require-param - It's overboard for every function to document every parameter.
|
|
190
|
+
// - jsdoc/require-property - Probably not needed in TypeScript.
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Documentation:
|
|
194
|
+
* https://github.com/gajus/eslint-plugin-jsdoc#require-property-description
|
|
195
|
+
*
|
|
196
|
+
* Requires that each `@property` tag has a description.
|
|
197
|
+
*/
|
|
198
|
+
"jsdoc/require-property-description": [
|
|
199
|
+
"warn",
|
|
200
|
+
{
|
|
201
|
+
contexts: "any",
|
|
202
|
+
},
|
|
203
|
+
],
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Documentation:
|
|
207
|
+
* https://github.com/gajus/eslint-plugin-jsdoc#require-property-name
|
|
208
|
+
*
|
|
209
|
+
* Requires that each `@property` tag has a name.
|
|
210
|
+
*/
|
|
211
|
+
"jsdoc/require-property-name": [
|
|
212
|
+
"warn",
|
|
213
|
+
{
|
|
214
|
+
contexts: "any",
|
|
215
|
+
},
|
|
216
|
+
],
|
|
217
|
+
|
|
218
|
+
// - jsdoc/require-property-type - Not needed in TypeScript.
|
|
219
|
+
// - jsdoc/require-returns-check - It's overboard for every function to document every return
|
|
220
|
+
// value.
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Documentation:
|
|
224
|
+
* https://github.com/gajus/eslint-plugin-jsdoc#require-returns-description
|
|
225
|
+
*
|
|
226
|
+
* Requires that each `@returns` tag has a description.
|
|
227
|
+
*/
|
|
228
|
+
"jsdoc/require-returns-description": [
|
|
229
|
+
"warn",
|
|
230
|
+
{
|
|
231
|
+
contexts: "any",
|
|
232
|
+
},
|
|
233
|
+
],
|
|
234
|
+
|
|
235
|
+
// - jsdoc/require-returns-type - Not needed in TypeScript.
|
|
236
|
+
// - jsdoc/require-returns - It's overboard for every function to document every return value.
|
|
237
|
+
// - jsdoc/require-throws - It's overboard to document every throw statement.
|
|
238
|
+
// - jsdoc/require-yields - It's overboard to document every yield.
|
|
239
|
+
// - jsdoc/require-yields-check - It's overboard to document every yield.
|
|
240
|
+
// - jsdoc/sort-tags - Not very useful since there are typically only `@param` and `@return`
|
|
241
|
+
// tags.
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Documentation:
|
|
245
|
+
* https://github.com/gajus/eslint-plugin-jsdoc#tag-lines
|
|
246
|
+
*
|
|
247
|
+
* Enforces no lines between tags.
|
|
248
|
+
*/
|
|
249
|
+
"jsdoc/tag-lines": [
|
|
250
|
+
"warn",
|
|
251
|
+
{
|
|
252
|
+
contexts: "any",
|
|
253
|
+
},
|
|
254
|
+
],
|
|
59
255
|
|
|
60
|
-
// jsdoc/
|
|
256
|
+
// - jsdoc/valid-types - Not needed in TypeScript.
|
|
61
257
|
},
|
|
62
258
|
};
|
package/lint.sh
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
set -e # Exit on any errors
|
|
4
4
|
|
|
5
|
-
# Get the directory of this script
|
|
5
|
+
# Get the directory of this script:
|
|
6
6
|
# https://stackoverflow.com/questions/59895/getting-the-source-directory-of-a-bash-script-from-within
|
|
7
7
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
8
8
|
|
package/mod.js
CHANGED
|
@@ -1,52 +1,109 @@
|
|
|
1
|
-
// This is a shared configuration file for ESLint
|
|
1
|
+
// This is a shared configuration file for ESLint:
|
|
2
2
|
// https://eslint.org/docs/user-guide/configuring
|
|
3
3
|
module.exports = {
|
|
4
4
|
extends: [
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* The mod config extends the base configuration:
|
|
7
|
+
* https://github.com/IsaacScript/eslint-config-isaacscript/blob/main/base.js
|
|
8
|
+
*/
|
|
7
9
|
"./base",
|
|
8
10
|
],
|
|
9
11
|
|
|
10
|
-
// We modify the linting rules from the base for some specific things
|
|
11
|
-
// (listed in alphabetical order)
|
|
12
12
|
rules: {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Documentation:
|
|
15
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/naming-convention.md
|
|
16
|
+
*
|
|
17
|
+
* Defined at:
|
|
18
|
+
* https://github.com/iamturns/eslint-config-airbnb-typescript/blob/master/lib/shared.js
|
|
19
|
+
*
|
|
20
|
+
* Modify the Airbnb config to allow for a leading underscore, which signifies that it is
|
|
21
|
+
* temporarily not being used.
|
|
22
|
+
*
|
|
23
|
+
* Additionally, ensure that all enums match the Isaac convention of using UPPER_CASE.
|
|
24
|
+
*/
|
|
25
|
+
"@typescript-eslint/naming-convention": [
|
|
26
|
+
"warn",
|
|
27
|
+
// Allow camelCase variables (23.2), PascalCase variables (23.8), and UPPER_CASE variables
|
|
28
|
+
// (23.10).
|
|
29
|
+
{
|
|
30
|
+
selector: "variable",
|
|
31
|
+
format: ["camelCase", "PascalCase", "UPPER_CASE"],
|
|
32
|
+
leadingUnderscore: "allow",
|
|
33
|
+
},
|
|
34
|
+
// Allow camelCase functions (23.2), and PascalCase functions (23.8).
|
|
35
|
+
{
|
|
36
|
+
selector: "function",
|
|
37
|
+
format: ["camelCase", "PascalCase"],
|
|
38
|
+
leadingUnderscore: "allow",
|
|
39
|
+
},
|
|
40
|
+
// Airbnb recommends PascalCase for classes (23.3), and although Airbnb does not make
|
|
41
|
+
// TypeScript recommendations, we are assuming this rule would similarly apply to anything
|
|
42
|
+
// "type like", including interfaces, type aliases, and enums.
|
|
43
|
+
{
|
|
44
|
+
selector: "typeLike",
|
|
45
|
+
format: ["PascalCase"],
|
|
46
|
+
},
|
|
47
|
+
// The vanilla Isaac enums all use UPPER_CASE:
|
|
48
|
+
// https://wofsauge.github.io/IsaacDocs/rep/enums/CollectibleType.html
|
|
49
|
+
{
|
|
50
|
+
selector: "enumMember",
|
|
51
|
+
format: ["UPPER_CASE"],
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Documentation:
|
|
57
|
+
* https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/no-loop-func.md
|
|
58
|
+
*
|
|
59
|
+
* Defined at:
|
|
60
|
+
* https://github.com/iamturns/eslint-config-airbnb-typescript/blob/master/lib/shared.js
|
|
61
|
+
*
|
|
62
|
+
* This rule throws false positives with API functions. It can be worked around by supplying
|
|
63
|
+
* lists of globals to ESLint, but this is ugly. See:
|
|
64
|
+
* https://github.com/typescript-eslint/typescript-eslint/issues/2780
|
|
65
|
+
*/
|
|
21
66
|
"@typescript-eslint/no-loop-func": "off",
|
|
22
67
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
68
|
+
/**
|
|
69
|
+
* Documentation: https://github.com/eslint/eslint/blob/master/docs/rules/no-bitwise.md
|
|
70
|
+
*
|
|
71
|
+
* Defined at:
|
|
72
|
+
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/style.js
|
|
73
|
+
*
|
|
74
|
+
* Isaac enums use bitwise operators (e.g. "EntityFlag").
|
|
75
|
+
*/
|
|
28
76
|
"no-bitwise": "off",
|
|
29
77
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
78
|
+
/**
|
|
79
|
+
* Documentation: https://eslint.org/docs/rules/no-param-reassign
|
|
80
|
+
*
|
|
81
|
+
* Defined at:
|
|
82
|
+
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/best-practices.js
|
|
83
|
+
*
|
|
84
|
+
* The Isaac API callback functions expect you to modify the provided object.
|
|
85
|
+
*/
|
|
35
86
|
"no-param-reassign": "off",
|
|
36
87
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Documentation: https://eslint.org/docs/rules/no-restricted-globals
|
|
90
|
+
*
|
|
91
|
+
* Defined at:
|
|
92
|
+
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/variables.js
|
|
93
|
+
*
|
|
94
|
+
* "print" is used with Lua mods.
|
|
95
|
+
*/
|
|
42
96
|
"no-restricted-globals": "off",
|
|
43
97
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
98
|
+
/**
|
|
99
|
+
* Documentation: https://eslint.org/docs/rules/no-underscore-dangle
|
|
100
|
+
*
|
|
101
|
+
* Defined at:
|
|
102
|
+
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/style.js
|
|
103
|
+
*
|
|
104
|
+
* We keep the Airbnb specification but allow calling functions that overload Lua operators:
|
|
105
|
+
* https://moddingofisaac.com/docs/class_vector.html
|
|
106
|
+
*/
|
|
50
107
|
"no-underscore-dangle": [
|
|
51
108
|
"warn",
|
|
52
109
|
{
|
package/package.json
CHANGED
package/publish.sh
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
set -e # Exit on any errors
|
|
4
4
|
|
|
5
|
-
# Get the directory of this script
|
|
5
|
+
# Get the directory of this script:
|
|
6
6
|
# https://stackoverflow.com/questions/59895/getting-the-source-directory-of-a-bash-script-from-within
|
|
7
7
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
8
8
|
|
package/update.sh
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
set -e # Exit on any errors
|
|
4
4
|
|
|
5
|
-
# Get the directory of this script
|
|
5
|
+
# Get the directory of this script:
|
|
6
6
|
# https://stackoverflow.com/questions/59895/getting-the-source-directory-of-a-bash-script-from-within
|
|
7
7
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
8
8
|
|