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

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

@cjkoepke

Description

@cjkoepke

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions