eslint-config-isaacscript 1.0.76 → 1.0.79
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/base.js +12 -6
- package/jsdoc.js +6 -2
- 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/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,7 +2,10 @@
|
|
|
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
|
|
|
@@ -32,7 +35,8 @@ module.exports = {
|
|
|
32
35
|
// - jsdoc/check-syntax - Not needed in TypeScript.
|
|
33
36
|
|
|
34
37
|
/**
|
|
35
|
-
* Documentation:
|
|
38
|
+
* Documentation:
|
|
39
|
+
* https://github.com/gajus/eslint-plugin-jsdoc#check-tag-names
|
|
36
40
|
*
|
|
37
41
|
* Reports invalid block tag names.
|
|
38
42
|
*/
|
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
|
+
"isaacscript/enum-member-number-separation": "warn",
|
|
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.79",
|
|
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
|