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

Update ESLint configuration #1870

Merged
merged 4 commits into from
Feb 20, 2019
Merged

Update ESLint configuration #1870

merged 4 commits into from
Feb 20, 2019

Conversation

swissspidy
Copy link
Collaborator

This PR replaces #1766 since updating ESLint took a bit more effort.

In particular:

  • Update eslint
  • Update eslint-plugin-react
  • Install and use babel-eslint so that ESLint is actually able to parse the JSX source files
  • Specify React version used by WordPress so eslint-plugin-react doesn't throw a warning

As a bonus, I added the lint npm script so that one can just type npm run lint

package.json Outdated Show resolved Hide resolved
"timeago.js": "3.0.2",
"webpack": "4.29.5",
"webpack-cli": "3.2.3"
},
"main": "blocks/index.js",
"scripts": {
"build": "grunt build && grunt create-build-zip",
"build": "npm-run-all build:*",
Copy link
Member

Choose a reason for hiding this comment

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

Is this going to be stable? Could it not result in zip being run before prepare? Objects in JS do not have ordered keys, unless NPM explicitly sorts them by key when globbing like this. Do you have confirmation?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So far I have never had any problems with the order being mixed up by npm-run-all or something.

Objects in JS do not have ordered keys

I thought this changed a bit with ES2015?

Do you have confirmation?

According to the author, it executes tasks in definition order in package.json. mysticatea/npm-run-all#116 (comment)

I haven't looked at the code of NPM or the package though to see how order is determined.

@westonruter westonruter added this to the v1.1 milestone Feb 20, 2019
@westonruter westonruter merged commit 8e4032b into develop Feb 20, 2019
@swissspidy swissspidy deleted the update-eslint branch May 27, 2019 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Signed the Google CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants