generated from JoshuaKGoldberg/create-typescript-app
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: get ESLint running again (#590)
* chore: get ESLint running again * add missing dependencies * add missing dependencies * Fixed up most lint:knip complaints * release-it too, with a dedupe
- Loading branch information
1 parent
2b4f556
commit 5948b03
Showing
13 changed files
with
1,139 additions
and
1,597 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ | |
"outro", | ||
"packagejson", | ||
"quickstart", | ||
"tseslint", | ||
"tsup", | ||
"wontfix" | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
import eslint from "@eslint/js"; | ||
import comments from "@eslint-community/eslint-plugin-eslint-comments/configs"; | ||
import vitest from "@vitest/eslint-plugin"; | ||
import jsdoc from "eslint-plugin-jsdoc"; | ||
import jsonc from "eslint-plugin-jsonc"; | ||
import markdown from "eslint-plugin-markdown"; | ||
import n from "eslint-plugin-n"; | ||
import packageJson from "eslint-plugin-package-json/configs/recommended"; | ||
import perfectionist from "eslint-plugin-perfectionist"; | ||
import * as regexp from "eslint-plugin-regexp"; | ||
import yml from "eslint-plugin-yml"; | ||
import tseslint from "typescript-eslint"; | ||
|
||
export default tseslint.config( | ||
{ | ||
ignores: [ | ||
"coverage", | ||
"eslint.config.mjs", | ||
"lib", | ||
"node_modules", | ||
"pnpm-lock.yaml", | ||
], | ||
}, | ||
{ | ||
linterOptions: { | ||
reportUnusedDisableDirectives: "error", | ||
}, | ||
}, | ||
eslint.configs.recommended, | ||
...jsonc.configs["flat/recommended-with-json"], | ||
...markdown.configs.recommended, | ||
...yml.configs["flat/recommended"], | ||
...yml.configs["flat/prettier"], | ||
comments.recommended, | ||
jsdoc.configs["flat/contents-typescript-error"], | ||
jsdoc.configs["flat/logical-typescript-error"], | ||
jsdoc.configs["flat/stylistic-typescript-error"], | ||
n.configs["flat/recommended"], | ||
packageJson, | ||
perfectionist.configs["recommended-natural"], | ||
regexp.configs["flat/recommended"], | ||
...tseslint.config({ | ||
extends: [ | ||
...tseslint.configs.strictTypeChecked, | ||
...tseslint.configs.stylisticTypeChecked, | ||
], | ||
files: ["**/*.js", "**/*.ts"], | ||
languageOptions: { | ||
parserOptions: { | ||
projectService: { | ||
allowDefaultProject: ["*.config.*s"], | ||
}, | ||
tsconfigRootDir: import.meta.dirname, | ||
}, | ||
}, | ||
rules: { | ||
// These off-by-default rules work well for this repo and we like them on. | ||
"logical-assignment-operators": [ | ||
"error", | ||
"always", | ||
{ enforceForIfStatements: true }, | ||
], | ||
"operator-assignment": "error", | ||
|
||
// Stylistic concerns that don't interfere with Prettier | ||
"no-useless-rename": "error", | ||
"object-shorthand": "error", | ||
}, | ||
}), | ||
{ | ||
extends: [tseslint.configs.disableTypeChecked], | ||
files: ["**/*.md/*.ts"], | ||
rules: { | ||
"n/no-missing-import": [ | ||
"error", | ||
{ allowModules: ["create-typescript-app"] }, | ||
], | ||
}, | ||
}, | ||
{ | ||
files: ["**/*.test.*"], | ||
languageOptions: { | ||
globals: vitest.environments.env.globals, | ||
}, | ||
plugins: { vitest }, | ||
}, | ||
{ | ||
files: ["**/*.{yml,yaml}"], | ||
rules: { | ||
"yml/file-extension": ["error", { extension: "yml" }], | ||
"yml/sort-keys": [ | ||
"error", | ||
{ | ||
order: { type: "asc" }, | ||
pathPattern: "^.*$", | ||
}, | ||
], | ||
"yml/sort-sequence-values": [ | ||
"error", | ||
{ | ||
order: { type: "asc" }, | ||
pathPattern: "^.*$", | ||
}, | ||
], | ||
}, | ||
}, | ||
); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.