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

Chore: Add linting to git commit #11556

Merged
merged 6 commits into from Apr 24, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -23,6 +23,15 @@
"profile": "beefy tests/bench/bench.js --open -- -t brfs -t ./tests/bench/xform-rules.js -r espree",
"coveralls": "cat ./coverage/lcov.info | coveralls"
},
"gitHooks": {
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.js": [
"eslint --fix",
This conversation was marked as resolved by nzakas

This comment has been minimized.

Copy link
@mysticatea

mysticatea Mar 27, 2019

Member

Because I'm not familiar with the "lint-staged", I'm not sure if the eslint command works intentionally.
This repository doesn't have eslint CLI command, but does this run node bin/eslint.js automatically?

This comment has been minimized.

Copy link
@nzakas

nzakas Mar 27, 2019

Author Member

I was just looking at this, it seems like lint-staged has its own version of ESLint that it's bundled with. I need to play with it a bit to see if I can get it to use ./bin/eslint.js.

This conversation was marked as resolved by nzakas

This comment has been minimized.

Copy link
@mysticatea

mysticatea Mar 27, 2019

Member

I'm happy if it runs markdown lint as well because I have sometimes forgotten it.

This comment has been minimized.

Copy link
@nzakas

nzakas Mar 27, 2019

Author Member

Good point, me too.

"git add"
]
},
"files": [
"LICENSE",
"README.md",
@@ -99,6 +108,7 @@
"karma-mocha-reporter": "^2.2.3",
"karma-webpack": "^4.0.0-rc.6",
"leche": "^2.2.3",
"lint-staged": "^8.1.5",
"load-perf": "^0.2.0",
"markdownlint": "^0.12.0",
"mocha": "^5.0.5",
@@ -112,7 +122,8 @@
"temp": "^0.9.0",
"through": "^2.3.8",
"webpack": "^4.29.3",
"webpack-cli": "^3.2.3"
"webpack-cli": "^3.2.3",
"yorkie": "^2.0.0"
This conversation was marked as resolved by aladdin-add

This comment has been minimized.

Copy link
@aladdin-add

aladdin-add Mar 27, 2019

Member

we can consider using husky -- it seems to be more popular?

(I'm not very familar with yorkie (o|o)

This comment has been minimized.

Copy link
@g-plane

g-plane Mar 27, 2019

Member

yorkie is just a fork of husky.

This comment has been minimized.

Copy link
@nzakas

nzakas Mar 27, 2019

Author Member

yorkie takes care of some of the problems husky has with resolving the correct location of package.json (Vue uses yorkie).

},
"keywords": [
"ast",
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.