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(nextjs): fix .next folder linting #11614

Merged
merged 1 commit into from
Aug 22, 2022

Conversation

ndcunningham
Copy link
Contributor

ISSUES CLOSED: #11541

Current Behavior

Expected Behavior

Related Issue(s)

Fixes #

@vercel
Copy link

vercel bot commented Aug 16, 2022

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

1 Ignored Deployment
Name Status Preview Updated
nx-dev ⬜️ Ignored (Inspect) Aug 22, 2022 at 3:08PM (UTC)

@@ -36,6 +36,11 @@ export async function addLinting(
// Turn off @next/next/no-html-link-for-pages since there is an issue with nextjs throwing linting errors
// TODO(nicholas): remove after Vercel updates nextjs linter to only lint ["*.ts", "*.tsx", "*.js", "*.jsx"]

reactEslintJson.ignorePatterns = [
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could this go into a .eslintignore file at the root?

Copy link
Contributor Author

@ndcunningham ndcunningham Aug 17, 2022

Choose a reason for hiding this comment

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

I don't think so since next uses the react .eslintignore.

I think the pattern .next/ is project specific, so probably not.

Copy link
Member

Choose a reason for hiding this comment

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

I think since .eslintignore isn't always present ,we can keep this just in the app's ignore folder.

if (project.targets?.build?.executor !== '@nrwl/next:build') return;

const eslintPath = `${project.root}/.eslintrc.json`;
debugger;
Copy link
Member

Choose a reason for hiding this comment

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

remove debugger

@ndcunningham ndcunningham force-pushed the fix/next-linting branch 2 times, most recently from 68dfe41 to 766af6d Compare August 22, 2022 14:10
let tree: Tree;

beforeEach(async () => {
tree = createTreeWithEmptyV1Workspace();
Copy link
Member

Choose a reason for hiding this comment

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

I think we want to use createTreeWithEmptyWorkspace here, and updateProjectConfiguration so it's more future-proof.

@jaysoo jaysoo merged commit 89a4013 into nrwl:master Aug 22, 2022
@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 Mar 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

eslint is giving me many errors coming from .next folder
3 participants