diff --git a/package.json b/package.json index e2d48ee7c..768edf6e5 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,6 @@ "@types/node": "^12.6.6", "@typescript-eslint/eslint-plugin": "^1.13.0", "@typescript-eslint/parser": "^1.13.0", - "babel-eslint": "^10.0.2", "babel-jest": "^24.8.0", "eslint": "^5.1.0", "eslint-config-prettier": "^5.1.0", diff --git a/src/rules/__tests__/__snapshots__/no-large-snapshots.test.js.snap b/src/rules/__tests__/__snapshots__/no-large-snapshots.test.js.snap deleted file mode 100644 index 1c877d4aa..000000000 --- a/src/rules/__tests__/__snapshots__/no-large-snapshots.test.js.snap +++ /dev/null @@ -1,683 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`no-large-snapshots ExpressionStatement function should not report whitelisted large snapshots based on regexp 1`] = ` -Array [ - Object { - "data": Object { - "lineCount": 58, - "lineLimit": 50, - }, - "messageId": "tooLongSnapshots", - "node": Node { - "_babelType": "ExpressionStatement", - "end": 328, - "expression": Node { - "_babelType": "AssignmentExpression", - "end": 327, - "left": Node { - "_babelType": "MemberExpression", - "computed": true, - "end": 36, - "loc": SourceLocation { - "end": Position { - "column": 36, - "line": 1, - }, - "start": Position { - "column": 0, - "line": 1, - }, - }, - "object": Node { - "_babelType": "Identifier", - "end": 7, - "loc": SourceLocation { - "end": Position { - "column": 7, - "line": 1, - }, - "identifierName": "exports", - "start": Position { - "column": 0, - "line": 1, - }, - }, - "name": "exports", - "range": Array [ - 0, - 7, - ], - "start": 0, - "type": "Identifier", - }, - "property": Node { - "_babelType": "TemplateLiteral", - "end": 35, - "expressions": Array [], - "loc": SourceLocation { - "end": Position { - "column": 35, - "line": 1, - }, - "start": Position { - "column": 8, - "line": 1, - }, - }, - "quasis": Array [ - Node { - "_babelType": "TemplateElement", - "end": 34, - "loc": SourceLocation { - "end": Position { - "column": 35, - "line": 1, - }, - "start": Position { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 35, - ], - "start": 9, - "tail": true, - "type": "TemplateElement", - "value": Object { - "cooked": "a big component with text", - "raw": "a big component with text", - }, - }, - ], - "range": Array [ - 8, - 35, - ], - "start": 8, - "type": "TemplateLiteral", - }, - "range": Array [ - 0, - 36, - ], - "start": 0, - "type": "MemberExpression", - }, - "loc": SourceLocation { - "end": Position { - "column": 1, - "line": 59, - }, - "start": Position { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 327, - ], - "right": Node { - "_babelType": "TemplateLiteral", - "end": 327, - "expressions": Array [], - "loc": SourceLocation { - "end": Position { - "column": 1, - "line": 59, - }, - "start": Position { - "column": 39, - "line": 1, - }, - }, - "quasis": Array [ - Node { - "_babelType": "TemplateElement", - "end": 326, - "loc": SourceLocation { - "end": Position { - "column": 1, - "line": 59, - }, - "start": Position { - "column": 39, - "line": 1, - }, - }, - "range": Array [ - 39, - 327, - ], - "start": 40, - "tail": true, - "type": "TemplateElement", - "value": Object { - "cooked": " -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -", - "raw": " -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -", - }, - }, - ], - "range": Array [ - 39, - 327, - ], - "start": 39, - "type": "TemplateLiteral", - }, - "start": 0, - "type": "AssignmentExpression", - }, - "loc": SourceLocation { - "end": Position { - "column": 2, - "line": 59, - }, - "start": Position { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 328, - ], - "start": 0, - "type": "ExpressionStatement", - }, - }, -] -`; - -exports[`no-large-snapshots ExpressionStatement function should report if file is not whitelisted 1`] = ` -Array [ - Object { - "data": Object { - "lineCount": 58, - "lineLimit": 50, - }, - "messageId": "tooLongSnapshots", - "node": Node { - "_babelType": "ExpressionStatement", - "end": 320, - "expression": Node { - "_babelType": "AssignmentExpression", - "end": 319, - "left": Node { - "_babelType": "MemberExpression", - "computed": true, - "end": 28, - "loc": SourceLocation { - "end": Position { - "column": 28, - "line": 1, - }, - "start": Position { - "column": 0, - "line": 1, - }, - }, - "object": Node { - "_babelType": "Identifier", - "end": 7, - "loc": SourceLocation { - "end": Position { - "column": 7, - "line": 1, - }, - "identifierName": "exports", - "start": Position { - "column": 0, - "line": 1, - }, - }, - "name": "exports", - "range": Array [ - 0, - 7, - ], - "start": 0, - "type": "Identifier", - }, - "property": Node { - "_babelType": "TemplateLiteral", - "end": 27, - "expressions": Array [], - "loc": SourceLocation { - "end": Position { - "column": 27, - "line": 1, - }, - "start": Position { - "column": 8, - "line": 1, - }, - }, - "quasis": Array [ - Node { - "_babelType": "TemplateElement", - "end": 26, - "loc": SourceLocation { - "end": Position { - "column": 27, - "line": 1, - }, - "start": Position { - "column": 8, - "line": 1, - }, - }, - "range": Array [ - 8, - 27, - ], - "start": 9, - "tail": true, - "type": "TemplateElement", - "value": Object { - "cooked": "a big component 1", - "raw": "a big component 1", - }, - }, - ], - "range": Array [ - 8, - 27, - ], - "start": 8, - "type": "TemplateLiteral", - }, - "range": Array [ - 0, - 28, - ], - "start": 0, - "type": "MemberExpression", - }, - "loc": SourceLocation { - "end": Position { - "column": 1, - "line": 59, - }, - "start": Position { - "column": 0, - "line": 1, - }, - }, - "operator": "=", - "range": Array [ - 0, - 319, - ], - "right": Node { - "_babelType": "TemplateLiteral", - "end": 319, - "expressions": Array [], - "loc": SourceLocation { - "end": Position { - "column": 1, - "line": 59, - }, - "start": Position { - "column": 31, - "line": 1, - }, - }, - "quasis": Array [ - Node { - "_babelType": "TemplateElement", - "end": 318, - "loc": SourceLocation { - "end": Position { - "column": 1, - "line": 59, - }, - "start": Position { - "column": 31, - "line": 1, - }, - }, - "range": Array [ - 31, - 319, - ], - "start": 32, - "tail": true, - "type": "TemplateElement", - "value": Object { - "cooked": " -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -", - "raw": " -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -line -", - }, - }, - ], - "range": Array [ - 31, - 319, - ], - "start": 31, - "type": "TemplateLiteral", - }, - "start": 0, - "type": "AssignmentExpression", - }, - "loc": SourceLocation { - "end": Position { - "column": 2, - "line": 59, - }, - "start": Position { - "column": 0, - "line": 1, - }, - }, - "range": Array [ - 0, - 320, - ], - "start": 0, - "type": "ExpressionStatement", - }, - }, -] -`; - -exports[`no-large-snapshots ExpressionStatement function should report if maxSize is zero 1`] = ` -Array [ - Object { - "data": Object { - "lineCount": 1, - "lineLimit": 0, - }, - "messageId": "noSnapshot", - "node": Object { - "loc": Object { - "end": Object { - "line": 2, - }, - "start": Object { - "line": 1, - }, - }, - }, - }, -] -`; - -exports[`no-large-snapshots ExpressionStatement function should report if node has more lines of code than number given in sizeThreshold option 1`] = ` -Array [ - Object { - "data": Object { - "lineCount": 83, - "lineLimit": 70, - }, - "messageId": "tooLongSnapshots", - "node": Object { - "loc": Object { - "end": Object { - "line": 103, - }, - "start": Object { - "line": 20, - }, - }, - }, - }, -] -`; - -exports[`no-large-snapshots ExpressionStatement function should report if node has more than 50 lines of code and no sizeThreshold option is passed 1`] = ` -Array [ - Object { - "data": Object { - "lineCount": 52, - "lineLimit": 50, - }, - "messageId": "tooLongSnapshots", - "node": Object { - "loc": Object { - "end": Object { - "line": 53, - }, - "start": Object { - "line": 1, - }, - }, - }, - }, -] -`; diff --git a/src/rules/__tests__/no-large-snapshots.test.js b/src/rules/__tests__/no-large-snapshots.test.js index 2afcc819b..4fe584434 100644 --- a/src/rules/__tests__/no-large-snapshots.test.js +++ b/src/rules/__tests__/no-large-snapshots.test.js @@ -1,5 +1,4 @@ import { RuleTester } from 'eslint'; -import { parse } from 'babel-eslint'; import rule from '../no-large-snapshots'; const noLargeSnapshots = rule.create; @@ -10,31 +9,54 @@ const ruleTester = new RuleTester({ }, }); -// lines - 1 to account for the starting newline we always add. -const generateSnapshotNode = ({ lines, title = 'a big component 1' }) => - parse(`exports[\`${title}\`] = \`\n${'line\n'.repeat(lines - 1)}\`;`).body[0]; +const generateSnapshotLines = lines => `\`\n${'line\n'.repeat(lines)}\``; + +const generateExportsSnapshotString = (lines, title = 'a big component 1') => + `exports[\`${title}\`] = ${generateSnapshotLines(lines - 1)};`; + +const generateExpectInlineSnapsCode = (lines, matcher) => + `expect(something).${matcher}(${generateSnapshotLines(lines)});`; ruleTester.run('no-large-snapshots', rule, { valid: [ { filename: 'mock.js', - code: `expect(something).toMatchInlineSnapshot(\`\n${'line\n'.repeat( - 2, - )}\`);`, + code: generateExpectInlineSnapsCode(2, 'toMatchInlineSnapshot'), }, { filename: 'mock.js', - code: `expect(something).toThrowErrorMatchingInlineSnapshot(\`\n${'line\n'.repeat( + code: generateExpectInlineSnapsCode( 2, - )}\`);`, + 'toThrowErrorMatchingInlineSnapshot', + ), + }, + { + // "it should return an empty object for non snapshot files" + filename: 'mock.jsx', + code: generateExpectInlineSnapsCode(50, 'toMatchInlineSnapshot'), + }, + { + // "should not report if node has fewer lines of code than limit" + filename: '/mock-component.jsx.snap', + code: generateExportsSnapshotString(20), + }, + { + // "it should not report whitelisted large snapshots" + filename: '/mock-component.jsx.snap', + code: generateExportsSnapshotString(58), + options: [ + { + whitelistedSnapshots: { + '/mock-component.jsx.snap': ['a big component 1'], + }, + }, + ], }, ], invalid: [ { filename: 'mock.js', - code: `expect(something).toMatchInlineSnapshot(\`\n${'line\n'.repeat( - 50, - )}\`);`, + code: generateExpectInlineSnapsCode(50, 'toMatchInlineSnapshot'), errors: [ { messageId: 'tooLongSnapshots', @@ -44,9 +66,10 @@ ruleTester.run('no-large-snapshots', rule, { }, { filename: 'mock.js', - code: `expect(something).toThrowErrorMatchingInlineSnapshot(\`\n${'line\n'.repeat( + code: generateExpectInlineSnapsCode( 50, - )}\`);`, + 'toThrowErrorMatchingInlineSnapshot', + ), errors: [ { messageId: 'tooLongSnapshots', @@ -54,203 +77,98 @@ ruleTester.run('no-large-snapshots', rule, { }, ], }, - ], -}); - -// was not able to use https://eslint.org/docs/developer-guide/nodejs-api#ruletester for these because there is no way to configure RuleTester to run non .js files -describe('no-large-snapshots', () => { - it('should return an empty object for non snapshot files', () => { - const mockContext = { - getFilename: () => 'mock-component.jsx', - options: [], - }; - const result = noLargeSnapshots(mockContext); - - expect(result).toEqual({}); - }); - - it('should return an object with an ExpressionStatement function for snapshot files', () => { - const mockContext = { - getFilename: () => '/mock-component.jsx.snap', - options: [], - }; - - const result = noLargeSnapshots(mockContext); - - expect(result).toMatchObject({ - ExpressionStatement: expect.any(Function), - }); - }); - - describe('ExpressionStatement function', () => { - it('should report if node has more than 50 lines of code and no sizeThreshold option is passed', () => { - const mockReport = jest.fn(); - const mockContext = { - getFilename: () => '/mock-component.jsx.snap', - options: [], - report: mockReport, - }; - const mockNode = { - loc: { - start: { - line: 1, - }, - end: { - line: 53, - }, + { + // "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 }, }, - }; - noLargeSnapshots(mockContext).ExpressionStatement(mockNode); - - expect(mockReport).toHaveBeenCalledTimes(1); - expect(mockReport.mock.calls[0]).toMatchSnapshot(); - }); - - it('should report if node has more lines of code than number given in sizeThreshold option', () => { - const mockReport = jest.fn(); - const mockContext = { - getFilename: () => '/mock-component.jsx.snap', - options: [{ maxSize: 70 }], - report: mockReport, - }; - const mockNode = { - loc: { - start: { - line: 20, - }, - end: { - line: 103, - }, + ], + }, + { + // "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: [ + { + messageId: 'tooLongSnapshots', + data: { lineLimit: 70, lineCount: 100 }, }, - }; - noLargeSnapshots(mockContext).ExpressionStatement(mockNode); - - expect(mockReport).toHaveBeenCalledTimes(1); - expect(mockReport.mock.calls[0]).toMatchSnapshot(); - }); - - it('should report if maxSize is zero', () => { - const mockReport = jest.fn(); - const mockContext = { - getFilename: () => '/mock-component.jsx.snap', - options: [{ maxSize: 0 }], - report: mockReport, - }; - const mockNode = { - loc: { - start: { - line: 1, - }, - end: { - line: 2, - }, + ], + }, + { + // "should report if maxSize is zero" + filename: '/mock-component.jsx.snap', + code: generateExportsSnapshotString(1), + options: [{ maxSize: 0 }], + errors: [ + { + messageId: 'noSnapshot', + data: { lineLimit: 0, lineCount: 1 }, }, - }; - noLargeSnapshots(mockContext).ExpressionStatement(mockNode); - - expect(mockReport).toHaveBeenCalledTimes(1); - expect(mockReport.mock.calls[0]).toMatchSnapshot(); - }); - - it('should not report if node has fewer lines of code than limit', () => { - const mockReport = jest.fn(); - const mockContext = { - getFilename: () => '/mock-component.jsx.snap', - options: [], - report: mockReport, - }; - const mockNode = { - loc: { - start: { - line: 1, - }, - end: { - line: 18, + ], + }, + { + // "it should report if file is not whitelisted" + filename: '/mock-component.jsx.snap', + // code: generateExportsSnapshotString(58), + code: generateExportsSnapshotString(58), + options: [ + { + whitelistedSnapshots: { + '/another-mock-component.jsx.snap': [/a big component \d+/], }, }, - }; - noLargeSnapshots(mockContext).ExpressionStatement(mockNode); - - expect(mockReport).not.toHaveBeenCalled(); - }); - - it('should not report whitelisted large snapshots', () => { - const mockReport = jest.fn(); - const mockContext = { - getFilename: () => '/mock-component.jsx.snap', - options: [ - { - whitelistedSnapshots: { - '/mock-component.jsx.snap': ['a big component 1'], - }, - }, - ], - report: mockReport, - }; - - const snapshotNode = generateSnapshotNode({ lines: 58 }); - - noLargeSnapshots(mockContext).ExpressionStatement(snapshotNode); - - expect(mockReport).not.toHaveBeenCalled(); - }); - - it('should report if file is not whitelisted', () => { - const mockReport = jest.fn(); - const mockContext = { - getFilename: () => '/mock-component.jsx.snap', - options: [ - { - whitelistedSnapshots: { - '/other-mock-component.jsx.snap': [/a big component \d+/], - }, - }, - ], - report: mockReport, - }; - - const snapshotNode = generateSnapshotNode({ lines: 58 }); - - noLargeSnapshots(mockContext).ExpressionStatement(snapshotNode); - - expect(mockReport).toHaveBeenCalledTimes(1); - expect(mockReport.mock.calls[0]).toMatchSnapshot(); - }); - - it('should not report whitelisted large snapshots based on regexp', () => { - const mockReport = jest.fn(); - const mockContext = { - getFilename: () => '/mock-component.jsx.snap', - options: [ - { - whitelistedSnapshots: { - '/mock-component.jsx.snap': [/a big component \d+/], - }, + ], + errors: [ + { + messageId: 'tooLongSnapshots', + data: { lineLimit: 50, lineCount: 58 }, + }, + ], + }, + { + // "should not report whitelisted large snapshots based on regexp" + filename: '/mock-component.jsx.snap', + code: [ + generateExportsSnapshotString(58, 'a big component w/ text'), + generateExportsSnapshotString(58, 'a big component 2'), + ].join('\n\n'), + options: [ + { + whitelistedSnapshots: { + '/mock-component.jsx.snap': [/a big component \d+/], }, - ], - report: mockReport, - }; - - const snapshotNode = generateSnapshotNode({ lines: 58 }); - - noLargeSnapshots(mockContext).ExpressionStatement(snapshotNode); - - expect(mockReport).not.toHaveBeenCalled(); - - const otherSnapshotNode = generateSnapshotNode({ - lines: 58, - title: 'a big component with text', - }); - - noLargeSnapshots(mockContext).ExpressionStatement(otherSnapshotNode); + }, + ], + errors: [ + { + messageId: 'tooLongSnapshots', + data: { lineLimit: 50, lineCount: 58 }, + }, + ], + }, + ], +}); - expect(mockReport).toHaveBeenCalledTimes(1); - expect(mockReport.mock.calls[0]).toMatchSnapshot(); - }); +describe('no-large-snapshots', () => { + const buildBaseNode = type => ({ + type, + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 }, + }, + }); - it('should throw exeption if relative paths are passed as whitelist keys', () => { - const mockReport = jest.fn(); - const mockContext = { + describe('when "whitelistedSnapshots" option contains relative paths', () => { + it('should throw an exception', () => { + const { ExpressionStatement = () => {} } = noLargeSnapshots({ + id: 'my-id', getFilename: () => '/mock-component.jsx.snap', options: [ { @@ -259,37 +177,25 @@ describe('no-large-snapshots', () => { }, }, ], - report: mockReport, - }; - - const snapshotNode = generateSnapshotNode({ lines: 58 }); + parserOptions: {}, + parserPath: '', + settings: {}, + getAncestors: () => [], + getDeclaredVariables: () => [], + getScope: jest.fn(), + getSourceCode: jest.fn(), + markVariableAsUsed: () => false, + report: jest.fn(), + }); expect(() => - noLargeSnapshots(mockContext).ExpressionStatement(snapshotNode), + ExpressionStatement({ + ...buildBaseNode('ExpressionStatement'), + expression: buildBaseNode('JSXClosingFragment'), + }), ).toThrow( 'All paths for whitelistedSnapshots must be absolute. You can use JS config and `path.resolve`', ); }); - - it('should not throw exeption if absolute paths are passed as whitelist keys', () => { - const mockReport = jest.fn(); - const mockContext = { - getFilename: () => '/mock-component.jsx.snap', - options: [ - { - whitelistedSnapshots: { - '/mock-component.jsx.snap': [/a big component \d+/], - }, - }, - ], - report: mockReport, - }; - - const snapshotNode = generateSnapshotNode({ lines: 58 }); - - expect(() => - noLargeSnapshots(mockContext).ExpressionStatement(snapshotNode), - ).not.toThrow(); - }); }); }); diff --git a/yarn.lock b/yarn.lock index 8a8539283..01d2586eb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -242,7 +242,7 @@ esutils "^2.0.2" js-tokens "^4.0.0" -"@babel/parser@^7.0.0", "@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.4.4", "@babel/parser@^7.5.5": +"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.4.4", "@babel/parser@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.5.5.tgz#02f077ac8817d3df4a832ef59de67565e71cca4b" integrity sha512-E5BN68cqR7dhKan1SfqgPGhQ178bkVKpXTPEXnFJBrEt8/DKRZlybmy+IgYLTeN7tp1R5Ccmbm2rBk17sHYU3g== @@ -674,7 +674,7 @@ "@babel/parser" "^7.4.4" "@babel/types" "^7.4.4" -"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.4.4", "@babel/traverse@^7.5.5": +"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.4.4", "@babel/traverse@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.5.5.tgz#f664f8f368ed32988cd648da9f72d5ca70f165bb" integrity sha512-MqB0782whsfffYfSjH4TM+LMjrJnhCNEDMDIjeTpl+ASaUvxcjoiVCo/sM1GhS1pHOXYfWVCYneLjMckuUxDaQ== @@ -1384,18 +1384,6 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== -babel-eslint@^10.0.2: - version "10.0.2" - resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.0.2.tgz#182d5ac204579ff0881684b040560fdcc1558456" - integrity sha512-UdsurWPtgiPgpJ06ryUnuaSXC2s0WoSZnQmEpbAH65XZSdwowgN5MvyP7e88nW07FYXv72erVtpBkxyDVKhH1Q== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.0.0" - "@babel/traverse" "^7.0.0" - "@babel/types" "^7.0.0" - eslint-scope "3.7.1" - eslint-visitor-keys "^1.0.0" - babel-jest@^24.8.0: version "24.8.0" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-24.8.0.tgz#5c15ff2b28e20b0f45df43fe6b7f2aae93dba589" @@ -2276,14 +2264,6 @@ eslint-plugin-prettier@^3.0.0: dependencies: prettier-linter-helpers "^1.0.0" -eslint-scope@3.7.1: - version "3.7.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" - integrity sha1-PWPD7f2gLgbgGkUq2IyqzHzctug= - dependencies: - esrecurse "^4.1.0" - estraverse "^4.1.1" - eslint-scope@^4.0.0, eslint-scope@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848"