Skip to content

Conversation

@yoshikinoko
Copy link
Contributor

Setup eslint and prettier #25

@yoshikinoko yoshikinoko mentioned this pull request Sep 26, 2019
@kerrishotts
Copy link
Contributor

@dkstevekwak , any concerns with the eslint configuration here? If not, I'm ok w/ merging

# Conflicts:
#	lib/validate.js
#	package-lock.json
#	package.json
@yoshikinoko yoshikinoko self-assigned this Oct 15, 2019
Copy link
Contributor

@alexandrtovmach alexandrtovmach left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! Looks so far so good 👍
I left a few thoughts

@@ -0,0 +1,11 @@
root = true
Copy link
Contributor

Choose a reason for hiding this comment

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

this file should be ignored by .gitignore

"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "eslint --fix lib && eslint --fix commands",
"precommit": "lint-staged"
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't find config for lint-staged. It should trigger lint for staged files, am I wrong?

"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "eslint --fix lib && eslint --fix commands",
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. lint script should only validate code, not modify
  2. list of folders to lint can be passed one-by-one
Suggested change
"lint": "eslint --fix lib && eslint --fix commands",
"lint": "eslint lib/** commands/**",
"lint:fix": "eslint --fix lib/** commands/**",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants