diff --git a/CHANGELOG.md b/CHANGELOG.md index d1db413e..dad9a59b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +* Use resin-lint [Internal] [Kostas] * Remove device port 4200 from web access whitelist [External] [Kostas] * Updated dependencies [Internal] [Page] * Reduce noise in logs [Internal] [Kostas] diff --git a/automation/test.sh b/automation/test.sh index e53183f9..45b094fb 100755 --- a/automation/test.sh +++ b/automation/test.sh @@ -27,7 +27,6 @@ test_id=$(docker run \ docker exec $test_id /bin/sh -c '\ npm install \ && systemctl stop resin-vpn.service resin-connect-proxy.service \ - && ./node_modules/.bin/coffeelint ./src ./test \ && echo "127.0.0.1 deadbeef.vpn" >> /etc/hosts \ && npm run test-unit \ && ./node_modules/mocha/bin/mocha test/app.coffee' diff --git a/coffeelint.json b/coffeelint.json deleted file mode 100644 index 95dcdfaf..00000000 --- a/coffeelint.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "arrow_spacing": { - "name": "arrow_spacing", - "level": "error" - }, - "braces_spacing": { - "name": "braces_spacing", - "spaces": 1, - "level": "error" - }, - "coffeescript_error": { - "level": "error" - }, - "camel_case_classes": { - "name": "camel_case_classes", - "level": "error" - }, - "colon_assignment_spacing": { - "name": "colon_assignment_spacing", - "level": "error", - "spacing": { - "left": 0, - "right": 1 - } - }, - "cyclomatic_complexity": { - "name": "cyclomatic_complexity", - "value": 10, - "level": "warn" - }, - "duplicate_key": { - "name": "duplicate_key", - "level": "error" - }, - "empty_constructor_needs_parens": { - "name": "empty_constructor_needs_parens", - "level": "warn" - }, - "indentation": { - "name": "indentation", - "value": 1, - "level": "error" - }, - "line_endings": { - "name": "line_endings", - "level": "warn", - "value": "unix" - }, - "max_line_length": { - "name": "max_line_length", - "value": 150, - "level": "error", - "limitComments": true - }, - "missing_fat_arrows": { - "name": "missing_fat_arrows", - "level": "ignore" - }, - "newlines_after_classes": { - "name": "newlines_after_classes", - "value": 1, - "level": "ignore" - }, - "no_backticks": { - "name": "no_backticks", - "level": "warn" - }, - "no_debugger": { - "name": "no_debugger", - "level": "warn" - }, - "no_empty_param_list": { - "name": "no_empty_param_list", - "level": "error" - }, - "no_implicit_braces": { - "name": "no_implicit_braces", - "level": "ignore", - "strict": false - }, - "no_implicit_parens": { - "name": "no_implicit_parens", - "strict": false, - "level": "ignore" - }, - "no_interpolation_in_single_quotes": { - "name": "no_interpolation_in_single_quotes", - "level": "error" - }, - "no_plusplus": { - "name": "no_plusplus", - "level": "ignore" - }, - "no_stand_alone_at": { - "name": "no_stand_alone_at", - "level": "error" - }, - "no_tabs": { - "name": "no_tabs", - "level": "ignore" - }, - "no_throwing_strings": { - "name": "no_throwing_strings", - "level": "error" - }, - "no_trailing_semicolons": { - "name": "no_trailing_semicolons", - "level": "error" - }, - "no_trailing_whitespace": { - "name": "no_trailing_whitespace", - "level": "error", - "allowed_in_comments": false, - "allowed_in_empty_lines": false - }, - "no_unnecessary_double_quotes": { - "name": "no_unnecessary_double_quotes", - "level": "error" - }, - "no_unnecessary_fat_arrows": { - "name": "no_unnecessary_fat_arrows", - "level": "error" - }, - "non_empty_constructor_needs_parens": { - "name": "non_empty_constructor_needs_parens", - "level": "ignore" - }, - "space_operators": { - "name": "space_operators", - "level": "error" - }, - "spacing_after_comma": { - "name": "spacing_after_comma", - "level": "error" - } -} diff --git a/package.json b/package.json index 0c33a168..ff1b9a19 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "RESTful VPN api", "main": "server.js", "scripts": { + "pretest-unit": "resin-lint src/ test/", "test-unit": "mocha test/index.coffee", "test": "docker build -t test-resin-vpn . && IMAGE_NAME=test-resin-vpn ./automation/test.sh" }, @@ -32,13 +33,13 @@ "devDependencies": { "chai": "^3.0.0", "chai-as-promised": "^5.1.0", - "coffeelint": "^1.10.1", "duplexer2": "^0.1.4", "mocha": "^2.1.0", "mockery": "~1.4.0", "nock": "^7.2.2", "openvpn-client": "0.0.2", "requestmock": "0.0.9", + "resin-lint": "^1.2.1", "sinon": "^1.17.3", "sinon-chai": "^2.8.0", "supertest": "~0.15.0"