oxlint-no-only-tests
v0.1.0
Published
oxlint plugin — disallow .only blocks in tests
Maintainers
Readme
oxlint-no-only-tests
oxlint plugin that disallows .only focused test blocks — a port of eslint-plugin-no-only-tests.
Prevents describe.only, it.only, test.only (and all other focused variants) from being committed, which would cause CI to skip the rest of the test suite.
Installation
npm install -D oxlint oxlint-no-only-testsUsage
In your oxlint.config.js:
import noOnlyTestsPlugin from 'oxlint-no-only-tests'
export default {
plugins: { 'no-only-tests': noOnlyTestsPlugin },
rules: {
'no-only-tests/no-only-tests': 'error',
},
}Detected patterns
The rule flags any of the following:
describe.only('...', () => {}) // ✗
it.only('...', () => {}) // ✗
test.only('...', () => {}) // ✗
context.only('...', () => {}) // ✗
test.only.each([])('...', () => {}) // ✗Also covers: tape, fixture, serial, Feature, Scenario, Given, And, When, Then.
License
MIT
