Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .changeset/skipped-tests-ast-detection.md

This file was deleted.

12 changes: 12 additions & 0 deletions packages/eslint-plugin-code-quality/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @noctcore/eslint-plugin-code-quality

## 0.4.2

### Patch Changes

- [#64](https://github.com/noctcore/eslint-plugins/pull/64) [`aa1ae71`](https://github.com/noctcore/eslint-plugins/commit/aa1ae71b9db4eea014323e83bb615eeab04a201d) Thanks [@Shironex](https://github.com/Shironex)! - `skipped-tests-need-tracking` no longer reports the text of a skip that is not a call.

**Reports less.** The rule found `it.skip(`, `test.fixme(`, `xit(`, `xdescribe(` and `xtest(` by scanning each source line, so the same text inside a string, a template literal or a comment was reported as a skipped test. It now reads the skip from the call itself. A test file that lints probe code held as a string (a config wiring test with seeded violations, a `RuleTester` suite for a wrapper rule) can spell a skipped test in its own source, and a comment can mention `it.skip(` in prose.

Every real skip that was reported before is still reported: the `.skip` / `.fixme` modifier on `it`, `test` or `describe` (also reached through a member, `test.describe.skip(`), and the `xit` / `xdescribe` / `xtest` aliases. The tracking marker is still looked up in the source text of the lookback window, so a marker in a comment counts as before.

The report now sits on the callee (`it.skip`, `xit`) or on the `node:test` option, where it used to cover the whole line from column 1. The line is unchanged, so an `eslint-disable-next-line` keeps working.

## 0.4.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-code-quality/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@noctcore/eslint-plugin-code-quality",
"version": "0.4.1",
"version": "0.4.2",
"description": "Portable code-quality, comment-hygiene and test-discipline ESLint rules: guard clauses, deterministic time, no stray process.exit, and tests that cannot pass vacuously.",
"license": "MIT",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-code-quality/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { rules } from './rules';

/** Flat-config namespace: rule ids are keyed `noctcore-code-quality/<rule>`. */
const NAMESPACE = 'noctcore-code-quality';
const VERSION = '0.4.1';
const VERSION = '0.4.2';

const plugin = {
meta: { name: '@noctcore/eslint-plugin-code-quality', version: VERSION },
Expand Down
Loading