Skip to content

Commit

Permalink
🎨 Remove unused directive comments for ESLint (#235)
Browse files Browse the repository at this point in the history
* 🔧 Add `--report-unused-disable-directives` option to `eslint` command ( 73bcc30 )

* 🎨 Remove unused directive comments for ESLint ( 06d3896 )

* 🔧 Modify comments in `Taskfile.yml` file ( 30941e6 )

* 📝 Update CHANGELOG ( 3ed956a )
  • Loading branch information
sounisi5011 authored Jul 11, 2023
1 parent fe12c7d commit afe2cab
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ Because it is the minimum version available for Vitest.
* [#226] - Ensure that scripts in the "Get the diff from the latest commit where the GitHub Actions succeeded" step finish successfully even if the `context.payload.pull_request` is undefined
* [#227] - Migrate from CommonJS to ESM
* [#228] - Reduce package size
* [#235] - Remove unused directive comments for ESLint

[#182]: https://github.com/sounisi5011/package-version-git-tag/pull/182
[#183]: https://github.com/sounisi5011/package-version-git-tag/pull/183
Expand Down Expand Up @@ -223,6 +224,7 @@ Because it is the minimum version available for Vitest.
[#230]: https://github.com/sounisi5011/package-version-git-tag/pull/230
[#233]: https://github.com/sounisi5011/package-version-git-tag/pull/233
[#234]: https://github.com/sounisi5011/package-version-git-tag/pull/234
[#235]: https://github.com/sounisi5011/package-version-git-tag/pull/235

## [3.0.0] (2020-06-02 UTC)

Expand Down
6 changes: 5 additions & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,17 @@ tasks:
_fmt-xs:
internal: true
cmds:
# Note: The "--report-unused-disable-directives" option was intentionally omitted for this command.
# The "--report-unused-disable-directives" option and the "--fix" option together will automatically remove old directive comments.
# However, the line from which the comment was removed remains intact, and Prettier may not remove this line.
# For this reason, we remove old directive comments manually.
- eslint {{- if .ESLINT_EXT }} --ext '{{ .ESLINT_EXT }}' {{- end }} --fix ./

lint:
deps: [eslint, tsc-src, tsc-test]
eslint:
cmds:
- eslint ./
- eslint --report-unused-disable-directives ./
tsc-src:
cmds:
- tsc --noEmit
Expand Down
1 change: 0 additions & 1 deletion test/helpers/git-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export default async function (
* Note: The try...catch statement does not catch the error for the http/https module.
* @see https://github.com/expressjs/express/issues/2856#issuecomment-172566787
*/
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
repos.server?.on('error', reject);
})
.then(() => {
Expand Down
1 change: 0 additions & 1 deletion test/helpers/git.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ interface InitGitOptions {
execDefaultEnv?: NodeJS.ProcessEnv | undefined;
}

/* eslint-disable import/export */
export async function initGit(
dirpath: string,
options: InitGitOptions & {
Expand Down

0 comments on commit afe2cab

Please sign in to comment.