Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update dev dependencies #894

Merged
merged 2 commits into from
Sep 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,12 @@ module.exports = {
'plugin:node/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:prettier/recommended',
'prettier/@typescript-eslint',
],
plugins: [
'eslint-config',
'eslint-plugin',
'eslint-comments',
'node',
'prettier',
'import',
'@typescript-eslint',
],
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
"@babel/core": "^7.4.4",
"@babel/preset-env": "^7.4.4",
"@babel/preset-typescript": "^7.3.3",
"@commitlint/cli": "^12.0.0",
"@commitlint/config-conventional": "^12.0.0",
"@commitlint/cli": "^13.1.0",
"@commitlint/config-conventional": "^13.1.0",
"@schemastore/package": "^0.0.6",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/git": "^9.0.0",
Expand All @@ -101,24 +101,24 @@
"babel-plugin-replace-ts-export-assignment": "^0.0.2",
"dedent": "^0.7.0",
"eslint": "^6.0.0 || ^7.0.0",
"eslint-config-prettier": "^6.5.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-eslint-comments": "^3.1.2",
"eslint-plugin-eslint-config": "^2.0.0",
"eslint-plugin-eslint-plugin": "^2.0.0",
"eslint-plugin-eslint-plugin": "^3.5.3",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^3.0.0",
"husky": "^6.0.0",
"eslint-plugin-prettier": "^3.4.1",
"husky": "^7.0.2",
"is-ci": "^3.0.0",
"jest": "^27.0.0",
"jest-runner-eslint": "^0.10.0",
"lint-staged": "^10.2.2",
"lint-staged": "^11.1.2",
"pinst": "^2.0.0",
"prettier": "^2.0.5",
"resolve-from": "^5.0.0",
"rimraf": "^3.0.0",
"semantic-release": "^17.0.7",
"ts-node": "^9.0.0",
"ts-node": "^10.2.1",
"typescript": "^4.4.0"
},
"peerDependencies": {
Expand Down
36 changes: 18 additions & 18 deletions src/rules/__tests__/no-large-snapshots.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,42 +28,43 @@ ruleTester.run('no-large-snapshots', rule, {
'expect(something).toBe(1)',
'expect(something).toMatchInlineSnapshot',
{
code: generateExpectInlineSnapsCode(2, 'toMatchInlineSnapshot'),
filename: 'mock.js',
code: generateExpectInlineSnapsCode(2, 'toMatchInlineSnapshot'),
},
{
filename: 'mock.js',
code: generateExpectInlineSnapsCode(
2,
'toThrowErrorMatchingInlineSnapshot',
),
filename: 'mock.js',
},
{
filename: 'mock.jsx',
code: generateExpectInlineSnapsCode(20, 'toMatchInlineSnapshot'),
options: [
{
maxSize: 19,
inlineMaxSize: 21,
},
],
filename: 'mock.jsx',
},
{
filename: 'mock.jsx',
code: generateExpectInlineSnapsCode(60, 'toMatchInlineSnapshot'),
options: [
{
maxSize: 61,
},
],
filename: 'mock.jsx',
},
{
// "should not report if node has fewer lines of code than limit"
code: generateExportsSnapshotString(20),
filename: '/mock-component.jsx.snap',
code: generateExportsSnapshotString(20),
},
{
// "it should not report snapshots that are allowed to be large"
filename: '/mock-component.jsx.snap',
code: generateExportsSnapshotString(58),
options: [
{
Expand All @@ -72,31 +73,31 @@ ruleTester.run('no-large-snapshots', rule, {
},
},
],
filename: '/mock-component.jsx.snap',
},
{
filename: '/mock-component.jsx.snap',
code: generateExportsSnapshotString(20),
options: [
{
maxSize: 21,
inlineMaxSize: 19,
},
],
filename: '/mock-component.jsx.snap',
},
],
invalid: [
{
filename: 'mock.js',
code: generateExpectInlineSnapsCode(50, 'toMatchInlineSnapshot'),
errors: [
{
messageId: 'tooLongSnapshots',
data: { lineLimit: 50, lineCount: 51 },
},
],
filename: 'mock.js',
},
{
filename: 'mock.js',
code: generateExpectInlineSnapsCode(
50,
'toThrowErrorMatchingInlineSnapshot',
Expand All @@ -107,9 +108,9 @@ ruleTester.run('no-large-snapshots', rule, {
data: { lineLimit: 50, lineCount: 51 },
},
],
filename: 'mock.js',
},
{
filename: 'mock.js',
code: generateExpectInlineSnapsCode(
50,
'toThrowErrorMatchingInlineSnapshot',
Expand All @@ -121,32 +122,32 @@ ruleTester.run('no-large-snapshots', rule, {
data: { lineLimit: 50, lineCount: 51 },
},
],
filename: 'mock.js',
},
{
// "it should return an empty object for non snapshot files"
filename: 'mock.jsx',
code: generateExpectInlineSnapsCode(50, 'toMatchInlineSnapshot'),
errors: [
{
messageId: 'tooLongSnapshots',
data: { lineLimit: 50, lineCount: 51 },
},
],
filename: 'mock.jsx',
},
{
// "should report if node has more than 50 lines of code, and no sizeThreshold option is passed"
filename: '/mock-component.jsx.snap',
code: generateExportsSnapshotString(52),
errors: [
{
messageId: 'tooLongSnapshots',
data: { lineLimit: 50, lineCount: 52 },
},
],
filename: '/mock-component.jsx.snap',
},
{
// "should report if node has more lines of code than number given in sizeThreshold option"
filename: '/mock-component.jsx.snap',
code: generateExportsSnapshotString(100),
options: [{ maxSize: 70 }],
errors: [
Expand All @@ -155,9 +156,9 @@ ruleTester.run('no-large-snapshots', rule, {
data: { lineLimit: 70, lineCount: 100 },
},
],
filename: '/mock-component.jsx.snap',
},
{
filename: '/mock-component.jsx.snap',
code: generateExportsSnapshotString(100),
options: [{ maxSize: 70, inlineMaxSize: 101 }],
errors: [
Expand All @@ -166,10 +167,10 @@ ruleTester.run('no-large-snapshots', rule, {
data: { lineLimit: 70, lineCount: 100 },
},
],
filename: '/mock-component.jsx.snap',
},
{
// "should report if maxSize is zero"
filename: '/mock-component.jsx.snap',
code: generateExportsSnapshotString(1),
options: [{ maxSize: 0 }],
errors: [
Expand All @@ -178,10 +179,10 @@ ruleTester.run('no-large-snapshots', rule, {
data: { lineLimit: 0, lineCount: 1 },
},
],
filename: '/mock-component.jsx.snap',
},
{
// "it should report if file is not allowed"
filename: '/mock-component.jsx.snap',
code: generateExportsSnapshotString(58),
options: [
{
Expand All @@ -196,10 +197,10 @@ ruleTester.run('no-large-snapshots', rule, {
data: { lineLimit: 50, lineCount: 58 },
},
],
filename: '/mock-component.jsx.snap',
},
{
// "should not report allowed large snapshots based on regexp"
filename: '/mock-component.jsx.snap',
code: [
generateExportsSnapshotString(58, 'a big component w/ text'),
generateExportsSnapshotString(58, 'a big component 2'),
Expand All @@ -217,9 +218,9 @@ ruleTester.run('no-large-snapshots', rule, {
data: { lineLimit: 50, lineCount: 58 },
},
],
filename: '/mock-component.jsx.snap',
},
{
filename: '/mock-component.jsx.snap',
code: [
generateExportsSnapshotString(58, 'a big component w/ text'),
generateExportsSnapshotString(58, 'a big component 2'),
Expand All @@ -237,7 +238,6 @@ ruleTester.run('no-large-snapshots', rule, {
data: { lineLimit: 50, lineCount: 58 },
},
],
filename: '/mock-component.jsx.snap',
},
],
});
Expand Down
Loading