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

added prettier, eslint-config-prettier, and plugin:react/recommended to extends #14

Merged
merged 2 commits into from
Jan 16, 2024
Merged

added prettier, eslint-config-prettier, and plugin:react/recommended to extends #14

merged 2 commits into from
Jan 16, 2024

Conversation

AlexVCS
Copy link
Contributor

@AlexVCS AlexVCS commented Dec 19, 2023

working on #12

@AlexVCS AlexVCS marked this pull request as ready for review December 19, 2023 17:31
Copy link
Collaborator

@miguelgrc miguelgrc left a comment

Choose a reason for hiding this comment

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

Hi @AlexVCS , good job and thanks a lot for your contribution to the project 💪 !

I left a few comments with some things to modify. Do you think you can implement the changes?

Cheers

}
ignorePatterns: ["dist", ".eslintrc.cjs"],
parser: "@typescript-eslint/parser",
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

You need to add the following two rules. The first one is needed since we're using React v17+ and therefore not importing React anymore, and we need the second one too as we are not really using prop-types very consistently (we will eventually refactor to TS so we're not bothering with that anymore):

rules: {
  "react/react-in-jsx-scope": "off",
  "react/prop-types": "off"
}

Add as well:

settings: {
  react: {
    version: "detect",
  },
},

to avoid getting a warning when running eslint

@@ -86,5 +92,9 @@
"peerDependencies": {
"react": ">=18.2.0",
"react-dom": ">=18.2.0"
},
"lint-staged": {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should be something like this:

"lint-staged": {
    "*.{ts,tsx,js,jsx}": "eslint --cache --fix",
    "*.{ts,tsx,js,jsx,css,less,md,html}": "prettier --write"
  }

since we want eslint to check js,jsx files too and prettier to format ts,tsx,jsx,less,html files as well. Also .eslintcache file should be added to .gitignore.

@AlexVCS
Copy link
Contributor Author

AlexVCS commented Dec 21, 2023

Hi @AlexVCS , good job and thanks a lot for your contribution to the project 💪 !

I left a few comments with some things to modify. Do you think you can implement the changes?

Cheers

Hey thanks miguelgrc! I think I can implement the changes you're requesting tomorrow :)

Copy link
Collaborator

@miguelgrc miguelgrc left a comment

Choose a reason for hiding this comment

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

Hi @AlexVCS, sorry for the late review, the holidays got in the way and I didn't have time to review until now. Thanks a lot for implementing the changes, everything looks good now :)

@miguelgrc miguelgrc merged commit 4902e0d into cern-sis:master Jan 16, 2024
1 check passed
Copy link

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants