From ca7f3ecb3bea364ff74e617a20f79e8ad8e68d62 Mon Sep 17 00:00:00 2001 From: Matthew Trawicki Date: Tue, 29 Oct 2024 15:12:51 -0500 Subject: [PATCH] Error if describeApi.only or scenario.only is seen --- index.js | 9 +++++++-- package.json | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 843df64..996d03b 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 and scenario for new route testing helper + 'block': ['describeApi', 'scenario'].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', diff --git a/package.json b/package.json index f46fcad..48d3162 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gamechanger/eslint-plugin", - "version": "0.0.12", + "version": "0.0.13", "description": "GC Lint Rules for TS Projects", "author": "GameChanger", "license": "MIT",