From 5282c4a72b62e68b92f5edf80b1706f93ea59386 Mon Sep 17 00:00:00 2001 From: "Fabien \"egg\" O'Carroll" Date: Thu, 1 Jun 2023 00:11:43 -0400 Subject: [PATCH] Update eslint and c8 to support using TS interfaces This will allow us to define the repository interface --- ghost/collections/.eslintrc.js | 8 ++++++-- ghost/collections/package.json | 7 +++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ghost/collections/.eslintrc.js b/ghost/collections/.eslintrc.js index ecc28524e8..f643d2ce74 100644 --- a/ghost/collections/.eslintrc.js +++ b/ghost/collections/.eslintrc.js @@ -1,7 +1,11 @@ module.exports = { parser: '@typescript-eslint/parser', - plugins: ['ghost'], + plugins: ['ghost', '@typescript-eslint'], extends: [ 'plugin:ghost/node' - ] + ], + rules: { + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': ['error'] + } }; diff --git a/ghost/collections/package.json b/ghost/collections/package.json index 61d0fbe320..5967ac0bf8 100644 --- a/ghost/collections/package.json +++ b/ghost/collections/package.json @@ -32,5 +32,12 @@ "@tryghost/in-memory-repository": "0.0.0", "@tryghost/tpl": "^0.1.25", "bson-objectid": "^2.0.4" + }, + "c8": { + "exclude": [ + "src/CollectionRepository.ts", + "src/**/*.d.ts", + "test/**/*.ts" + ] } }