eslint-config-isaacscript 4.20.0 → 5.0.0

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2022 IsaacScript
3
+ Copyright (c) 2022 The IsaacScript Contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
6
 
package/README.md CHANGED
@@ -1,7 +1,5 @@
1
- # eslint-config-isaacscript
1
+ # `eslint-config-isaacscript`
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/eslint-config-isaacscript.svg)](https://www.npmjs.com/package/eslint-config-isaacscript)
4
4
 
5
- This is a sharable configuration for [ESLint](https://eslint.org/) that is intended to be used in TypeScript projects.
6
-
7
- Please see the [docs](https://isaacscript.github.io/eslint-config-isaacscript) for more information.
5
+ This is a shared configuration for [ESLint](https://eslint.org/) that is intended to be used in [IsaacScript](https://isaacscript.github.io/) mods. (By default, IsaacScript mods are automatically configured to use this config.)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-isaacscript",
3
- "version": "4.20.0",
3
+ "version": "5.0.0",
4
4
  "description": "A sharable ESLint config for TypeScript and IsaacScript projects.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "license": "MIT",
23
23
  "author": "Zamiell",
24
- "type": "commonjs",
24
+ "type": "module",
25
25
  "files": [
26
26
  "configs",
27
27
  "base.js",
@@ -31,10 +31,13 @@
31
31
  "README.md"
32
32
  ],
33
33
  "scripts": {
34
- "lint": "tsx ./scripts/lint.mts",
35
- "query-rule": "tsx ./scripts/queryRule.mts"
34
+ "lint": "tsx ./scripts/lint.ts"
36
35
  },
37
36
  "dependencies": {
38
- "confusing-browser-globals": "^1.0.11"
37
+ "eslint-plugin-isaacscript": "^4.0.0",
38
+ "typescript-eslint": "^8.5.0"
39
+ },
40
+ "devDependencies": {
41
+ "complete-node": "^1.3.0"
39
42
  }
40
43
  }
package/base.js DELETED
@@ -1,68 +0,0 @@
1
- /**
2
- * This ESLint config is meant to be used as a base for all TypeScript projects.
3
- *
4
- * @type {import("eslint").Linter.Config}
5
- */
6
- const config = {
7
- extends: [
8
- /**
9
- * Find deprecated code:
10
- * https://github.com/gund/eslint-plugin-deprecation
11
- */
12
- "plugin:deprecation/recommended",
13
-
14
- /**
15
- * This provides extra miscellaneous rules to keep code safe:
16
- * https://github.com/IsaacScript/isaacscript/tree/main/packages/eslint-plugin-isaacscript
17
- */
18
- "plugin:isaacscript/recommended",
19
-
20
- /**
21
- * Disable any ESLint rules that conflict with Prettier:
22
- * https://github.com/prettier/eslint-config-prettier
23
- * Otherwise, we will have unfixable ESLint errors. Note that the Prettier config has to be
24
- * before the base ESLint config below since we customize some special rules as documented here:
25
- * https://github.com/prettier/eslint-config-prettier#special-rules
26
- */
27
- "prettier",
28
-
29
- /**
30
- * Rule modifications are split out into different files for better organization (based on the
31
- * originating plugin) .
32
- */
33
- "./configs/base-eslint",
34
- "./configs/base-no-autofix",
35
- "./configs/base-typescript-eslint",
36
- "./configs/base-eslint-comments",
37
- "./configs/base-import",
38
- "./configs/base-jsdoc",
39
- "./configs/base-n", // "n" stands for Node.
40
- "./configs/base-unicorn",
41
- ],
42
-
43
- plugins: [
44
- /**
45
- * Activate the "eslint-plugin-only-warn" plugin to change all errors to warnings:
46
- * https://github.com/bfanger/eslint-plugin-only-warn
47
- *
48
- * This allows the end-user to more easily distinguish between errors from the TypeScript
49
- * compiler (which show up in red) and ESLint rule violations (which show up in yellow).
50
- */
51
- "only-warn",
52
- ],
53
-
54
- overrides: [
55
- // Disable some TypeScript-specific rules in JavaScript files.
56
- {
57
- files: ["*.js", "*.cjs", "*.mjs", "*.jsx"],
58
- rules: {
59
- "isaacscript/no-let-any": "off",
60
- "isaacscript/no-object-any": "off",
61
- "isaacscript/require-capital-const-assertions": "off",
62
- "isaacscript/require-capital-read-only": "off",
63
- },
64
- },
65
- ],
66
- };
67
-
68
- module.exports = config;
@@ -1,59 +0,0 @@
1
- // This ESLint config only contains rules from `eslint-plugin-eslint-comments`:
2
- // https://github.com/mysticatea/eslint-plugin-eslint-comments
3
-
4
- // Rules are separated into categories:
5
- // 1) Best Practices
6
- // 2) Stylistic Issues
7
-
8
- /** @type {import("eslint").Linter.RulesRecord} */
9
- const BEST_PRACTICES = {
10
- /**
11
- * The `allowWholeFile` option is enabled because it is common practice to use "eslint-disable"
12
- * comments for a whole file.
13
- */
14
- "eslint-comments/disable-enable-pair": [
15
- "error",
16
- {
17
- allowWholeFile: true,
18
- },
19
- ],
20
-
21
- "eslint-comments/no-aggregating-enable": "error",
22
- "eslint-comments/no-duplicate-disable": "error",
23
-
24
- /**
25
- * Disabled because if a line breaks three or more ESLint rules, then it is useful to use a single
26
- * "eslint-disable" comment to make things more concise.
27
- */
28
- "eslint-comments/no-unlimited-disable": "off",
29
-
30
- "eslint-comments/no-unused-disable": "error",
31
- "eslint-comments/no-unused-enable": "error",
32
- };
33
-
34
- /** @type {import("eslint").Linter.RulesRecord} */
35
- const STYLISTIC_ISSUES = {
36
- /**
37
- * Disabled because it is only useful in projects that want to prevent disabling specific ESLint
38
- * rules.
39
- */
40
- "eslint-comments/no-restricted-disable": "off",
41
-
42
- /** Disabled because we want to allow disabling ESLint rules where appropriate. */
43
- "eslint-comments/no-use": "off",
44
-
45
- /** Disabled because requiring descriptions for every ESLint disable would be too cumbersome. */
46
- "eslint-comments/require-description": "off",
47
- };
48
-
49
- /** @type {import("eslint").Linter.Config} */
50
- const config = {
51
- plugins: ["eslint-comments"],
52
-
53
- rules: {
54
- ...BEST_PRACTICES,
55
- ...STYLISTIC_ISSUES,
56
- },
57
- };
58
-
59
- module.exports = config;