Skip to content
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

feat: expose shouldUseFlatConfig #17169

Merged
merged 1 commit into from May 10, 2023

Conversation

cprussin
Copy link
Contributor

@cprussin cprussin commented May 8, 2023

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[x] Add something to the core
[ ] Other, please explain:

What changes did you make? (Give an overview)

  • Moved shouldUseFlatConfig from lib/cli.js to lib/eslint/flat-eslint.js and exposed it via exports
  • Removed findFlatConfigFile from exports in lib/eslint/flat-eslint.js since it was only used to build shouldUseFlatConfig in lib/cli.js
  • Exposed shouldUseFlatConfig via lib/unsupported-apis.js
  • Added tests for shouldUseFlatConfig

Is there anything you'd like reviewers to focus on?

Nothing in particular beyond the typical code review

@cprussin cprussin requested a review from a team as a code owner May 8, 2023 20:54
@eslint-github-bot eslint-github-bot bot added the feature This change adds a new feature to ESLint label May 8, 2023
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented May 8, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: cprussin / name: Connor Prussin (c7f2be2)

@netlify
Copy link

netlify bot commented May 8, 2023

Deploy Preview for docs-eslint ready!

Name Link
🔨 Latest commit 33ad6bb
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/645acb79eb0dbb0008678abc
😎 Deploy Preview https://deploy-preview-17169--docs-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

Nice work. Just left a suggestion that we may want to change the function signature before exposing this publicly.

lib/eslint/flat-eslint.js Outdated Show resolved Hide resolved
@cprussin cprussin changed the title feat: Expose shouldUseFlatConfig (#17129) feat: expose shouldUseFlatConfig (#17129) May 8, 2023
@cprussin cprussin force-pushed the expose-shouldUseFlatConfig branch from c7f2be2 to 3f28705 Compare May 8, 2023 21:20
Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

LGTM. Just one suggestion to clean up the comments.

Would like @mdjermanovic to review before merging.

lib/eslint/flat-eslint.js Outdated Show resolved Hide resolved
@mdjermanovic mdjermanovic added core Relates to ESLint's core APIs and features accepted There is consensus among the team that this change meets the criteria for inclusion labels May 9, 2023
@mdjermanovic mdjermanovic changed the title feat: expose shouldUseFlatConfig (#17129) feat: expose shouldUseFlatConfig May 9, 2023
tests/lib/eslint/flat-eslint.js Outdated Show resolved Hide resolved
tests/lib/eslint/flat-eslint.js Outdated Show resolved Hide resolved
tests/lib/eslint/flat-eslint.js Outdated Show resolved Hide resolved
tests/lib/eslint/flat-eslint.js Outdated Show resolved Hide resolved
@cprussin cprussin force-pushed the expose-shouldUseFlatConfig branch from a7b5302 to 33ad6bb Compare May 9, 2023 22:38
@cprussin
Copy link
Contributor Author

cprussin commented May 9, 2023

thanks for the review @mdjermanovic , I've addressed all your comments -- let me know if there's anything else I can clean up!

Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for contributing!

@mdjermanovic mdjermanovic merged commit 8bf5505 into eslint:main May 10, 2023
22 checks passed
@cprussin cprussin deleted the expose-shouldUseFlatConfig branch May 10, 2023 16:01
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Nov 7, 2023
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Nov 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion contributor pool core Relates to ESLint's core APIs and features feature This change adds a new feature to ESLint
Projects
None yet
3 participants