Skip to content

Commit

Permalink
Add eclint to pretest script
Browse files Browse the repository at this point in the history
  • Loading branch information
gucong3000 committed Jan 22, 2018
1 parent 9a2fda5 commit ad1dbb0
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
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

0 comments on commit ad1dbb0

Please sign in to comment.