From aeb33b829086a7e5274a06835fe91933c4e63195 Mon Sep 17 00:00:00 2001 From: contra Date: Tue, 28 Nov 2017 10:27:35 -0700 Subject: [PATCH] Scaffold: Add editorconfig & improve linting --- .editorconfig | 10 ++++++++++ .jshintrc | 19 +++++++++++++++++++ package.json | 2 +- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .editorconfig create mode 100644 .jshintrc diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..6c5424ed --- /dev/null +++ b/.editorconfig @@ -0,0 +1,10 @@ +# editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 00000000..af7124ee --- /dev/null +++ b/.jshintrc @@ -0,0 +1,19 @@ +{ + "camelcase": true, + "curly": true, + "eqeqeq": true, + "freeze": true, + "indent": 2, + "newcap": false, + "quotmark": "single", + "maxdepth": 3, + "maxstatements": 50, + "maxlen": 80, + "eqnull": true, + "funcscope": true, + "strict": true, + "undef": true, + "unused": true, + "node": true, + "mocha": true +} \ No newline at end of file diff --git a/package.json b/package.json index 8aba5a35..f2c332d4 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "through2": "^0.5.1" }, "scripts": { - "test": "mocha --reporter spec && jshint", + "test": "mocha --reporter spec && jshint lib", "coveralls": "istanbul cover _mocha -- -R spec && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage" }, "engines": {