eslint-config-isaacscript 1.0.74 → 1.0.77
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/README.md +2 -0
- package/base.js +12 -6
- package/jsdoc.js +31 -68
- package/mod.js +18 -4
- package/package.json +8 -1
- package/.cspell.json +0 -14
- package/.eslintrc.js +0 -8
- package/.gitattributes +0 -9
- package/.github/workflows/ci.yml +0 -44
- package/.prettierrc.js +0 -15
- package/.vscode/extensions.json +0 -9
- package/.vscode/settings.json +0 -30
- package/lint.sh +0 -11
- package/publish.sh +0 -11
- package/update.sh +0 -17
package/README.md
CHANGED
|
@@ -4,4 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
This is a helper configuration for ESLint that is intended to be used in IsaacScript projects.
|
|
6
6
|
|
|
7
|
+
This package is consumed by the [`isaacscript-lint`](https://github.com/IsaacScript/isaacscript-lint) meta-linting package.
|
|
8
|
+
|
|
7
9
|
Please see the [IsaacScript webpage](https://isaacscript.github.io/) for more information.
|
package/base.js
CHANGED
|
@@ -4,7 +4,8 @@ module.exports = {
|
|
|
4
4
|
extends: [
|
|
5
5
|
/**
|
|
6
6
|
* The linter base is the Airbnb style guide, which is the most popular JavaScript style guide
|
|
7
|
-
* in the world:
|
|
7
|
+
* in the world:
|
|
8
|
+
* https://github.com/airbnb/javascript
|
|
8
9
|
*
|
|
9
10
|
* The actual ESLint config is located here:
|
|
10
11
|
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules
|
|
@@ -294,7 +295,8 @@ module.exports = {
|
|
|
294
295
|
"import/prefer-default-export": "off",
|
|
295
296
|
|
|
296
297
|
/**
|
|
297
|
-
* Documentation:
|
|
298
|
+
* Documentation:
|
|
299
|
+
* https://eslint.org/docs/rules/no-console
|
|
298
300
|
*
|
|
299
301
|
* Defined at:
|
|
300
302
|
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/errors.js
|
|
@@ -304,7 +306,8 @@ module.exports = {
|
|
|
304
306
|
"no-console": "off",
|
|
305
307
|
|
|
306
308
|
/**
|
|
307
|
-
* Documentation:
|
|
309
|
+
* Documentation:
|
|
310
|
+
* https://eslint.org/docs/rules/no-continue
|
|
308
311
|
*
|
|
309
312
|
* Defined at:
|
|
310
313
|
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/style.js
|
|
@@ -314,7 +317,8 @@ module.exports = {
|
|
|
314
317
|
"no-continue": "off",
|
|
315
318
|
|
|
316
319
|
/**
|
|
317
|
-
* Documentation:
|
|
320
|
+
* Documentation:
|
|
321
|
+
* https://eslint.org/docs/rules/no-plusplus
|
|
318
322
|
*
|
|
319
323
|
* Defined at:
|
|
320
324
|
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/style.js
|
|
@@ -330,7 +334,8 @@ module.exports = {
|
|
|
330
334
|
],
|
|
331
335
|
|
|
332
336
|
/**
|
|
333
|
-
* Documentation:
|
|
337
|
+
* Documentation:
|
|
338
|
+
* https://eslint.org/docs/rules/no-restricted-syntax
|
|
334
339
|
*
|
|
335
340
|
* Defined at:
|
|
336
341
|
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/style.js
|
|
@@ -363,7 +368,8 @@ module.exports = {
|
|
|
363
368
|
],
|
|
364
369
|
|
|
365
370
|
/**
|
|
366
|
-
* Documentation:
|
|
371
|
+
* Documentation:
|
|
372
|
+
* https://eslint.org/docs/rules/prefer-destructuring
|
|
367
373
|
*
|
|
368
374
|
* Defined at:
|
|
369
375
|
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/es6.js
|
package/jsdoc.js
CHANGED
|
@@ -2,15 +2,18 @@
|
|
|
2
2
|
// https://eslint.org/docs/user-guide/configuring
|
|
3
3
|
module.exports = {
|
|
4
4
|
plugins: [
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Lint JSDoc style comments:
|
|
7
|
+
* https://github.com/gajus/eslint-plugin-jsdoc
|
|
8
|
+
*/
|
|
6
9
|
"jsdoc",
|
|
7
10
|
],
|
|
8
11
|
|
|
9
12
|
/**
|
|
10
13
|
* Instead of using the recommended config, we specifically turn on every rule that is useful.
|
|
11
14
|
*
|
|
12
|
-
* We must specify `contexts: ["any"]` for
|
|
13
|
-
*
|
|
15
|
+
* We must specify `contexts: ["any"]` for some rules because by default, only a subset of AST
|
|
16
|
+
* node types will be affected.
|
|
14
17
|
*/
|
|
15
18
|
rules: {
|
|
16
19
|
// - jsdoc/check-access - Not needed in TypeScript.
|
|
@@ -21,29 +24,25 @@ module.exports = {
|
|
|
21
24
|
// not recommended by the plugin.
|
|
22
25
|
|
|
23
26
|
/**
|
|
24
|
-
* Documentation:
|
|
27
|
+
* Documentation:
|
|
28
|
+
* https://github.com/gajus/eslint-plugin-jsdoc#check-param-names
|
|
25
29
|
*
|
|
26
30
|
* Ensures that parameter names in JSDoc match those in the function declaration.
|
|
27
31
|
*/
|
|
28
|
-
"jsdoc/check-param-names":
|
|
29
|
-
"warn",
|
|
30
|
-
{
|
|
31
|
-
contexts: ["any"],
|
|
32
|
-
},
|
|
33
|
-
],
|
|
32
|
+
"jsdoc/check-param-names": "warn",
|
|
34
33
|
|
|
35
34
|
// - jsdoc/check-property-names - Not needed in TypeScript.
|
|
36
35
|
// - jsdoc/check-syntax - Not needed in TypeScript.
|
|
37
36
|
|
|
38
37
|
/**
|
|
39
|
-
* Documentation:
|
|
38
|
+
* Documentation:
|
|
39
|
+
* https://github.com/gajus/eslint-plugin-jsdoc#check-tag-names
|
|
40
40
|
*
|
|
41
41
|
* Reports invalid block tag names.
|
|
42
42
|
*/
|
|
43
43
|
"jsdoc/check-tag-names": [
|
|
44
44
|
"warn",
|
|
45
45
|
{
|
|
46
|
-
contexts: ["any"],
|
|
47
46
|
definedTags: [
|
|
48
47
|
// Used by the TypeScript compiler:
|
|
49
48
|
// https://www.typescriptlang.org/tsconfig#stripInternal
|
|
@@ -65,40 +64,28 @@ module.exports = {
|
|
|
65
64
|
// - jsdoc/check-types - Not needed in TypeScript.
|
|
66
65
|
|
|
67
66
|
/**
|
|
68
|
-
* Documentation:
|
|
67
|
+
* Documentation:
|
|
68
|
+
* https://github.com/gajus/eslint-plugin-jsdoc#check-values
|
|
69
69
|
*
|
|
70
70
|
* Validates the content of some uncommon JSDoc tags.
|
|
71
71
|
*/
|
|
72
|
-
"jsdoc/check-values":
|
|
73
|
-
"warn",
|
|
74
|
-
{
|
|
75
|
-
contexts: ["any"],
|
|
76
|
-
},
|
|
77
|
-
],
|
|
72
|
+
"jsdoc/check-values": "warn",
|
|
78
73
|
|
|
79
74
|
/**
|
|
80
|
-
* Documentation:
|
|
75
|
+
* Documentation:
|
|
76
|
+
* https://github.com/gajus/eslint-plugin-jsdoc#check-values
|
|
81
77
|
*
|
|
82
78
|
* Validates that specific tags are never empty.
|
|
83
79
|
*/
|
|
84
|
-
"jsdoc/empty-tags":
|
|
85
|
-
"warn",
|
|
86
|
-
{
|
|
87
|
-
contexts: ["any"],
|
|
88
|
-
},
|
|
89
|
-
],
|
|
80
|
+
"jsdoc/empty-tags": "warn",
|
|
90
81
|
|
|
91
82
|
/**
|
|
92
|
-
* Documentation:
|
|
83
|
+
* Documentation:
|
|
84
|
+
* https://github.com/gajus/eslint-plugin-jsdoc#implements-on-classes
|
|
93
85
|
*
|
|
94
86
|
* Reports issues with incorrect usage of `@implements`.
|
|
95
87
|
*/
|
|
96
|
-
"jsdoc/implements-on-classes":
|
|
97
|
-
"warn",
|
|
98
|
-
{
|
|
99
|
-
contexts: ["any"],
|
|
100
|
-
},
|
|
101
|
-
],
|
|
88
|
+
"jsdoc/implements-on-classes": "warn",
|
|
102
89
|
|
|
103
90
|
// - jsdoc/match-description - Overlaps with `isaacscript/jsdoc-full-sentences`.
|
|
104
91
|
// - jsdoc/match-name - Only needed for projects with specific JSDoc requirements.
|
|
@@ -112,7 +99,8 @@ module.exports = {
|
|
|
112
99
|
// - jsdoc/no-restricted-syntax - Not generally relevant.
|
|
113
100
|
|
|
114
101
|
/**
|
|
115
|
-
* Documentation:
|
|
102
|
+
* Documentation:
|
|
103
|
+
* https://github.com/gajus/eslint-plugin-jsdoc#no-types
|
|
116
104
|
*
|
|
117
105
|
* Disallows types being used on `@param` or `@returns`.
|
|
118
106
|
*/
|
|
@@ -126,16 +114,12 @@ module.exports = {
|
|
|
126
114
|
// - jsdoc/no-undefined-types - Not needed in TypeScript.
|
|
127
115
|
|
|
128
116
|
/**
|
|
129
|
-
* Documentation:
|
|
117
|
+
* Documentation:
|
|
118
|
+
* https://github.com/gajus/eslint-plugin-jsdoc#require-asterisk-prefix
|
|
130
119
|
*
|
|
131
120
|
* Requires that each JSDoc line starts with an `*`.
|
|
132
121
|
*/
|
|
133
|
-
"jsdoc/require-asterisk-prefix":
|
|
134
|
-
"warn",
|
|
135
|
-
{
|
|
136
|
-
contexts: ["any"],
|
|
137
|
-
},
|
|
138
|
-
],
|
|
122
|
+
"jsdoc/require-asterisk-prefix": "warn",
|
|
139
123
|
|
|
140
124
|
// - jsdoc/require-description-complete-sentence - Overlaps with
|
|
141
125
|
// `isaacscript/jsdoc-complete-sentences`.
|
|
@@ -149,13 +133,7 @@ module.exports = {
|
|
|
149
133
|
*
|
|
150
134
|
* Disallow hyphens before parameter descriptions, as it is non-standard syntax.
|
|
151
135
|
*/
|
|
152
|
-
"jsdoc/require-hyphen-before-param-description": [
|
|
153
|
-
"warn",
|
|
154
|
-
"never",
|
|
155
|
-
{
|
|
156
|
-
contexts: ["any"],
|
|
157
|
-
},
|
|
158
|
-
],
|
|
136
|
+
"jsdoc/require-hyphen-before-param-description": ["warn", "never"],
|
|
159
137
|
|
|
160
138
|
// - jsdoc/require-jsdoc - It's overboard for every function to have a JSDoc comment.
|
|
161
139
|
|
|
@@ -195,12 +173,7 @@ module.exports = {
|
|
|
195
173
|
*
|
|
196
174
|
* Requires that each `@property` tag has a description.
|
|
197
175
|
*/
|
|
198
|
-
"jsdoc/require-property-description":
|
|
199
|
-
"warn",
|
|
200
|
-
{
|
|
201
|
-
contexts: ["any"],
|
|
202
|
-
},
|
|
203
|
-
],
|
|
176
|
+
"jsdoc/require-property-description": "warn",
|
|
204
177
|
|
|
205
178
|
/**
|
|
206
179
|
* Documentation:
|
|
@@ -208,16 +181,11 @@ module.exports = {
|
|
|
208
181
|
*
|
|
209
182
|
* Requires that each `@property` tag has a name.
|
|
210
183
|
*/
|
|
211
|
-
"jsdoc/require-property-name":
|
|
212
|
-
"warn",
|
|
213
|
-
{
|
|
214
|
-
contexts: ["any"],
|
|
215
|
-
},
|
|
216
|
-
],
|
|
184
|
+
"jsdoc/require-property-name": "warn",
|
|
217
185
|
|
|
218
186
|
// - jsdoc/require-property-type - Not needed in TypeScript.
|
|
219
187
|
// - jsdoc/require-returns-check - It's overboard for every function to document every return
|
|
220
|
-
//
|
|
188
|
+
// value.
|
|
221
189
|
|
|
222
190
|
/**
|
|
223
191
|
* Documentation:
|
|
@@ -238,7 +206,7 @@ module.exports = {
|
|
|
238
206
|
// - jsdoc/require-yields - It's overboard to document every yield.
|
|
239
207
|
// - jsdoc/require-yields-check - It's overboard to document every yield.
|
|
240
208
|
// - jsdoc/sort-tags - Not very useful since there are typically only `@param` and `@return`
|
|
241
|
-
//
|
|
209
|
+
// tags.
|
|
242
210
|
|
|
243
211
|
/**
|
|
244
212
|
* Documentation:
|
|
@@ -246,12 +214,7 @@ module.exports = {
|
|
|
246
214
|
*
|
|
247
215
|
* Enforces no lines between tags.
|
|
248
216
|
*/
|
|
249
|
-
"jsdoc/tag-lines":
|
|
250
|
-
"warn",
|
|
251
|
-
{
|
|
252
|
-
contexts: ["any"],
|
|
253
|
-
},
|
|
254
|
-
],
|
|
217
|
+
"jsdoc/tag-lines": "warn",
|
|
255
218
|
|
|
256
219
|
// - jsdoc/valid-types - Not needed in TypeScript.
|
|
257
220
|
},
|
package/mod.js
CHANGED
|
@@ -66,7 +66,18 @@ module.exports = {
|
|
|
66
66
|
"@typescript-eslint/no-loop-func": "off",
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
|
-
* Documentation:
|
|
69
|
+
* Documentation:
|
|
70
|
+
* https://github.com/IsaacScript/eslint-plugin-isaacscript/blob/main/docs/rules/enum-member-number-separation.md
|
|
71
|
+
*
|
|
72
|
+
* Not defined in the parent configs.
|
|
73
|
+
*
|
|
74
|
+
* Since Isaac enums use the `SHOUTING_SNAKE_CASE` convention, this rule ensures correctness.
|
|
75
|
+
*/
|
|
76
|
+
"enum-member-number-separation": "on",
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Documentation:
|
|
80
|
+
* https://github.com/eslint/eslint/blob/master/docs/rules/no-bitwise.md
|
|
70
81
|
*
|
|
71
82
|
* Defined at:
|
|
72
83
|
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/style.js
|
|
@@ -76,7 +87,8 @@ module.exports = {
|
|
|
76
87
|
"no-bitwise": "off",
|
|
77
88
|
|
|
78
89
|
/**
|
|
79
|
-
* Documentation:
|
|
90
|
+
* Documentation:
|
|
91
|
+
* https://eslint.org/docs/rules/no-param-reassign
|
|
80
92
|
*
|
|
81
93
|
* Defined at:
|
|
82
94
|
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/best-practices.js
|
|
@@ -86,7 +98,8 @@ module.exports = {
|
|
|
86
98
|
"no-param-reassign": "off",
|
|
87
99
|
|
|
88
100
|
/**
|
|
89
|
-
* Documentation:
|
|
101
|
+
* Documentation:
|
|
102
|
+
* https://eslint.org/docs/rules/no-restricted-globals
|
|
90
103
|
*
|
|
91
104
|
* Defined at:
|
|
92
105
|
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/variables.js
|
|
@@ -96,7 +109,8 @@ module.exports = {
|
|
|
96
109
|
"no-restricted-globals": "off",
|
|
97
110
|
|
|
98
111
|
/**
|
|
99
|
-
* Documentation:
|
|
112
|
+
* Documentation:
|
|
113
|
+
* https://eslint.org/docs/rules/no-underscore-dangle
|
|
100
114
|
*
|
|
101
115
|
* Defined at:
|
|
102
116
|
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/style.js
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-isaacscript",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.77",
|
|
4
4
|
"description": "An ESLint config for IsaacScript projects.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,7 +8,14 @@
|
|
|
8
8
|
},
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"author": "Zamiell",
|
|
11
|
+
"files": [
|
|
12
|
+
"base.js",
|
|
13
|
+
"mod.js",
|
|
14
|
+
"jsdoc.js"
|
|
15
|
+
],
|
|
11
16
|
"devDependencies": {
|
|
17
|
+
"cspell": "^5.21.0",
|
|
18
|
+
"isaacscript-spell": "^1.0.3",
|
|
12
19
|
"prettier": "^2.6.2"
|
|
13
20
|
}
|
|
14
21
|
}
|
package/.cspell.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
|
|
3
|
-
"version": "0.2",
|
|
4
|
-
"words": [
|
|
5
|
-
"backticks",
|
|
6
|
-
"isaacscript",
|
|
7
|
-
"plusplus",
|
|
8
|
-
"sarisia",
|
|
9
|
-
"technote",
|
|
10
|
-
"Turnbull",
|
|
11
|
-
"unfixable",
|
|
12
|
-
"Zamiell"
|
|
13
|
-
]
|
|
14
|
-
}
|
package/.eslintrc.js
DELETED
package/.gitattributes
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Prevent Windows systems from cloning this repository with "\r\n" line endings
|
|
2
|
-
core.autocrlf=false
|
|
3
|
-
|
|
4
|
-
# Prevent people from making merge commits
|
|
5
|
-
# https://www.endoflineblog.com/gitflow-considered-harmful
|
|
6
|
-
pull.rebase=true
|
|
7
|
-
|
|
8
|
-
# Convert all files to use "\n" line endings
|
|
9
|
-
* text=auto eol=lf
|
package/.github/workflows/ci.yml
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
name: CI
|
|
2
|
-
|
|
3
|
-
on: [push, pull_request]
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
lint:
|
|
7
|
-
runs-on: ubuntu-latest
|
|
8
|
-
steps:
|
|
9
|
-
- name: Checkout the repository
|
|
10
|
-
uses: actions/checkout@v2
|
|
11
|
-
|
|
12
|
-
- name: Setup Node.js
|
|
13
|
-
uses: actions/setup-node@v2
|
|
14
|
-
with:
|
|
15
|
-
# The default version is 14. The ESLint config requires Node 16 to work properly.
|
|
16
|
-
node-version: '16'
|
|
17
|
-
|
|
18
|
-
- name: Retrieve the cached "node_modules" directory (if present)
|
|
19
|
-
uses: actions/cache@v2
|
|
20
|
-
id: node-cache
|
|
21
|
-
with:
|
|
22
|
-
path: node_modules
|
|
23
|
-
key: node-modules-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
|
|
24
|
-
|
|
25
|
-
- name: Install dependencies (if the cached directory was not found)
|
|
26
|
-
if: steps.node-cache.outputs.cache-hit != 'true'
|
|
27
|
-
run: npm ci
|
|
28
|
-
|
|
29
|
-
- name: Perform automated checks
|
|
30
|
-
run: bash lint.sh
|
|
31
|
-
|
|
32
|
-
discord:
|
|
33
|
-
name: Discord Failure Notification
|
|
34
|
-
needs: [lint]
|
|
35
|
-
if: always() # This is needed to always run this job, even if the other jobs fail.
|
|
36
|
-
runs-on: ubuntu-latest
|
|
37
|
-
steps:
|
|
38
|
-
- uses: technote-space/workflow-conclusion-action@v2
|
|
39
|
-
- if: env.WORKFLOW_CONCLUSION != 'success' && env.WORKFLOW_CONCLUSION != 'cancelled'
|
|
40
|
-
uses: sarisia/actions-status-discord@v1
|
|
41
|
-
with:
|
|
42
|
-
webhook: ${{ secrets.DISCORD_WEBHOOK }}
|
|
43
|
-
status: ${{ env.WORKFLOW_CONCLUSION }}
|
|
44
|
-
title: ""
|
package/.prettierrc.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// This is the configuration file for Prettier, the auto-formatter:
|
|
2
|
-
// https://prettier.io/docs/en/configuration.html
|
|
3
|
-
module.exports = {
|
|
4
|
-
// https://prettier.io/docs/en/options.html#trailing-commas
|
|
5
|
-
// The default is "es5" - Trailing commas where valid in ES5 (objects, arrays, etc.)
|
|
6
|
-
// However, always having trailing commas is objectively better. The Airbnb style guide agrees:
|
|
7
|
-
// https://github.com/airbnb/javascript#commas--dangling
|
|
8
|
-
// Prettier itself also acknowledges Nik Graf's blog in their official blog:
|
|
9
|
-
// https://prettier.io/blog/2020/03/21/2.0.0.html#change-default-value-for-trailingcomma-to-es5-6963httpsgithubcomprettierprettierpull6963-by-fiskerhttpsgithubcomfisker
|
|
10
|
-
// https://medium.com/@nikgraf/why-you-should-enforce-dangling-commas-for-multiline-statements-d034c98e36f8
|
|
11
|
-
// Prettier will change the default in the future:
|
|
12
|
-
// https://github.com/prettier/prettier/issues/9369
|
|
13
|
-
trailingComma: "all",
|
|
14
|
-
endOfLine: "lf",
|
|
15
|
-
};
|
package/.vscode/extensions.json
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// These are Visual Studio Code extensions that are intended to be used with this particular
|
|
2
|
-
// repository:
|
|
3
|
-
// https://go.microsoft.com/fwlink/?LinkId=827846
|
|
4
|
-
{
|
|
5
|
-
"recommendations": [
|
|
6
|
-
"esbenp.prettier-vscode", // The TypeScript formatter
|
|
7
|
-
"streetsidesoftware.code-spell-checker", // A spell-checker extension based on cspell
|
|
8
|
-
]
|
|
9
|
-
}
|
package/.vscode/settings.json
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// These are Visual Studio Code settings that should apply to this particular repository.
|
|
2
|
-
{
|
|
3
|
-
// ----------------
|
|
4
|
-
// Vanilla settings
|
|
5
|
-
// ----------------
|
|
6
|
-
|
|
7
|
-
// This matches the Airbnb JavaScript style guide.
|
|
8
|
-
"editor.rulers": [100],
|
|
9
|
-
"editor.tabSize": 2,
|
|
10
|
-
|
|
11
|
-
// Linux line endings are used in this project.
|
|
12
|
-
"files.eol": "\n",
|
|
13
|
-
|
|
14
|
-
// Automatically removing all trailing whitespace when saving a file.
|
|
15
|
-
"files.trimTrailingWhitespace": true,
|
|
16
|
-
|
|
17
|
-
// ----------
|
|
18
|
-
// JavaScript
|
|
19
|
-
// ----------
|
|
20
|
-
|
|
21
|
-
// Automatically run the formatter when certain files are saved.
|
|
22
|
-
"[javascript]": {
|
|
23
|
-
"editor.codeActionsOnSave": [
|
|
24
|
-
"source.fixAll.eslint",
|
|
25
|
-
],
|
|
26
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
27
|
-
"editor.formatOnSave": true,
|
|
28
|
-
"editor.tabSize": 2,
|
|
29
|
-
},
|
|
30
|
-
}
|
package/lint.sh
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
set -e # Exit on any errors
|
|
4
|
-
|
|
5
|
-
# Get the directory of this script:
|
|
6
|
-
# https://stackoverflow.com/questions/59895/getting-the-source-directory-of-a-bash-script-from-within
|
|
7
|
-
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
8
|
-
|
|
9
|
-
cd "$DIR"
|
|
10
|
-
npx prettier --check base.js mod.js
|
|
11
|
-
echo "Success!"
|
package/publish.sh
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
set -e # Exit on any errors
|
|
4
|
-
|
|
5
|
-
# Get the directory of this script:
|
|
6
|
-
# https://stackoverflow.com/questions/59895/getting-the-source-directory-of-a-bash-script-from-within
|
|
7
|
-
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
8
|
-
|
|
9
|
-
cd "$DIR"
|
|
10
|
-
pip install publish-npm --upgrade --quiet
|
|
11
|
-
publish-npm "$@"
|
package/update.sh
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
set -e # Exit on any errors
|
|
4
|
-
|
|
5
|
-
# Get the directory of this script:
|
|
6
|
-
# https://stackoverflow.com/questions/59895/getting-the-source-directory-of-a-bash-script-from-within
|
|
7
|
-
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
8
|
-
|
|
9
|
-
cd "$DIR"
|
|
10
|
-
|
|
11
|
-
PACKAGE_JSON="$DIR/package.json"
|
|
12
|
-
OLD_HASH=$(md5sum "$PACKAGE_JSON")
|
|
13
|
-
npx npm-check-updates --upgrade --packageFile "$PACKAGE_JSON"
|
|
14
|
-
NEW_HASH=$(md5sum "$PACKAGE_JSON")
|
|
15
|
-
if [[ $OLD_HASH != $NEW_HASH ]]; then
|
|
16
|
-
npm install
|
|
17
|
-
fi
|