Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Attempts to address #301 through the implementation of #252.
Using the method outlined in this comment: #301 (comment) I added the rules to the
index.js
file, removedeslint-config-react-app
as a dependancy and addedplugin:react/recommended
to eslintextends
property.Please note: This is my first attempt at working with npm packages, so conscious that this may not be correct, so submitting this in order to gather feedback and learning.
TESTING (and points of note)
I tested locally by running
npm pack --pack-destination ~
which output the plugin as a zip file:humanmade-eslint-config-1.3.0.tgz
Then I edited a project to place this local file within the
devDependancies
of that projectspackage.json
like so:Also because I could not get the script
npx install-peerdeps --dev @humanmade/eslint-config@latest
to install from my local file I installed the peerDependancies like so:and then ran
Once this was done I could check the linting in my project by running:
Which runs and appears to work successfully 🥳
However note that in the documentation it states that I should be able to run:
However in my tests
@humanmade/eslint-config
could not be found without the prefix of./node_modules/
and also if you point at the folder instead of the index.js (or the .eslintrc) file, you get the errorError: Cannot read config file
.I put this down to the setup of my test project, as I know you can set aliases for
node_modules
, but if something needs adjusting so we can use this syntax I'm all ears.