Skip to content

fix: exclude docs/ directory from eslint-plugin package #11251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

roottool
Copy link
Contributor

PR Checklist

Overview

This PR excludes docs/ directory from the published @typescript-eslint/eslint-plugin package.

I converted from README.md to ./README.md in files of package.json. This is because docs/rules/README.md is included in the eslint-plugin package after docs/ directory is excluded. I checked it with yarn pack --dry-run.

As an aside, I think that README.md in files can be deleted. README is always included in this files config.

Certain files are always included, regardless of settings:

  • package.json
  • README
  • LICENSE / LICENCE
  • The file in the "main" field
  • The file(s) in the "bin" field

files - package.json | npm Docs

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @roottool!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint.

Copy link

netlify bot commented May 28, 2025

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit b90bf9e
🔍 Latest deploy log https://app.netlify.com/projects/typescript-eslint/deploys/683dac3f4818b6000802e3d0
😎 Deploy Preview https://deploy-preview-11251--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 92 (🔴 down 5 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 98 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

nx-cloud bot commented May 28, 2025

View your CI Pipeline Execution ↗ for commit b90bf9e.

Command Status Duration Result
nx test eslint-plugin --coverage=false ✅ Succeeded 4m 59s View ↗
nx run-many -t typecheck ✅ Succeeded 1m 56s View ↗
nx run-many -t lint ✅ Succeeded 10s View ↗
nx test eslint-plugin-internal --coverage=false ✅ Succeeded <1s View ↗
nx run types:build ✅ Succeeded 1s View ↗
nx test typescript-estree --coverage=false ✅ Succeeded <1s View ↗
nx run generate-configs ✅ Succeeded 5s View ↗
nx run integration-tests:test ✅ Succeeded <1s View ↗
Additional runs (27) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2025-06-02 14:01:34 UTC

Copy link
Member

@kirkwaiblinger kirkwaiblinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Nice eagle eyes on the docs/rules/README.md inclusion.

@kirkwaiblinger
Copy link
Member

As an aside, I think that README.md in files can be deleted. README is always included in this files config.

Certain files are always included, regardless of settings:

  • package.json
  • README
  • LICENSE / LICENCE
  • The file in the "main" field
  • The file(s) in the "bin" field

files - package.json | npm Docs

Looks like the yarn equivalent of this also includes changelog.*, interestingly, explaining how CHANGELOG.md gets in there 🤷‍♂️. See yarn docs on files field -> their inclusion list.

I'm happy for us to omit explicit README and LICENSE from the files array but don't feel strongly. Feel free to update that before this gets merged if you prefer 👍

@kirkwaiblinger kirkwaiblinger added the 1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge label May 29, 2025
@roottool
Copy link
Contributor Author

Thank you for reviewing!

I'm happy for us to omit explicit README and LICENSE from the files array but don't feel strongly. Feel free to update that before this gets merged if you prefer 👍

I decided not to omit them. I thought it was odd that ./ was only in the README when I looked at it without understanding the background. However, it's no strong reason to omit the files with me.

Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice spots all around!

As one of the maintainers on eslint-plugin-package-json I'm hoping to eventually propose using its recommended sets here. Once they're stable. So I'd wager we might just get around to this after a while.

@kirkwaiblinger kirkwaiblinger changed the title chore: exclude docs/ directory from eslint-plugin package fix: exclude docs/ directory from eslint-plugin package Jun 2, 2025
@kirkwaiblinger kirkwaiblinger enabled auto-merge (squash) June 2, 2025 13:51
@kirkwaiblinger kirkwaiblinger merged commit c14bcac into typescript-eslint:main Jun 2, 2025
61 checks passed
@roottool roottool deleted the exclude-docs-in-eslint-plgin-package branch June 2, 2025 14:58
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Jun 6, 2025
| datasource | package                          | from   | to     |
| ---------- | -------------------------------- | ------ | ------ |
| npm        | @typescript-eslint/eslint-plugin | 8.32.1 | 8.33.1 |
| npm        | @typescript-eslint/parser        | 8.32.1 | 8.33.1 |


## [v8.33.1](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8331-2025-06-02)

##### 🩹 Fixes

-   exclude docs/ directory from eslint-plugin package ([#11251](typescript-eslint/typescript-eslint#11251))

##### ❤️ Thank You

-   roottool

You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website.


## [v8.33.0](https://github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8330-2025-05-26)

This was a version bump only for eslint-plugin to align it with other projects, there were no code changes.

You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Performance: [eslint-plugin] Stop publishing docs/ directory to npm
3 participants