diff --git a/yarn-project/foundation/.eslintrc.cjs b/yarn-project/foundation/.eslintrc.cjs index a5ea3290ce9..76ca51878ba 100644 --- a/yarn-project/foundation/.eslintrc.cjs +++ b/yarn-project/foundation/.eslintrc.cjs @@ -52,7 +52,7 @@ module.exports = { }, root: true, parser: '@typescript-eslint/parser', - plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc', 'jsdoc'], + plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc', 'jsdoc', 'no-only-tests'], overrides: [ { files: ['*.ts', '*.tsx'], @@ -129,6 +129,8 @@ module.exports = { 'jsdoc/require-property-description': [JSDOC_RULES_LEVEL, { contexts }], 'jsdoc/require-property-name': [JSDOC_RULES_LEVEL, { contexts }], 'jsdoc/require-returns': 'off', + // this unfortunately doesn't block `fit` and `fdescribe` + 'no-only-tests/no-only-tests': ['error'], }, ignorePatterns: ['node_modules', 'dest*', 'dist', '*.js', '.eslintrc.cjs'], }; diff --git a/yarn-project/foundation/package.json b/yarn-project/foundation/package.json index 301d6507318..207c7d668a7 100644 --- a/yarn-project/foundation/package.json +++ b/yarn-project/foundation/package.json @@ -95,6 +95,7 @@ "eslint": "^8.21.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-jsdoc": "^40.1.0", + "eslint-plugin-no-only-tests": "^3.1.0", "eslint-plugin-tsdoc": "^0.2.17", "jest": "^29.5.0", "prettier": "^2.7.1", diff --git a/yarn-project/yarn.lock b/yarn-project/yarn.lock index 80cda3560f4..1da5a31e179 100644 --- a/yarn-project/yarn.lock +++ b/yarn-project/yarn.lock @@ -488,6 +488,7 @@ __metadata: eslint: ^8.21.0 eslint-config-prettier: ^8.5.0 eslint-plugin-jsdoc: ^40.1.0 + eslint-plugin-no-only-tests: ^3.1.0 eslint-plugin-tsdoc: ^0.2.17 hash.js: ^1.1.7 jest: ^29.5.0 @@ -9417,6 +9418,13 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-no-only-tests@npm:^3.1.0": + version: 3.1.0 + resolution: "eslint-plugin-no-only-tests@npm:3.1.0" + checksum: 2a5de82f3a732dbd46792661dd0f8546cf819f76d8828968166dee35741e8039904ba473dafe1eed585f401a496d260c2c38354bb887c94bd4ced0ddca00fb62 + languageName: node + linkType: hard + "eslint-plugin-react-hooks@npm:^4.6.0": version: 4.6.0 resolution: "eslint-plugin-react-hooks@npm:4.6.0"