From 41df01b70331d1130dcfee628c3de16d2c640111 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Thu, 14 Nov 2019 11:30:08 +0200 Subject: Switch to `xo@0.24.0` for linting Not using the latest version for Node.js 6.x support. --- package.json | 45 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) (limited to 'package.json') diff --git a/package.json b/package.json index 530e2d1..f753d72 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "url": "https://github.com/nickmerwin/node-coveralls/issues" }, "scripts": { - "lint": "jshint ./lib ./test ./index.js", + "lint": "xo", "mocha": "_mocha -b -R spec", "test-cov": "nyc npm run mocha", "test-coveralls": "nyc npm run mocha && shx cat ./coverage/lcov.info | node ./bin/coveralls.js --verbose", @@ -41,12 +41,12 @@ "request": "^2.88.2" }, "devDependencies": { - "jshint": "^2.11.0", "mocha": "^6.2.3", "nyc": "^14.1.1", "should": "^9.0.2", "shx": "^0.3.2", - "sinon": "^7.5.0" + "sinon": "^7.5.0", + "xo": "^0.24.0" }, "engines": { "node": ">=6" @@ -68,7 +68,42 @@ ] }, "files": [ - "{bin,lib}/*.js", + "bin/coveralls.js", + "lib/*.js", "index.js" - ] + ], + "xo": { + "space": true, + "ignores": [ + "test/fixtures/" + ], + "rules": { + "capitalized-comments": "off", + "camelcase": "off", + "import/order": "off", + "no-negated-condition": "off", + "object-curly-spacing": [ + "error", + "always" + ], + "quote-props": [ + "error", + "consistent" + ], + "space-before-function-paren": [ + "error", + "never" + ], + "spaced-comment": "off", + "unicorn/filename-case": "off" + }, + "overrides": [ + { + "files": "test/*.js", + "envs": [ + "mocha" + ] + } + ] + } } -- cgit v1.2.3