Skip to content

Commit

Permalink
chore(docs) make import node test recommended (#318)
Browse files Browse the repository at this point in the history
* docs(documentation): make not import test recomended

* chore: update node import test

* chore(cleanup): update exports
  • Loading branch information
veritem committed Dec 11, 2023
1 parent fc18ad2 commit c2be10a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default [
| [no-focused-tests](docs/rules/no-focused-tests.md) | Disallow focused tests | | 🌐 | 🔧 | |
| [no-hooks](docs/rules/no-hooks.md) | Disallow setup and teardown hooks | | 🌐 | | |
| [no-identical-title](docs/rules/no-identical-title.md) | Disallow identical titles || | 🔧 | |
| [no-import-node-test](docs/rules/no-import-node-test.md) | Disallow importing `node:test` | | 🌐 | 🔧 | |
| [no-import-node-test](docs/rules/no-import-node-test.md) | Disallow importing `node:test` | | 🌐 | 🔧 | |
| [no-interpolation-in-snapshots](docs/rules/no-interpolation-in-snapshots.md) | Disallow string interpolation in snapshots | | 🌐 | 🔧 | |
| [no-large-snapshots](docs/rules/no-large-snapshots.md) | Disallow large snapshots | | 🌐 | | |
| [no-mocks-import](docs/rules/no-mocks-import.md) | Disallow importing from __mocks__ directory | | 🌐 | | |
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-import-node-test.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Disallow importing `node:test` (`vitest/no-import-node-test`)

⚠️ This rule _warns_ in the 🌐 `all` config.
💼⚠️ This rule is enabled in the ✅ `recommended` config. This rule _warns_ in the 🌐 `all` config.

🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).

Expand Down
5 changes: 2 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ const allRules = {
[noStandaloneExpectName]: 'warn',
[noTestPrefixesName]: 'warn',
[noTestReturnStatementName]: 'warn',
[noImportNodeTestName]: 'warn',
[preferCalledWithName]: 'warn',
[preferToBeFalsyName]: 'warn',
[preferToBeObjectName]: 'warn',
Expand All @@ -101,7 +100,6 @@ const allRules = {
[requireTopLevelDescribeName]: 'warn',
[requireToThrowMessageName]: 'warn',
[requireHookName]: 'warn',
[requireLocalTestContextForConcurrentSnapshotsName]: 'warn',
[preferTodoName]: 'warn',
[preferSpyOnName]: 'warn',
[preferComparisonMatcherName]: 'warn',
Expand All @@ -117,7 +115,8 @@ const recommended = {
[validTitleName]: 'error',
[validExpectName]: 'error',
[validDescribeCallbackName]: 'error',
[requireLocalTestContextForConcurrentSnapshotsName]: 'error'
[requireLocalTestContextForConcurrentSnapshotsName]: 'error',
[noImportNodeTestName]: 'error'
}

export default {
Expand Down
2 changes: 1 addition & 1 deletion src/rules/no-import-node-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default createEslintRule<Options, MESSAGE_IDS>({
meta: {
docs: {
description: 'Disallow importing `node:test`',
recommended: 'warn'
recommended: 'strict'
},
type: 'suggestion',
messages: {
Expand Down

0 comments on commit c2be10a

Please sign in to comment.