Skip to content
This repository has been archived by the owner on May 2, 2022. It is now read-only.

node_modules added to eslintignore #201

Open
devinle opened this issue Oct 21, 2020 · 3 comments
Open

node_modules added to eslintignore #201

devinle opened this issue Oct 21, 2020 · 3 comments
Labels

Comments

@devinle
Copy link

devinle commented Oct 21, 2020

Describe the bug
When running a watch, with a fresh theme scaffold, after updating the /includes/blocks/block-editor to import the example-block, the runtime will throw a slew of eslint errors.

Steps to Reproduce

  1. Create a new theme scaffold
  2. Open 'includes/blocks/block-editor.js' and uncomment the line that imports example-block-1
  3. Run 'npm run start'
  4. Run 'npm run watch'
  5. Notice the eslint errors that are tracking to node_module directories

NOTE: I don't have any global configurations going on. So if there are any global settings on your machine, it might not produce this same result.

Expected behavior
node_modules should be ignored from our .eslintignore configuration so the errors are only focused within the theme

Environment information

  • Device: MacBook Pro
  • OS: MacOS 10.15.6
  • node: v15.0.1
  • npm: 7.0.3
  • php: PHP 7.3.11
@devinle
Copy link
Author

devinle commented Oct 21, 2020

cc @joesnellpdx in case you're interested. As you were unable to recreate the issue, thought it would be good to lump you in here in case you make any discoveries. Thanks!

@joesnellpdx
Copy link
Contributor

@nicholasio Any ideas here? I spun up the the theme and have no issues.

Does Devin need the 10up babel preset installed on his machine (I don't think so)? https://github.com/10up/babel-preset-default
Or... maybe I have node_modules set as a global ignore (in which case we should just add to the scaffold as a precaution)?

Thoughts?

@devinle
Copy link
Author

devinle commented Oct 22, 2020

To amend I added to the eslintignore file node_modules.
I also added the /* eslint react/prop-types: 0 */ to the top of my custom gutenberg block.

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

No branches or pull requests

2 participants