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

eslint config for nextjs #1322

Merged
merged 8 commits into from
Jan 29, 2022
Merged

eslint config for nextjs #1322

merged 8 commits into from
Jan 29, 2022

Conversation

aymanesarrar
Copy link
Contributor

@aymanesarrar aymanesarrar commented Jan 25, 2022

The next configuration already handles setting default values for the parser, plugins and settings properties.
more here : https://nextjs.org/docs/basic-features/eslint#migrating-existing-config

Closes #1321

@vercel
Copy link

vercel bot commented Jan 25, 2022

@aymanesarrar is attempting to deploy a commit to the Carbon Team on Vercel.

A member of the Team first needs to authorize it.

@mfix22
Copy link
Contributor

mfix22 commented Jan 26, 2022

@aymanesarrar should we update the script to be next lint instead of eslint .? Are we then able to remove a few dependencies?

parserOptions: {
requireConfigFile: false,
babelOptions: {
presets: ['next/babel'],
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we able to remove the various babel/eslint dependencies from our package.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.

no i don't think we should remove it from our package.json

@mfix22 mfix22 mentioned this pull request Jan 26, 2022
4 tasks
@mfix22
Copy link
Contributor

mfix22 commented Jan 26, 2022

@aymanesarrar yarn lint no longer passes, which is a major requirement to fix issue #1321, as specified in the issue body.

@aymanesarrar
Copy link
Contributor Author

i updated it to next lint and I had a problem that it doesn't know the extends next so I updated it to next/core-web-vitals but It requires to install eslint-next-config I've done it and npm run lint passes with some eslint errors, should i commit ?

@mfix22 mfix22 merged commit 5bad3ac into carbon-app:main Jan 29, 2022
pull bot pushed a commit to AwesomeGitHubRepos/carbon that referenced this pull request Jan 29, 2022
* eslint config for nextjs

* removed plugins, settings, parser from the config

* changed the script to next lint and installed the eslint next config package

* lint fixes

* move to dev dependencies

* remove unnecessary rules

* remove unnecessary babel deps

* lint on root dir

Co-authored-by: Mike Fix <mrfix84@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Next.js recommended lint config
2 participants