Skip to content

Commit

Permalink
feat: add no-interpolation-in-snapshots to the recommended ruleset
Browse files Browse the repository at this point in the history
BREAKING CHANGE: recommend `no-interpolation-in-snapshots` rule
  • Loading branch information
G-Rath authored and SimenB committed Sep 4, 2020
1 parent 5b2af00 commit 3705dff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -144,7 +144,7 @@ installations requiring long-term consistency.
| [no-hooks](docs/rules/no-hooks.md) | Disallow setup and teardown hooks | | |
| [no-identical-title](docs/rules/no-identical-title.md) | Disallow identical titles | ![recommended][] | |
| [no-if](docs/rules/no-if.md) | Disallow conditional logic | | |
| [no-interpolation-in-snapshots](docs/rules/no-interpolation-in-snapshots.md) | Disallow string interpolation inside snapshots | | |
| [no-interpolation-in-snapshots](docs/rules/no-interpolation-in-snapshots.md) | Disallow string interpolation inside snapshots | ![recommended][] | |
| [no-jasmine-globals](docs/rules/no-jasmine-globals.md) | Disallow Jasmine globals | ![recommended][] | ![fixable][] |
| [no-jest-import](docs/rules/no-jest-import.md) | Disallow importing Jest | ![recommended][] | |
| [no-large-snapshots](docs/rules/no-large-snapshots.md) | disallow large snapshots | | |
Expand Down
1 change: 1 addition & 0 deletions src/__tests__/__snapshots__/rules.test.ts.snap
Expand Up @@ -71,6 +71,7 @@ Object {
"jest/no-export": "error",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/no-interpolation-in-snapshots": "error",
"jest/no-jasmine-globals": "error",
"jest/no-jest-import": "error",
"jest/no-mocks-import": "error",
Expand Down
2 changes: 1 addition & 1 deletion src/rules/no-interpolation-in-snapshots.ts
Expand Up @@ -7,7 +7,7 @@ export default createRule({
docs: {
category: 'Best Practices',
description: 'Disallow string interpolation inside snapshots',
recommended: false,
recommended: 'error',
},
messages: {
noInterpolation: 'Do not use string interpolation inside of snapshots',
Expand Down

0 comments on commit 3705dff

Please sign in to comment.