From a8be9933fec1b21267acd847df77f6438e07e3b9 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Sat, 10 Aug 2019 14:53:00 -0700 Subject: [PATCH] [Tests] add `npm run lint` --- .eslintrc | 9 +++++++++ package.json | 8 +++++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 .eslintrc diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..bfa96d1 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,9 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-statements": [2, 12], + }, +} diff --git a/package.json b/package.json index cecdfd9..26a0602 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,8 @@ "description": "Which kind of boxed JS primitive is this?", "main": "index.js", "scripts": { + "lint": "eslint .", + "pretest": "npm run lint", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { @@ -23,5 +25,9 @@ "bugs": { "url": "https://github.com/ljharb/which-boxed-primitive/issues" }, - "homepage": "https://github.com/ljharb/which-boxed-primitive#readme" + "homepage": "https://github.com/ljharb/which-boxed-primitive#readme", + "devDependencies": { + "@ljharb/eslint-config": "^14.0.2", + "eslint": "^6.1.0" + } }