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

Inline global declarations in the config files generate eslint errors. #180

Open
cjkoepke opened this issue Mar 19, 2020 · 3 comments
Open
Labels

Comments

@cjkoepke
Copy link

Describe the bug
I noticed that you get an eslint error in all the webpack config files when running the husky pre-commit action. It gives a no-redeclare since they have inline comments for global variables at the top, but we already define them in .eslintrc:

"globals": {
  "module": true,
  "process": true,
  "wp": true,
  "lodash": true
}

Steps to Reproduce

  1. Install a new theme scaffold.
  2. Run the husky pre-commit hook.

Expected behavior
Default scaffolding should not error on first commit.

Suggested Solution
We should also add "require": true to that list and remove the inline comments in these files:

  1. /config/webpack.common.js
  2. /config/webpack.dev.js
  3. /config/webpack.prod.js
  4. /config/webpack.settings.js

I will submit a PR shortly.

@samikeijonen
Copy link
Contributor

I confirm seeing this also.

@cjkoepke cjkoepke mentioned this issue Mar 20, 2020
6 tasks
@s3rgiosan
Copy link
Member

I confirm seeing this also. Changes from #181 fixed the issue.

@timwright12
Copy link
Contributor

10up/plugin-scaffold#114

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

4 participants