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

Add eclint to pretest script #203

Merged
merged 1 commit into from
Jan 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ end_of_line = lf
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true
block_comment_start = /*
block_comment = *
block_comment_end = */

[*.{cmd,bat}]
end_of_line = crlf
Expand All @@ -20,5 +23,5 @@ tab_width = 2
indent_style = space
indent_size = 2

[*.json]
[lib/*.json]
insert_final_newline = false
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"standard"
],
"parserOptions": {
"sourceType": "script",
"sourceType": "script",
"ecmaVersion": 2017
},
"root": true,
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ reporter({
const path = file.path;
return error => {
// Do not report unrelated errors.
if (error.fileName === path) {
if (error.fileName === path) {
return error
}
}
Expand Down
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ environment:
install:
# install Node.js
- ps: Install-Product node $env:nodejs_version
- npm install -g npm@latest
# install modules
- npm install

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@
"test_lang": "cross-env LC_ALL=zh_CN npm run mocha -- --color && cross-env LC_ALL=en_US npm run mocha -- --no-color",
"report-coverage": "codecov",
"mocha": "mocha \"test/*.test.js\" --no-timeouts",
"pretest": "eslint scripts lib \"test/*.js\" && npm run shorturl",
"eclint": "eclint check $(git ls-files | grep --invert-match ^test/fixtures/)",
"pretest": "eslint scripts lib \"test/*.js\" && npm run eclint --script-shell=sh && npm run shorturl",
"shorturl": "node scripts/shorturl",
"test": "nyc npm run test_lang"
},
Expand Down