Skip to content

Commit 784a933

Browse files
fix: cleaned up eslint-plugin-n templating (#560)
<!-- 👋 Hi, thanks for sending a PR to template-typescript-node-package! 💖. Please fill out all fields below and make sure each item is true and [x] checked. Otherwise we may not be able to review your PR. --> ## PR Checklist - [x] Addresses an existing open issue: fixes #558; fixes #559 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/template-typescript-node-package/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/template-typescript-node-package/blob/main/.github/CONTRIBUTING.md) were taken ## Overview Applies some cleanups around the ESLint plugin.
1 parent 1530915 commit 784a933

File tree

4 files changed

+8
-14
lines changed

4 files changed

+8
-14
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,10 @@ module.exports = {
126126
// These off/less-strict-by-default rules work well for this repo and we like them on.
127127
"@typescript-eslint/no-unused-vars": ["error", { caughtErrors: "all" }],
128128
"import/extensions": ["error", "ignorePackages"],
129-
"n/no-missing-import": [
130-
"error",
131-
{
132-
allowModules: ["template-typescript-node-package"],
133-
},
134-
],
135129
"no-only-tests/no-only-tests": "error",
136130

137131
// These on-by-default rules don't work well for this repo and we like them off.
132+
"n/no-missing-import": "off",
138133
"no-case-declarations": "off",
139134
"no-constant-condition": "off",
140135
"no-inner-declarations": "off",

src/hydrate/steps/finalizeDependencies.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ describe("finalize", () => {
3030
"eslint-plugin-jsdoc@latest",
3131
"eslint-plugin-jsonc@latest",
3232
"eslint-plugin-markdown@latest",
33+
"eslint-plugin-n@latest",
3334
"eslint-plugin-perfectionist@latest",
3435
"eslint-plugin-regexp@latest",
3536
"eslint-plugin-yml@latest",
@@ -73,6 +74,7 @@ describe("finalize", () => {
7374
"eslint-plugin-jsdoc@latest",
7475
"eslint-plugin-jsonc@latest",
7576
"eslint-plugin-markdown@latest",
77+
"eslint-plugin-n@latest",
7678
"eslint-plugin-perfectionist@latest",
7779
"eslint-plugin-regexp@latest",
7880
"eslint-plugin-yml@latest",

src/hydrate/steps/finalizeDependencies.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export async function finalizeDependencies({
2020
"eslint-plugin-jsdoc",
2121
"eslint-plugin-jsonc",
2222
"eslint-plugin-markdown",
23+
"eslint-plugin-n",
2324
"eslint-plugin-perfectionist",
2425
"eslint-plugin-regexp",
2526
"eslint-plugin-yml",

src/hydrate/steps/writing/creation/rootFiles.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,20 +142,16 @@ module.exports = {
142142
"import",
143143
"jsdoc",${values.unitTests ? `\n"no-only-tests",` : ""}
144144
"perfectionist",
145-
"regexp",
146-
"typescript-sort-keys",${values.unitTests ? `\n"vitest",` : ""}
145+
"regexp",${values.unitTests ? `\n"vitest",` : ""}
147146
],
148147
root: true,
149148
rules: {
150149
// These off/less-strict-by-default rules work well for this repo and we like them on.
151150
"@typescript-eslint/no-unused-vars": ["error", { caughtErrors: "all" }],
152151
"import/extensions": ["error", "ignorePackages"],
153-
"n/no-missing-import": [
154-
"error",
155-
{
156-
allowModules: ["template-typescript-node-package"],
157-
},
158-
],${values.unitTests ? `\n"no-only-tests/no-only-tests": "error",` : ""}
152+
"n/no-missing-import": "off",${
153+
values.unitTests ? `\n"no-only-tests/no-only-tests": "error",` : ""
154+
}
159155
160156
// These on-by-default rules don't work well for this repo and we like them off.
161157
"no-case-declarations": "off",

0 commit comments

Comments
 (0)