From 23ec28f5ce95700c3d04bbc3b19df617646d7aeb Mon Sep 17 00:00:00 2001 From: Matt Trawicki Date: Tue, 29 Oct 2024 10:40:56 -0500 Subject: [PATCH] Error if describeApi.only is seen --- index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 843df64..e2165f0 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,6 @@ const path = require('path'); const importModules = require('import-modules'); +const noOnlyTest = require('eslint-plugin-no-only-tests'); module.exports = { rules: importModules(path.resolve(__dirname, 'rules'), { camelize: false }), @@ -69,8 +70,12 @@ module.exports = { 'import/export': 'off', // no-only-tests - 'no-only-tests/no-only-tests': 'error', - + 'no-only-tests/no-only-tests': [ + 'error', { + // describeApi is from our new route testing helper + 'block': ['describeApi'].concat(noOnlyTest.rules['no-only-tests'].meta.schema[0].properties.block.default) + } + ] , // @typescript-eslint '@typescript-eslint/no-empty-interface': 'off', '@typescript-eslint/no-empty-function': 'off',