eslint-config-isaacscript 1.0.52 → 1.0.55

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 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
@@ -3,6 +3,7 @@
3
3
  // https://go.microsoft.com/fwlink/?LinkId=827846
4
4
  {
5
5
  "recommendations": [
6
+ "esbenp.prettier-vscode", // The TypeScript formatter
6
7
  "streetsidesoftware.code-spell-checker", // A spell-checker extension based on cspell
7
8
  ]
8
9
  }
@@ -20,9 +20,11 @@
20
20
 
21
21
  // Automatically run the formatter when a JavaScript file is saved
22
22
  "[javascript]": {
23
- "editor.codeActionsOnSave": [
24
- "source.fixAll.eslint",
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
- // We use Prettier to automatically format TypeScript files
51
- // We want to run Prettier as an ESLint rule so that we can detect non-formatted files in CI
52
- // https://github.com/prettier/eslint-plugin-prettier
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)
@@ -226,6 +224,7 @@ module.exports = {
226
224
  definedTags: [
227
225
  "category", // Used in TypeDoc
228
226
  "hidden", // Used in TypeDoc
227
+ "internal", // Used by TypeScript
229
228
  "noResolution", // Used in TypeScriptToLua as a compiler annotation
230
229
  "noSelf", // Used in TypeScriptToLua as a compiler annotation
231
230
  ],
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 eslint --max-warnings 0 base.js
18
- npx eslint --max-warnings 0 mod.js
10
+ npx prettier --check base.js mod.js
19
11
  echo "Success!"
package/mod.js CHANGED
@@ -17,6 +17,7 @@ module.exports = {
17
17
  // https://github.com/iamturns/eslint-config-airbnb-typescript/blob/master/lib/shared.js
18
18
  // This rule throws false positives with API functions
19
19
  // It can be worked around by supplying lists of globals to ESLint, but this is ugly
20
+ // See: https://github.com/typescript-eslint/typescript-eslint/issues/2780
20
21
  "@typescript-eslint/no-loop-func": "off",
21
22
 
22
23
  // Documentation:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-isaacscript",
3
- "version": "1.0.52",
3
+ "version": "1.0.55",
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
- "eslint": "^8.3.0",
13
- "eslint-plugin-prettier": "^4.0.0",
14
- "prettier": "^2.5.0"
12
+ "prettier": "^2.5.1"
15
13
  }
16
14
  }