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

fix(linter): ensure config manipulations are run only if config is supported #19035

Merged
merged 2 commits into from
Sep 7, 2023

Conversation

meeroslav
Copy link
Contributor

@meeroslav meeroslav commented Sep 6, 2023

Current Behavior

We do ad hoc checks for existence of eslint config when we detect error

Expected Behavior

We should use central isEslintConfigSupported function, which will help us to potentially add support for more config types and we would need to change just one function.

E.g. migrating from yaml and classic js is fairly trivial after support of json.

Related Issue(s)

Related to #19026 and #19020

@meeroslav meeroslav self-assigned this Sep 6, 2023
@meeroslav meeroslav requested review from a team as code owners September 6, 2023 18:26
@vercel
Copy link

vercel bot commented Sep 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Sep 7, 2023 10:22am

@meeroslav meeroslav added the scope: linter Issues related to Eslint support in Nx label Sep 6, 2023
@meeroslav meeroslav force-pushed the enforce-lint-config-support-check branch from 2efcea3 to 4c99252 Compare September 7, 2023 10:21
@@ -8,6 +8,7 @@ describe('update-16-8-0-add-ignored-files migration', () => {

beforeEach(() => {
tree = createTreeWithEmptyWorkspace();
tree.write('.eslintrc.json', '{}');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is necessary for isEslintConfigSupported to work. Normally, the root eslintrc would be there

@meeroslav meeroslav enabled auto-merge (squash) September 7, 2023 11:13
@meeroslav meeroslav merged commit aa22362 into nrwl:master Sep 7, 2023
3 checks passed
FrozenPandaz pushed a commit that referenced this pull request Sep 7, 2023
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
scope: linter Issues related to Eslint support in Nx
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants