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

setup eslint and prettier #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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
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?

@@ -4,7 +4,9 @@
"description": "Adobe XD CLI Plugin Manager Utility",
"main": "index.js",
"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