eslint-plugin-ava
eslint-plugin-ava copied to clipboard
ESLint rules for AVA
This particular plugin causes eslint to crash with type errors for some rules if the syntax is not exactly right. Even if the document/file is parsable. `prefer-t-regex` is the biggest...
Fixes: https://github.com/avajs/eslint-plugin-ava/issues/156 --- IssueHunt Summary ### Referenced issues This pull request has been submitted to: - [#156: Rule proposal: `prefer-t-throws`](https://issuehunt.io/repos/49722492/issues/156) ---
``` ESLint: 8.8.0 TypeError: Cannot destructure property 'type' of 'node' as it is undefined. Occurred while linting /Users/schmod/myCode/myTest-unit.ts:118 Rule: "ava/assertion-arguments" at isString (/Users/schmod/myCode/node_modules/eslint-plugin-ava/rules/assertion-arguments.js:206:9) at /Users/schmod/myCode/node_modules/eslint-plugin-ava/rules/assertion-arguments.js:294:10 at /Users/schmod/myCode/node_modules/enhance-visitors/index.js:25:12 at /Users/schmod/myCode/node_modules/enhance-visitors/index.js:15:7 at...
[](https://issuehunt.io/r/avajs/eslint-plugin-ava/issues/156) I was reviewing some codes using ava and found this pattern repeating often: ```js try { await request(requestOptions); } catch (error) { t.true(error.statusCode === 500); } ``` This can...
Temporary disabled in #341
Inspired by https://github.com/sindresorhus/ts-extras/pull/8#discussion_r740023376 Bad: ```js t.is(x, true); t.is(x, false); ``` Good: ```js t.true(x); t.false(x); ```
Fixes #178. Continue from previous PR #240 with latest review. --- IssueHunt Summary ### Referenced issues This pull request has been submitted to: - [#178: Prevent specifying error type in...
# No Invalid Modifier Chain Fixes #186 ## Description Disallows invalid combinations, order, and name of test/hook modifiers ## Progress: - [x] Detect invalid modifiers - [x] Name - [x]...
Currently, doing: ```js t.notThrowsAsync(asyncNotThrowingFn, 'abc' + someString) ``` Would fail, saying that the assertion message is not a string. This is happening over here: https://github.com/avajs/eslint-plugin-ava/blob/dee1802d39e22aec0915d5067062356f5abfbd84/rules/assertion-arguments.js#L206 The function should also support...
No error is detected but works with `import test from 'ava'` ```ts import anyTest, { ExecutionContext, TestInterface } from 'ava'; const test = anyTest as TestInterface; test.only('Should create a new...