eslint-config-isaacscript 1.0.53 → 1.0.56
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/.gitattributes +7 -0
- package/.vscode/extensions.json +1 -0
- package/.vscode/settings.json +5 -3
- package/base.js +7 -5
- package/lint.sh +1 -9
- package/package.json +2 -4
package/.gitattributes
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
# Prevent Windows systems from cloning this repository with "\r\n" line endings
|
|
2
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/.vscode/extensions.json
CHANGED
package/.vscode/settings.json
CHANGED
|
@@ -20,9 +20,11 @@
|
|
|
20
20
|
|
|
21
21
|
// Automatically run the formatter when a JavaScript file is saved
|
|
22
22
|
"[javascript]": {
|
|
23
|
-
"editor.
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
24
|
+
"editor.formatOnSave": true,
|
|
25
|
+
"editor.codeActionsOnSave": {
|
|
26
|
+
"source.fixAll.eslint": true,
|
|
27
|
+
},
|
|
26
28
|
"editor.tabSize": 2,
|
|
27
29
|
},
|
|
28
30
|
}
|
package/base.js
CHANGED
|
@@ -47,11 +47,9 @@ module.exports = {
|
|
|
47
47
|
// https://github.com/Zamiell/eslint-plugin-no-void-return-type
|
|
48
48
|
"plugin:no-void-return-type/recommended",
|
|
49
49
|
|
|
50
|
-
//
|
|
51
|
-
//
|
|
52
|
-
|
|
53
|
-
// https://silvenon.com/blog/integrating-and-enforcing-prettier-and-eslint
|
|
54
|
-
"plugin:prettier/recommended",
|
|
50
|
+
// This prevents declaring variables without a type
|
|
51
|
+
// https://github.com/Zamiell/eslint-plugin-no-let-any
|
|
52
|
+
"plugin:no-let-any/recommended",
|
|
55
53
|
|
|
56
54
|
// Disable any ESLint rules that conflict with Prettier
|
|
57
55
|
// (otherwise, we will have unfixable ESLint errors)
|
|
@@ -75,6 +73,10 @@ module.exports = {
|
|
|
75
73
|
// Prefer the "[]string" syntax over "Array<string>"
|
|
76
74
|
"@typescript-eslint/array-type": ["warn", { default: "array-simple" }],
|
|
77
75
|
|
|
76
|
+
// Documentation:
|
|
77
|
+
// https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md
|
|
78
|
+
"@typescript-eslint/explicit-module-boundary-types": "on",
|
|
79
|
+
|
|
78
80
|
// Documentation:
|
|
79
81
|
// https://eslint.org/docs/rules/lines-between-class-members
|
|
80
82
|
// https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/lines-between-class-members.md
|
package/lint.sh
CHANGED
|
@@ -6,14 +6,6 @@ set -e # Exit on any errors
|
|
|
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
|
|
|
9
|
-
# The latest version of some ESLint plugins require Node.js v16
|
|
10
|
-
NODE_VERSION=$(node --version | cut -c 2-3)
|
|
11
|
-
if (($NODE_VERSION < 16)); then
|
|
12
|
-
echo "error: requires Node.js version 16"
|
|
13
|
-
exit 1
|
|
14
|
-
fi
|
|
15
|
-
|
|
16
9
|
cd "$DIR"
|
|
17
|
-
npx
|
|
18
|
-
npx eslint --max-warnings 0 mod.js
|
|
10
|
+
npx prettier --check base.js mod.js
|
|
19
11
|
echo "Success!"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-isaacscript",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.56",
|
|
4
4
|
"description": "An ESLint config for IsaacScript projects.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,8 +9,6 @@
|
|
|
9
9
|
"license": "GPL-3.0",
|
|
10
10
|
"author": "Zamiell",
|
|
11
11
|
"devDependencies": {
|
|
12
|
-
"
|
|
13
|
-
"eslint-plugin-prettier": "^4.0.0",
|
|
14
|
-
"prettier": "^2.5.0"
|
|
12
|
+
"prettier": "^2.5.1"
|
|
15
13
|
}
|
|
16
14
|
}
|