From 50860766c8777bff77a31f3cbf98545d6368a050 Mon Sep 17 00:00:00 2001 From: Justin Stayton Date: Fri, 12 Jun 2020 15:15:58 -0400 Subject: [PATCH] Add eslint-plugin-node --- .eslintrc.json | 9 +++++++++ package.json | 1 + 2 files changed, 10 insertions(+) diff --git a/.eslintrc.json b/.eslintrc.json index 805fc15..a7a1f1d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -8,11 +8,20 @@ "plugins": ["jest"], "extends": [ "eslint:recommended", + "plugin:node/recommended", "plugin:jest/recommended", "plugin:jest/style", "prettier" ], "parserOptions": { "ecmaVersion": 2018 + }, + "rules": { + "node/no-unpublished-require": [ + "error", + { + "allowModules": ["knex"] + } + ] } } diff --git a/package.json b/package.json index 86b278d..8e08d2a 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "eslint": "^7.2.0", "eslint-config-prettier": "^6.11.0", "eslint-plugin-jest": "^23.13.2", + "eslint-plugin-node": "^11.1.0", "jest": "^26.0.1", "jest-junit": "^10.0.0", "knex": "^0.21.1",