Skip to content

Commit

Permalink
fix: add lint rule for focused tests (#2901)
Browse files Browse the repository at this point in the history
Please provide a paragraph or two giving a summary of the change,
including relevant motivation and context.

# Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if
the PR is ready to merge.
- [ ] If the pull request requires a cryptography review (e.g.
cryptographic algorithm implementations) I have added the 'crypto' tag.
- [ ] I have reviewed my diff in github, line by line and removed
unexpected formatting changes, testing logs, or commented-out code.
- [ ] Every change is related to the PR description.
- [ ] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to relevant issues (if any exist).
  • Loading branch information
alexghr authored Oct 23, 2023
1 parent ab19b67 commit fd1a1a8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
4 changes: 3 additions & 1 deletion yarn-project/foundation/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down Expand Up @@ -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'],
};
1 change: 1 addition & 0 deletions yarn-project/foundation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 8 additions & 0 deletions yarn-project/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit fd1a1a8

Please sign in to comment.