Skip to content

setup eslint and prettier#26

Open
yoshikinoko wants to merge 2 commits into
AdobeXD:masterfrom
yoshikinoko:setup-eslint
Open

setup eslint and prettier#26
yoshikinoko wants to merge 2 commits into
AdobeXD:masterfrom
yoshikinoko:setup-eslint

Conversation

@yoshikinoko

Copy link
Copy Markdown
Contributor

Setup eslint and prettier #25

@yoshikinoko yoshikinoko mentioned this pull request Sep 26, 2019
@kerrishotts

Copy link
Copy Markdown
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

@alexandrtovmach alexandrtovmach left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread .editorconfig
@@ -0,0 +1,11 @@
root = true

Copy link
Copy Markdown
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

Comment thread package.json
"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
Copy Markdown
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?

Comment thread package.json
"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
Copy Markdown
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