generated from JoshuaKGoldberg/create-typescript-app
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: migrate to ESLint v9 and relevant packages (#362)
<!-- 👋 Hi, thanks for sending a PR to release-it-action! 💖. 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 #361 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/release-it-action/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/release-it-action/blob/main/.github/CONTRIBUTING.md) were taken ## Overview - Support ESLint v9
- Loading branch information
Showing
15 changed files
with
639 additions
and
710 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 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 |
---|---|---|
|
@@ -83,9 +83,9 @@ import { releaseItAction } from "release-it-action"; | |
await releaseItAction({ | ||
branch: "main", | ||
githubToken: process.env.GITHUB_TOKEN, | ||
gitUserEmail: "[email protected]", | ||
gitUserName: "YourUsername", | ||
githubToken: process.env.GITHUB_TOKEN, | ||
npmToken: process.env.NPM_TOKEN, | ||
owner: "YourUsername", | ||
repo: "your-repository", | ||
|
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 |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
"npmjs", | ||
"npmpackagejsonlintrc", | ||
"outro", | ||
"packagejson" | ||
"packagejson", | ||
"tseslint" | ||
] | ||
} |
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,98 @@ | ||
import comments from "@eslint-community/eslint-plugin-eslint-comments/configs"; | ||
import eslint from "@eslint/js"; | ||
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: [ | ||
"**/*.snap", | ||
"coverage", | ||
"lib", | ||
"node_modules", | ||
"pnpm-lock.yaml", | ||
"!.*", | ||
"dist", | ||
], | ||
}, | ||
{ linterOptions: { reportUnusedDisableDirectives: "error" } }, | ||
eslint.configs.recommended, | ||
comments.recommended, | ||
jsdoc.configs["flat/contents-typescript-error"], | ||
jsdoc.configs["flat/logical-typescript-error"], | ||
jsdoc.configs["flat/stylistic-typescript-error"], | ||
jsonc.configs["flat/recommended-with-json"], | ||
markdown.configs.recommended, | ||
n.configs["flat/recommended"], | ||
packageJson, | ||
perfectionist.configs["recommended-natural"], | ||
regexp.configs["flat/recommended"], | ||
{ | ||
extends: [ | ||
tseslint.configs.strictTypeChecked, | ||
tseslint.configs.stylisticTypeChecked, | ||
], | ||
files: ["**/*.js", "**/*.ts"], | ||
languageOptions: { | ||
parserOptions: { | ||
projectService: { allowDefaultProject: ["*.config.*s"] }, | ||
tsconfigRootDir: import.meta.dirname, | ||
}, | ||
}, | ||
rules: { | ||
// Stylistic concerns that don't interfere with Prettier | ||
"logical-assignment-operators": [ | ||
"error", | ||
"always", | ||
{ enforceForIfStatements: true }, | ||
], | ||
"n/no-missing-import": [ | ||
"error", | ||
{ | ||
ignoreTypeImport: true, | ||
}, | ||
], | ||
"no-useless-rename": "error", | ||
"object-shorthand": "error", | ||
"operator-assignment": "error", | ||
}, | ||
settings: { perfectionist: { partitionByComment: true, type: "natural" } }, | ||
}, | ||
{ | ||
extends: [tseslint.configs.disableTypeChecked], | ||
files: ["**/*.md/*.ts"], | ||
rules: { | ||
"n/no-missing-import": ["error", { allowModules: ["release-it-action"] }], | ||
}, | ||
}, | ||
{ | ||
extends: [vitest.configs.recommended], | ||
files: ["**/*.test.*"], | ||
rules: { | ||
"@typescript-eslint/no-unsafe-assignment": "off", | ||
}, | ||
}, | ||
{ | ||
extends: [yml.configs["flat/recommended"], yml.configs["flat/prettier"]], | ||
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: "^.*$" }, | ||
], | ||
}, | ||
}, | ||
); |
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 |
---|---|---|
|
@@ -23,7 +23,7 @@ | |
"build": "tsc", | ||
"build:release": "ncc build src/action/index.ts -o dist", | ||
"format": "prettier \"**/*\" --ignore-unknown", | ||
"lint": "eslint . .*js --max-warnings 0 --report-unused-disable-directives", | ||
"lint": "eslint . --max-warnings 0", | ||
"lint:knip": "knip", | ||
"lint:md": "markdownlint \"**/*.md\" \".github/**/*.md\" --rules sentences-per-line", | ||
"lint:package-json": "npmPkgJsonLint ./package.json", | ||
|
@@ -44,29 +44,26 @@ | |
"execa": "^8.0.1" | ||
}, | ||
"devDependencies": { | ||
"@octokit/types": "^13.0.0", | ||
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1", | ||
"@eslint/js": "^9.16.0", | ||
"@octokit/types": "^13.6.2", | ||
"@release-it/conventional-changelog": "^9.0.0", | ||
"@types/eslint": "^8.44.3", | ||
"@typescript-eslint/eslint-plugin": "^7.0.0", | ||
"@typescript-eslint/parser": "^8.0.0", | ||
"@types/eslint-plugin-markdown": "^2.0.2", | ||
"@vercel/ncc": "^0.38.0", | ||
"@vitest/coverage-v8": "^0.34.6", | ||
"@vitest/eslint-plugin": "^1.1.14", | ||
"console-fail-test": "^0.5.0", | ||
"cspell": "^8.0.0", | ||
"eslint": "^8.50.0", | ||
"eslint-plugin-deprecation": "^3.0.0", | ||
"eslint-plugin-eslint-comments": "^3.2.0", | ||
"eslint-plugin-jsdoc": "^50.0.0", | ||
"eslint-plugin-jsonc": "^2.9.0", | ||
"eslint-plugin-markdown": "^3.0.1", | ||
"eslint-plugin-n": "^17.0.0", | ||
"eslint-plugin-no-only-tests": "^3.1.0", | ||
"eslint-plugin-perfectionist": "^2.1.0", | ||
"eslint-plugin-regexp": "^2.0.0", | ||
"eslint-plugin-vitest": "^0.4.0", | ||
"eslint-plugin-yml": "^1.9.0", | ||
"eslint": "^9.16.0", | ||
"eslint-plugin-jsdoc": "^50.6.0", | ||
"eslint-plugin-jsonc": "^2.18.2", | ||
"eslint-plugin-markdown": "^5.1.0", | ||
"eslint-plugin-n": "^17.14.0", | ||
"eslint-plugin-package-json": "^0.18.0", | ||
"eslint-plugin-perfectionist": "^4.2.0", | ||
"eslint-plugin-regexp": "^2.7.0", | ||
"eslint-plugin-yml": "^1.16.0", | ||
"husky": "^9.0.0", | ||
"jsonc-eslint-parser": "^2.3.0", | ||
"knip": "^5.0.0", | ||
"lint-staged": "^15.0.0", | ||
"markdownlint": "^0.36.0", | ||
|
@@ -80,8 +77,8 @@ | |
"sentences-per-line": "^0.2.1", | ||
"should-semantic-release": "^0.3.0", | ||
"typescript": "^5.2.2", | ||
"vitest": "^0.34.6", | ||
"yaml-eslint-parser": "^1.2.2" | ||
"typescript-eslint": "^8.17.0", | ||
"vitest": "^0.34.6" | ||
}, | ||
"packageManager": "[email protected]", | ||
"engines": { | ||
|
Oops, something went wrong.