Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Zamiell committed Sep 11, 2024
1 parent 25db3d6 commit 83e8e2f
Show file tree
Hide file tree
Showing 81 changed files with 368 additions and 1,759 deletions.
5 changes: 0 additions & 5 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,4 @@ packages/docs/docs/isaacscript-common
packages/docs/docs/isaac-typescript-definitions
packages/docs/docs/eslint-config-isaacscript

# Rules copied from ESLint
packages/eslint-plugin-isaacscript/src/rules/eqeqeq-fix.ts
packages/eslint-plugin-isaacscript/src/rules/no-useless-return.ts
packages/eslint-plugin-isaacscript/src/rules/prefer-const.ts

# @template-customization-end
17 changes: 8 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"clsx": "^2.1.1",
"commander": "^12.1.0",
"complete-common": "^1.0.0",
"complete-lint": "^1.6.1",
"complete-lint": "^1.7.0",
"complete-node": "^1.3.0",
"cspell": "^8.14.2",
"cspell-check-unused-words": "^1.3.2",
Expand Down
23 changes: 1 addition & 22 deletions packages/docs/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import { FlatCompat } from "@eslint/eslintrc";
// eslint-disable-next-line import-x/no-extraneous-dependencies
import {
completeConfigBase,
completeConfigMonorepo,
} from "eslint-config-complete";
import path from "node:path";
import tseslint from "typescript-eslint";

const REPO_ROOT = path.join(import.meta.dirname, "..", "..");

const compat = new FlatCompat({
baseDirectory: import.meta.dirname,
});
Expand All @@ -22,25 +20,6 @@ export default tseslint.config(
"import-x/no-default-export": "off", // React uses default exports.
"n/file-extension-in-import": "off", // Docusaurus does not yet use ESM.
"no-alert": "off",

// This rule has to be told which "package.json" file that the dependencies are located in.
// (The "package.json" file for the "docs" package does not contain any of the actual
// dependencies.)
"import-x/no-extraneous-dependencies": [
"warn",
{
packageDir: REPO_ROOT,
},
],
},
},

// Since we modified the "import-x/no-extraneous-dependencies" rule above, we have to also
// copy-paste the override.
{
files: ["**/scripts/*.{js,cjs,mjs,ts,cts,mts}"],
rules: {
"import-x/no-extraneous-dependencies": "off",
},
},

Expand Down
2 changes: 1 addition & 1 deletion packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@types/glob": "^8.1.0",
"@types/node": "^22.5.4",
"@zamiell/typedoc-plugin-not-exported": "^0.3.0",
"complete-lint": "^1.6.1",
"complete-lint": "^1.7.0",
"glob": "^11.0.0",
"typedoc": "^0.26.7",
"typedoc-plugin-markdown": "^4.2.7",
Expand Down
3 changes: 3 additions & 0 deletions packages/eslint-config-isaacscript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,8 @@
"dependencies": {
"eslint-plugin-isaacscript": "^3.12.2",
"typescript-eslint": "^8.5.0"
},
"devDependencies": {
"complete-node": "^1.3.0"
}
}
2 changes: 1 addition & 1 deletion packages/eslint-config-isaacscript/scripts/lint.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { $, lintScript } from "complete-node"; // eslint-disable-line import-x/no-extraneous-dependencies
import { $, lintScript } from "complete-node";

await lintScript(async () => {
const promises = [
Expand Down
Loading

0 comments on commit 83e8e2f

Please sign in to comment.