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

build(repo): Setup eslint in root workspace #362

Merged
merged 10 commits into from
Dec 4, 2023
Merged

build(repo): Setup eslint in root workspace #362

merged 10 commits into from
Dec 4, 2023

Conversation

nebula-aac
Copy link
Contributor

@nebula-aac nebula-aac commented Nov 18, 2023

This PR does two different things.

  • Fixes the GitHub Actions workflow called lint.yml, which was using an outdated actions and did not have the proper flow to install and make sure to use different Node.js versions in a matrix.
  • Adds eslint and relevant packages such as
  • @babel/core
  • @babel/eslint-parser
  • eslint-config-next
  • eslint-config-standard
  • eslint-plugin-import
  • eslint-plugin-n
  • eslint-plugin-promise
  • eslint-plugin-react
  • prettier-eslint
  • prettier-eslint-cli
  • @typescript-eslint/eslint-plugin
  • @typescript-eslint/parser
  • eslint-plugin-react-refresh
  • eslint-plugin-storybook
  • eslint-plugin-react-hooks

prettier-eslint works a bit better then the *-config and *-plugin, by attaching itself as a process to be used with eslint --fix.

At this time, we have eslint to fix and then prettier to format files as needed, but if we were to switch it around, there would be leftover files that still needs to be added to git commit.

The eslint-config-sistent package is not complete, but will be useful in the near future in Meshery UI and Meshery Cloud UI, to share configuration and plugins across multiple repos. This helps to implement DRY, and keep tech debt down to just one place.

The files have been linted and formatted before ignore site and next-12 as they will return erroneous errors which will cause more headache then needed at this time to troubleshoot or configure.

It will be on a roadmap to ensure that these are properly configured.

The above eslint-config-sistent will need to be revised for the future flat config that eslint will be supporting from now on in v9, but it is optional in v8 right now.

fix #361
fix #360

Notes for Reviewers

This PR also updates to ignore design-system until I can figure the best way to lint Storybook specific separately.

Signed commits

  • Yes, I signed my commits.

@github-actions github-actions bot added area/ci Continuous integration | Build and release area/docs Improvements or additions to documentation component/icons area/site labels Nov 18, 2023
@nebula-aac nebula-aac requested a review from a team November 18, 2023 00:51
@nebula-aac nebula-aac added the pr/on hold PR/Issue on hold label Nov 18, 2023
@leecalcote
Copy link
Member

At this time, we have eslint to fix and then prettier to format files

Got it. 👍

@leecalcote
Copy link
Member

leecalcote commented Nov 19, 2023

pr/hold - ok. Holding off on review.

@leecalcote
Copy link
Member

Fixed merge conflicts.

@nebula-aac nebula-aac added ready-for-review and removed pr/on hold PR/Issue on hold labels Nov 27, 2023
@nebula-aac nebula-aac merged commit b76b610 into master Dec 4, 2023
11 of 12 checks passed
@nebula-aac nebula-aac deleted the 361-eslint branch December 4, 2023 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci Continuous integration | Build and release area/docs Improvements or additions to documentation area/site component/icons ready-for-review
Development

Successfully merging this pull request may close these issues.

[repo]: Copy existing eslint config to root workspace in order to lint correctly [CI] Fix lint.yml
2 participants