Skip to content

Commit 3705dff

Browse files
G-RathSimenB
authored andcommitted
feat: add no-interpolation-in-snapshots to the recommended ruleset
BREAKING CHANGE: recommend `no-interpolation-in-snapshots` rule
1 parent 5b2af00 commit 3705dff

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ installations requiring long-term consistency.
144144
| [no-hooks](docs/rules/no-hooks.md) | Disallow setup and teardown hooks | | |
145145
| [no-identical-title](docs/rules/no-identical-title.md) | Disallow identical titles | ![recommended][] | |
146146
| [no-if](docs/rules/no-if.md) | Disallow conditional logic | | |
147-
| [no-interpolation-in-snapshots](docs/rules/no-interpolation-in-snapshots.md) | Disallow string interpolation inside snapshots | | |
147+
| [no-interpolation-in-snapshots](docs/rules/no-interpolation-in-snapshots.md) | Disallow string interpolation inside snapshots | ![recommended][] | |
148148
| [no-jasmine-globals](docs/rules/no-jasmine-globals.md) | Disallow Jasmine globals | ![recommended][] | ![fixable][] |
149149
| [no-jest-import](docs/rules/no-jest-import.md) | Disallow importing Jest | ![recommended][] | |
150150
| [no-large-snapshots](docs/rules/no-large-snapshots.md) | disallow large snapshots | | |

src/__tests__/__snapshots__/rules.test.ts.snap

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ Object {
7171
"jest/no-export": "error",
7272
"jest/no-focused-tests": "error",
7373
"jest/no-identical-title": "error",
74+
"jest/no-interpolation-in-snapshots": "error",
7475
"jest/no-jasmine-globals": "error",
7576
"jest/no-jest-import": "error",
7677
"jest/no-mocks-import": "error",

src/rules/no-interpolation-in-snapshots.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default createRule({
77
docs: {
88
category: 'Best Practices',
99
description: 'Disallow string interpolation inside snapshots',
10-
recommended: false,
10+
recommended: 'error',
1111
},
1212
messages: {
1313
noInterpolation: 'Do not use string interpolation inside of snapshots',

0 commit comments

Comments
 (0)