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] Clear errors and warnings after running a new npm install without a package-lock.json #4408

Merged
merged 11 commits into from
Jul 12, 2023

Conversation

randychilau
Copy link
Contributor

@randychilau randychilau commented Jun 21, 2023

Description

This PR fixes a number of eslint errors and warnings that appear

image

The errors prevent the ability to commit changes in VSCode (not sure about other IDEs or using command line) indicated by the husky - pre-commit hook exited with code 1 (error).


Additional changes:

  • package.json for gatsby-plugin-robots-txt is because the latest version 1.8.x currently requires Gatsby v5 and is a blocker for doing a npm install when there is no package-lock.json file, until resolved v1.7.x is the latest version that works with Gatsby v4

  • edit to src/collections/resources/articles/hpes-adoption-of-meshery-and-meshmap/index.mdx file

    • to resolve an unused import causing a console error: export 'theme' (imported as 'theme') was not found in '../../../../src/theme/app/themeStyles.js' (possible exports: darktheme, default)
    • to update component name to match imported name
  • edit /learn page for arrows displaying incorrectly
    before:
    image

    after:
    image


Notes for Reviewers

The errors and warnings were legitimate issues that were not detected earlier, however with the latest version of eslint installed these errors were recorded. (note: the latest eslint version installed "8.43.0" after a new install command without package-lock.json, current package-lock.json has eslint version "8.28.0").

Here are the pages and eslint errors that appeared:

src/components/ConformanceTest-Table/index.js
src/components/Landscape-Table/index.js
src/components/SMI-Table/index.js

error Missing "key" prop for element in iterator react/jsx-key

src/sections/Community/Handbook/security-vulnerabilities.js

error Unknown property 'hrf' found react/no-unknown-property

src/sections/Company/Legal/code-of-conduct/index.js
src/sections/Company/Legal/privacy/index.js
src/sections/Company/Legal/terms-of-service/index.js

error Unknown property 'leftAlign' found react/no-unknown-property

src/sections/Learn-Layer5/Courses-List/index.js

error Unknown property 'sm' found react/no-unknown-property
error Unknown property 'lg' found react/no-unknown-property
error Unknown property 'xl' found react/no-unknown-property

Happy to answer any questions on this.

Cheers,
Randy


Signed commits

  • Yes, I signed my commits.

Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
Signed-off-by: Randy Lau <randychilau@gmail.com>
@randychilau randychilau changed the title Clear ESlint errors and warnings after running a new npm install without a package-lock.json [ESlint] Clear errors and warnings after running a new npm install without a package-lock.json Jun 21, 2023
@l5io
Copy link
Contributor

l5io commented Jun 21, 2023

🚀 Preview for commit 946c612 at: https://649243f0fdb81e00837a821e--layer5.netlify.app

Signed-off-by: Randy Lau <randychilau@gmail.com>
@l5io
Copy link
Contributor

l5io commented Jul 12, 2023

🚀 Preview for commit 2566ab1 at: https://64ae36f322f2e87fbd00aedf--layer5.netlify.app

Copy link
Contributor

@Nikhil-Ladha Nikhil-Ladha left a comment

Choose a reason for hiding this comment

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

Thanks for fixing these issues @randychilau 🥂
LGTM

@Nikhil-Ladha
Copy link
Contributor

@randychilau signal if you would prefer to get this PR merged before the the MDX changes, or the vice versa. I think the other one would be better to have lesses merge conflicts.

@randychilau
Copy link
Contributor Author

Hi @Nikhil-Ladha,

Thanks for taking the time to review this PR.

Please merge this PR first. I am still doing some more documentation and testing regarding the MDX PR.

These warnings/errors appeared when I was working on the MDX PR and thought it should be a separate PR (changes are also in the MDX PR, so there should be no merge conflicts).

Thanks again!

Cheers,
Randy

@Nikhil-Ladha Nikhil-Ladha merged commit 72f2290 into layer5io:master Jul 12, 2023
4 checks passed
@randychilau randychilau deleted the eslint-errors-and-warnings branch July 17, 2023 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants