diff --git a/.editorconfig b/.editorconfig index 8b0b282..7a567dc 100644 --- a/.editorconfig +++ b/.editorconfig @@ -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 @@ -20,5 +23,5 @@ tab_width = 2 indent_style = space indent_size = 2 -[*.json] +[lib/*.json] insert_final_newline = false diff --git a/.eslintrc.json b/.eslintrc.json index a1187a5..7d5b3b9 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -8,7 +8,7 @@ "standard" ], "parserOptions": { - "sourceType": "script", + "sourceType": "script", "ecmaVersion": 2017 }, "root": true, diff --git a/README.md b/README.md index 77df0d8..8dfaf0f 100644 --- a/README.md +++ b/README.md @@ -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 } } diff --git a/appveyor.yml b/appveyor.yml index 2b4d9f8..b46658d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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 diff --git a/package.json b/package.json index 24c0b8c..7233542 100644 --- a/package.json +++ b/package.json @@ -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" },