Skip to content

Commit efe56c1

Browse files
authored
chore: update dev dependencies (#894)
1 parent ef08fa6 commit efe56c1

File tree

4 files changed

+530
-458
lines changed

4 files changed

+530
-458
lines changed

.eslintrc.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,12 @@ module.exports = {
1111
'plugin:node/recommended',
1212
'plugin:@typescript-eslint/eslint-recommended',
1313
'plugin:prettier/recommended',
14-
'prettier/@typescript-eslint',
1514
],
1615
plugins: [
1716
'eslint-config',
1817
'eslint-plugin',
1918
'eslint-comments',
2019
'node',
21-
'prettier',
2220
'import',
2321
'@typescript-eslint',
2422
],

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@
8686
"@babel/core": "^7.4.4",
8787
"@babel/preset-env": "^7.4.4",
8888
"@babel/preset-typescript": "^7.3.3",
89-
"@commitlint/cli": "^12.0.0",
90-
"@commitlint/config-conventional": "^12.0.0",
89+
"@commitlint/cli": "^13.1.0",
90+
"@commitlint/config-conventional": "^13.1.0",
9191
"@schemastore/package": "^0.0.6",
9292
"@semantic-release/changelog": "^5.0.1",
9393
"@semantic-release/git": "^9.0.0",
@@ -101,24 +101,24 @@
101101
"babel-plugin-replace-ts-export-assignment": "^0.0.2",
102102
"dedent": "^0.7.0",
103103
"eslint": "^6.0.0 || ^7.0.0",
104-
"eslint-config-prettier": "^6.5.0",
104+
"eslint-config-prettier": "^8.3.0",
105105
"eslint-plugin-eslint-comments": "^3.1.2",
106106
"eslint-plugin-eslint-config": "^2.0.0",
107-
"eslint-plugin-eslint-plugin": "^2.0.0",
107+
"eslint-plugin-eslint-plugin": "^3.5.3",
108108
"eslint-plugin-import": "^2.20.2",
109109
"eslint-plugin-node": "^11.0.0",
110-
"eslint-plugin-prettier": "^3.0.0",
111-
"husky": "^6.0.0",
110+
"eslint-plugin-prettier": "^3.4.1",
111+
"husky": "^7.0.2",
112112
"is-ci": "^3.0.0",
113113
"jest": "^27.0.0",
114114
"jest-runner-eslint": "^0.10.0",
115-
"lint-staged": "^10.2.2",
115+
"lint-staged": "^11.1.2",
116116
"pinst": "^2.0.0",
117117
"prettier": "^2.0.5",
118118
"resolve-from": "^5.0.0",
119119
"rimraf": "^3.0.0",
120120
"semantic-release": "^17.0.7",
121-
"ts-node": "^9.0.0",
121+
"ts-node": "^10.2.1",
122122
"typescript": "^4.4.0"
123123
},
124124
"peerDependencies": {

src/rules/__tests__/no-large-snapshots.test.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,42 +28,43 @@ ruleTester.run('no-large-snapshots', rule, {
2828
'expect(something).toBe(1)',
2929
'expect(something).toMatchInlineSnapshot',
3030
{
31-
code: generateExpectInlineSnapsCode(2, 'toMatchInlineSnapshot'),
3231
filename: 'mock.js',
32+
code: generateExpectInlineSnapsCode(2, 'toMatchInlineSnapshot'),
3333
},
3434
{
35+
filename: 'mock.js',
3536
code: generateExpectInlineSnapsCode(
3637
2,
3738
'toThrowErrorMatchingInlineSnapshot',
3839
),
39-
filename: 'mock.js',
4040
},
4141
{
42+
filename: 'mock.jsx',
4243
code: generateExpectInlineSnapsCode(20, 'toMatchInlineSnapshot'),
4344
options: [
4445
{
4546
maxSize: 19,
4647
inlineMaxSize: 21,
4748
},
4849
],
49-
filename: 'mock.jsx',
5050
},
5151
{
52+
filename: 'mock.jsx',
5253
code: generateExpectInlineSnapsCode(60, 'toMatchInlineSnapshot'),
5354
options: [
5455
{
5556
maxSize: 61,
5657
},
5758
],
58-
filename: 'mock.jsx',
5959
},
6060
{
6161
// "should not report if node has fewer lines of code than limit"
62-
code: generateExportsSnapshotString(20),
6362
filename: '/mock-component.jsx.snap',
63+
code: generateExportsSnapshotString(20),
6464
},
6565
{
6666
// "it should not report snapshots that are allowed to be large"
67+
filename: '/mock-component.jsx.snap',
6768
code: generateExportsSnapshotString(58),
6869
options: [
6970
{
@@ -72,31 +73,31 @@ ruleTester.run('no-large-snapshots', rule, {
7273
},
7374
},
7475
],
75-
filename: '/mock-component.jsx.snap',
7676
},
7777
{
78+
filename: '/mock-component.jsx.snap',
7879
code: generateExportsSnapshotString(20),
7980
options: [
8081
{
8182
maxSize: 21,
8283
inlineMaxSize: 19,
8384
},
8485
],
85-
filename: '/mock-component.jsx.snap',
8686
},
8787
],
8888
invalid: [
8989
{
90+
filename: 'mock.js',
9091
code: generateExpectInlineSnapsCode(50, 'toMatchInlineSnapshot'),
9192
errors: [
9293
{
9394
messageId: 'tooLongSnapshots',
9495
data: { lineLimit: 50, lineCount: 51 },
9596
},
9697
],
97-
filename: 'mock.js',
9898
},
9999
{
100+
filename: 'mock.js',
100101
code: generateExpectInlineSnapsCode(
101102
50,
102103
'toThrowErrorMatchingInlineSnapshot',
@@ -107,9 +108,9 @@ ruleTester.run('no-large-snapshots', rule, {
107108
data: { lineLimit: 50, lineCount: 51 },
108109
},
109110
],
110-
filename: 'mock.js',
111111
},
112112
{
113+
filename: 'mock.js',
113114
code: generateExpectInlineSnapsCode(
114115
50,
115116
'toThrowErrorMatchingInlineSnapshot',
@@ -121,32 +122,32 @@ ruleTester.run('no-large-snapshots', rule, {
121122
data: { lineLimit: 50, lineCount: 51 },
122123
},
123124
],
124-
filename: 'mock.js',
125125
},
126126
{
127127
// "it should return an empty object for non snapshot files"
128+
filename: 'mock.jsx',
128129
code: generateExpectInlineSnapsCode(50, 'toMatchInlineSnapshot'),
129130
errors: [
130131
{
131132
messageId: 'tooLongSnapshots',
132133
data: { lineLimit: 50, lineCount: 51 },
133134
},
134135
],
135-
filename: 'mock.jsx',
136136
},
137137
{
138138
// "should report if node has more than 50 lines of code, and no sizeThreshold option is passed"
139+
filename: '/mock-component.jsx.snap',
139140
code: generateExportsSnapshotString(52),
140141
errors: [
141142
{
142143
messageId: 'tooLongSnapshots',
143144
data: { lineLimit: 50, lineCount: 52 },
144145
},
145146
],
146-
filename: '/mock-component.jsx.snap',
147147
},
148148
{
149149
// "should report if node has more lines of code than number given in sizeThreshold option"
150+
filename: '/mock-component.jsx.snap',
150151
code: generateExportsSnapshotString(100),
151152
options: [{ maxSize: 70 }],
152153
errors: [
@@ -155,9 +156,9 @@ ruleTester.run('no-large-snapshots', rule, {
155156
data: { lineLimit: 70, lineCount: 100 },
156157
},
157158
],
158-
filename: '/mock-component.jsx.snap',
159159
},
160160
{
161+
filename: '/mock-component.jsx.snap',
161162
code: generateExportsSnapshotString(100),
162163
options: [{ maxSize: 70, inlineMaxSize: 101 }],
163164
errors: [
@@ -166,10 +167,10 @@ ruleTester.run('no-large-snapshots', rule, {
166167
data: { lineLimit: 70, lineCount: 100 },
167168
},
168169
],
169-
filename: '/mock-component.jsx.snap',
170170
},
171171
{
172172
// "should report if maxSize is zero"
173+
filename: '/mock-component.jsx.snap',
173174
code: generateExportsSnapshotString(1),
174175
options: [{ maxSize: 0 }],
175176
errors: [
@@ -178,10 +179,10 @@ ruleTester.run('no-large-snapshots', rule, {
178179
data: { lineLimit: 0, lineCount: 1 },
179180
},
180181
],
181-
filename: '/mock-component.jsx.snap',
182182
},
183183
{
184184
// "it should report if file is not allowed"
185+
filename: '/mock-component.jsx.snap',
185186
code: generateExportsSnapshotString(58),
186187
options: [
187188
{
@@ -196,10 +197,10 @@ ruleTester.run('no-large-snapshots', rule, {
196197
data: { lineLimit: 50, lineCount: 58 },
197198
},
198199
],
199-
filename: '/mock-component.jsx.snap',
200200
},
201201
{
202202
// "should not report allowed large snapshots based on regexp"
203+
filename: '/mock-component.jsx.snap',
203204
code: [
204205
generateExportsSnapshotString(58, 'a big component w/ text'),
205206
generateExportsSnapshotString(58, 'a big component 2'),
@@ -217,9 +218,9 @@ ruleTester.run('no-large-snapshots', rule, {
217218
data: { lineLimit: 50, lineCount: 58 },
218219
},
219220
],
220-
filename: '/mock-component.jsx.snap',
221221
},
222222
{
223+
filename: '/mock-component.jsx.snap',
223224
code: [
224225
generateExportsSnapshotString(58, 'a big component w/ text'),
225226
generateExportsSnapshotString(58, 'a big component 2'),
@@ -237,7 +238,6 @@ ruleTester.run('no-large-snapshots', rule, {
237238
data: { lineLimit: 50, lineCount: 58 },
238239
},
239240
],
240-
filename: '/mock-component.jsx.snap',
241241
},
242242
],
243243
});

0 commit comments

Comments
 (0)