diff --git a/integration_tests/__tests__/stack_trace-test.js b/integration_tests/__tests__/stack_trace-test.js index 8015311b1a1e..ad428c62a55c 100644 --- a/integration_tests/__tests__/stack_trace-test.js +++ b/integration_tests/__tests__/stack_trace-test.js @@ -82,11 +82,9 @@ describe('Stack Trace', () => { expect(stderr).toMatch(/\s+at\s(?:.+?)\s\(__tests__\/test-error-test\.js/); // Make sure we show Jest's jest-resolve as part of the stack trace - /* eslint-disable max-len */ expect(stderr).toMatch( /Cannot find module 'this-module-does-not-exist' from 'test-error-test\.js'/, ); - /* eslint-enable max-len */ expect(stderr).toMatch( /\s+at\s(?:.+?)\s\((?:.+?)jest-resolve\/build\/index\.js/, diff --git a/packages/eslint-plugin-jest/src/rules/__tests__/no-identical-title-test.js b/packages/eslint-plugin-jest/src/rules/__tests__/no-identical-title-test.js index 95b163e8a444..d0358171c84b 100644 --- a/packages/eslint-plugin-jest/src/rules/__tests__/no-identical-title-test.js +++ b/packages/eslint-plugin-jest/src/rules/__tests__/no-identical-title-test.js @@ -8,7 +8,7 @@ * @flow */ -/* eslint-disable sort-keys, max-len */ +/* eslint-disable sort-keys */ 'use strict'; diff --git a/packages/jest-cli/src/lib/__tests__/isValidPath-test.js b/packages/jest-cli/src/lib/__tests__/isValidPath-test.js index 3424cb56f4c1..71ebdd3514ae 100644 --- a/packages/jest-cli/src/lib/__tests__/isValidPath-test.js +++ b/packages/jest-cli/src/lib/__tests__/isValidPath-test.js @@ -10,8 +10,6 @@ 'use strict'; -/* eslint-disable max-len */ - const path = require('path'); const isValidPath = require('../isValidPath'); diff --git a/packages/jest-cli/src/lib/getTestPathPattern.js b/packages/jest-cli/src/lib/getTestPathPattern.js index b008cb93e40b..b3f0d3bfd4cb 100644 --- a/packages/jest-cli/src/lib/getTestPathPattern.js +++ b/packages/jest-cli/src/lib/getTestPathPattern.js @@ -25,7 +25,6 @@ const DEFAULT_PATTERN_INFO = { const showTestPathPatternError = (testPathPattern: string) => { clearLine(process.stdout); - // eslint-disable-next-line max-len console.log( chalk.red( ` Invalid testPattern ${testPathPattern} supplied. ` + diff --git a/packages/jest-config/src/normalize.js b/packages/jest-config/src/normalize.js index 3e5baf2364da..96a78670ece2 100644 --- a/packages/jest-config/src/normalize.js +++ b/packages/jest-config/src/normalize.js @@ -176,7 +176,6 @@ const normalizeUnmockedModulePathPatterns = ( }; const normalizePreprocessor = (options: InitialOptions): InitialOptions => { - /* eslint-disable max-len */ if (options.scriptPreprocessor && options.transform) { throw createConfigError( ` Options: ${chalk.bold('scriptPreprocessor')} and ${chalk.bold('transform')} cannot be used together. @@ -190,7 +189,6 @@ const normalizePreprocessor = (options: InitialOptions): InitialOptions => { Please change your configuration to only use ${chalk.bold('transformIgnorePatterns')}.`, ); } - /* eslint-enable max-len */ if (options.scriptPreprocessor) { options.transform = { diff --git a/packages/jest-config/src/utils.js b/packages/jest-config/src/utils.js index 48d6eb6331df..4d21aea98b72 100644 --- a/packages/jest-config/src/utils.js +++ b/packages/jest-config/src/utils.js @@ -38,11 +38,9 @@ const resolve = (rootDir: string, key: string, filePath: Path) => { ); if (!module) { - /* eslint-disable max-len */ throw createValidationError( ` Module ${chalk.bold(filePath)} in the ${chalk.bold(key)} option was not found.`, ); - /* eslint-disable max-len */ } return module; @@ -118,11 +116,9 @@ const getTestEnvironment = (config: Object) => { return require.resolve(env); } catch (e) {} - /* eslint-disable max-len */ throw createValidationError( ` Test environment ${chalk.bold(env)} cannot be found. Make sure the ${chalk.bold('testEnvironment')} configuration option points to an existing node module.`, ); - /* eslint-disable max-len */ }; const isJSONString = (text: ?string) => diff --git a/packages/jest-docblock/src/index.js b/packages/jest-docblock/src/index.js index ee6c6225769a..4cf0f67724ff 100644 --- a/packages/jest-docblock/src/index.js +++ b/packages/jest-docblock/src/index.js @@ -14,7 +14,6 @@ const commentStartRe = /^\/\*\*/; const docblockRe = /^\s*(\/\*\*?(.|\r?\n)*?\*\/)/; const lineCommentRe = /\/\/([^\r\n]*)/g; const ltrimRe = /^\s*/; -// eslint-disable-next-line max-len const multilineRe = /(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *([^@\r\n\s][^@\r\n]+?) *\r?\n/g; const propertyRe = /(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g; const stringStartRe = /(\r?\n|^) *\*/g; diff --git a/packages/jest-haste-map/src/lib/extractRequires.js b/packages/jest-haste-map/src/lib/extractRequires.js index db91af3bde39..df8960e78ebc 100644 --- a/packages/jest-haste-map/src/lib/extractRequires.js +++ b/packages/jest-haste-map/src/lib/extractRequires.js @@ -12,14 +12,12 @@ const blockCommentRe = /\/\*[^]*?\*\//g; const lineCommentRe = /\/\/.*/g; -/* eslint-disable max-len */ const replacePatterns = { EXPORT_RE: /(\bexport\s+(?:[^'"]+\s+from\s+)??)(['"])([^'"]+)(\2)/g, IMPORT_RE: /(\bimport\s+(?:[^'"]+\s+from\s+)??)(['"])([^'"]+)(\2)/g, REQUIRE_EXTENSIONS_PATTERN: /(\b(?:require\s*?\.\s*?(?:requireActual|requireMock)|jest\s*?\.\s*?genMockFromModule)\s*?\(\s*?)([`'"])([^`'"]+)(\2\s*?\))/g, REQUIRE_RE: /(\brequire\s*?\(\s*?)([`'"])([^`'"]+)(\2\s*?\))/g, }; -/* eslint-enable max-len */ function extractRequires(code: string): Array { const dependencies = new Set(); diff --git a/packages/jest-matchers/src/__tests__/asymmetric-matchers-test.js b/packages/jest-matchers/src/__tests__/asymmetric-matchers-test.js index 73ec49c15945..b189a99b224d 100644 --- a/packages/jest-matchers/src/__tests__/asymmetric-matchers-test.js +++ b/packages/jest-matchers/src/__tests__/asymmetric-matchers-test.js @@ -7,7 +7,6 @@ * * @emails oncall+jsinfra */ -/* eslint-disable max-len */ 'use strict'; diff --git a/packages/jest-matchers/src/__tests__/matchers-test.js b/packages/jest-matchers/src/__tests__/matchers-test.js index b45202b44a1e..4f66d318c724 100644 --- a/packages/jest-matchers/src/__tests__/matchers-test.js +++ b/packages/jest-matchers/src/__tests__/matchers-test.js @@ -7,7 +7,6 @@ * * @emails oncall+jsinfra */ -/* eslint-disable max-len */ 'use strict'; diff --git a/packages/jest-matchers/src/__tests__/spyMatchers-test.js b/packages/jest-matchers/src/__tests__/spyMatchers-test.js index f0b548de1d6c..bc05b9847b98 100644 --- a/packages/jest-matchers/src/__tests__/spyMatchers-test.js +++ b/packages/jest-matchers/src/__tests__/spyMatchers-test.js @@ -7,7 +7,6 @@ * * @emails oncall+jsinfra */ -/* eslint-disable max-len */ 'use strict'; const jestExpect = require('../'); diff --git a/packages/jest-matchers/src/matchers.js b/packages/jest-matchers/src/matchers.js index 3d5306fa8343..8ac81245a237 100644 --- a/packages/jest-matchers/src/matchers.js +++ b/packages/jest-matchers/src/matchers.js @@ -7,7 +7,6 @@ * * @flow */ -/* eslint-disable max-len */ 'use strict'; diff --git a/packages/jest-matchers/src/toThrowMatchers.js b/packages/jest-matchers/src/toThrowMatchers.js index 38f92fa25ee8..5bdd1bfdbc4e 100644 --- a/packages/jest-matchers/src/toThrowMatchers.js +++ b/packages/jest-matchers/src/toThrowMatchers.js @@ -7,7 +7,6 @@ * * @flow */ -/* eslint-disable max-len */ 'use strict'; diff --git a/packages/jest-message-util/src/index.js b/packages/jest-message-util/src/index.js index 41e222df6ab9..2524075ab0d0 100644 --- a/packages/jest-message-util/src/index.js +++ b/packages/jest-message-util/src/index.js @@ -28,10 +28,8 @@ type StackTraceOptions = { }; // filter for noisy stack trace lines -/* eslint-disable max-len */ const JASMINE_IGNORE = /^\s+at(?:(?:.*?vendor\/|jasmine\-)|\s+jasmine\.buildExpectationResult)/; const STACK_TRACE_IGNORE = /^\s+at.*?jest(-.*?)?(\/|\\)(build|node_modules|packages)(\/|\\)/; -/* eslint-enable max-len */ const TITLE_INDENT = ' '; const MESSAGE_INDENT = ' '; const STACK_INDENT = ' '; diff --git a/packages/jest-runtime/src/__tests__/Runtime-environment-test.js b/packages/jest-runtime/src/__tests__/Runtime-environment-test.js index 59e9b7a6f7e7..0be8b2c7f0ad 100644 --- a/packages/jest-runtime/src/__tests__/Runtime-environment-test.js +++ b/packages/jest-runtime/src/__tests__/Runtime-environment-test.js @@ -41,7 +41,6 @@ describe('Runtime', () => { sum(); } catch (err) { hasThrown = true; - /* eslint-disable max-len */ if (process.platform === 'win32') { expect(err.stack).toMatch( /^Error: throwing fn\s+at sum.+\\__tests__\\test_root\\throwing-fn.js:12:9/, @@ -51,7 +50,6 @@ describe('Runtime', () => { /^Error: throwing fn\s+at sum.+\/__tests__\/test_root\/throwing-fn.js:12:9/, ); } - /* eslint-enable max-len */ } expect(hasThrown).toBe(true); })); diff --git a/packages/jest-validate/src/__tests__/fixtures/jestConfig.js b/packages/jest-validate/src/__tests__/fixtures/jestConfig.js index bd67c66652cf..beb0203038eb 100644 --- a/packages/jest-validate/src/__tests__/fixtures/jestConfig.js +++ b/packages/jest-validate/src/__tests__/fixtures/jestConfig.js @@ -128,7 +128,6 @@ const validConfig = { const format = (value: string) => require('pretty-format')(value, {min: true}); -/* eslint-disable max-len */ const deprecatedConfig = { preprocessorIgnorePatterns: (config: Object) => ` Option ${chalk.bold('preprocessorIgnorePatterns')} was replaced by ${chalk.bold('transformIgnorePatterns')}, which support multiple preprocessors. @@ -150,7 +149,6 @@ const deprecatedConfig = { Please update your configuration.`, }; -/* eslint-enable max-len */ module.exports = { defaultConfig, diff --git a/packages/jest-validate/src/warnings.js b/packages/jest-validate/src/warnings.js index d4fd6a8e08a5..8914eb19aaa4 100644 --- a/packages/jest-validate/src/warnings.js +++ b/packages/jest-validate/src/warnings.js @@ -30,12 +30,10 @@ const unknownOptionWarning = ( option, Object.keys(exampleConfig), ); - /* eslint-disable max-len */ const message = ` Unknown option ${chalk.bold(`"${option}"`)} with value ${chalk.bold(format(config[option]))} was found.` + (didYouMean && ` ${didYouMean}`) + `\n This is probably a typing mistake. Fixing it will remove this message.`; - /* eslint-enable max-len */ const comment = options.comment; const name = (options.title && options.title.warning) || WARNING; diff --git a/packages/pretty-format/src/__tests__/AsymmetricMatcher-test.js b/packages/pretty-format/src/__tests__/AsymmetricMatcher-test.js index c07c73b0933d..e27aa06f10e0 100644 --- a/packages/pretty-format/src/__tests__/AsymmetricMatcher-test.js +++ b/packages/pretty-format/src/__tests__/AsymmetricMatcher-test.js @@ -6,8 +6,6 @@ * of patent rights can be found in the PATENTS file in the same directory. */ -/* eslint-disable max-len */ - 'use strict'; const prettyFormat = require('../'); diff --git a/packages/pretty-format/src/__tests__/ConvertAnsi-test.js b/packages/pretty-format/src/__tests__/ConvertAnsi-test.js index 6c5a5a03f97b..805fe06803f6 100644 --- a/packages/pretty-format/src/__tests__/ConvertAnsi-test.js +++ b/packages/pretty-format/src/__tests__/ConvertAnsi-test.js @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ -/* eslint-disable max-len */ 'use strict'; diff --git a/packages/pretty-format/src/__tests__/Immutable-test.js b/packages/pretty-format/src/__tests__/Immutable-test.js index d6690de2cfad..6e30c7f16c3b 100644 --- a/packages/pretty-format/src/__tests__/Immutable-test.js +++ b/packages/pretty-format/src/__tests__/Immutable-test.js @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ -/* eslint-disable max-len */ 'use strict'; diff --git a/packages/pretty-format/src/__tests__/React-test.js b/packages/pretty-format/src/__tests__/React-test.js index 0e45abdcdf83..f80832fcafa3 100644 --- a/packages/pretty-format/src/__tests__/React-test.js +++ b/packages/pretty-format/src/__tests__/React-test.js @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ -/* eslint-disable max-len */ 'use strict'; diff --git a/packages/pretty-format/src/__tests__/pretty-format-test.js b/packages/pretty-format/src/__tests__/pretty-format-test.js index 132bd0937048..3f21bd970a17 100644 --- a/packages/pretty-format/src/__tests__/pretty-format-test.js +++ b/packages/pretty-format/src/__tests__/pretty-format-test.js @@ -5,7 +5,6 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ -/* eslint-disable max-len */ 'use strict'; diff --git a/packages/pretty-format/src/index.js b/packages/pretty-format/src/index.js index 68de55f1d0ad..2bf362b49f7a 100644 --- a/packages/pretty-format/src/index.js +++ b/packages/pretty-format/src/index.js @@ -7,7 +7,6 @@ * * @flow */ -/* eslint-disable max-len */ 'use strict'; diff --git a/website/core/Head.js b/website/core/Head.js index a7b30b169008..e7415deb0cca 100644 --- a/website/core/Head.js +++ b/website/core/Head.js @@ -2,7 +2,6 @@ * @providesModule Head * @jsx React.DOM */ - /* eslint-disable max-len */ const React = require('React'); diff --git a/website/core/JestHelp.js b/website/core/JestHelp.js index ecacda0bc1f5..5014858c01df 100644 --- a/website/core/JestHelp.js +++ b/website/core/JestHelp.js @@ -5,7 +5,7 @@ * @jsx React.DOM */ -/* eslint-disable sort-keys, max-len, no-multi-str */ +/* eslint-disable sort-keys, no-multi-str */ 'use strict'; diff --git a/website/core/JestIndex.js b/website/core/JestIndex.js index ab2a72d7ad2b..817716f71d01 100644 --- a/website/core/JestIndex.js +++ b/website/core/JestIndex.js @@ -5,7 +5,6 @@ * @jsx React.DOM */ -/* eslint-disable max-len */ const React = require('React'); const Site = require('Site'); diff --git a/website/core/Marked.js b/website/core/Marked.js index 42a16ee9457a..9339b7016d19 100644 --- a/website/core/Marked.js +++ b/website/core/Marked.js @@ -7,7 +7,7 @@ * @jsx React.DOM */ - /* eslint-disable max-len, sort-keys */ + /* eslint-disable sort-keys */ const React = require('React'); const Prism = require('Prism'); diff --git a/website/core/OpenSourceGlyph.js b/website/core/OpenSourceGlyph.js index 5106257aaa10..61b405f73b23 100644 --- a/website/core/OpenSourceGlyph.js +++ b/website/core/OpenSourceGlyph.js @@ -2,7 +2,6 @@ * @providesModule OpenSourceGlyph * @jsx React.DOM */ - /* eslint-disable max-len */ const React = require('React'); diff --git a/website/core/Site.js b/website/core/Site.js index 7639793134a8..89ef444dd412 100644 --- a/website/core/Site.js +++ b/website/core/Site.js @@ -3,8 +3,6 @@ * @jsx React.DOM */ -/* eslint-disable max-len */ - const React = require('React'); const HeaderNav = require('HeaderNav'); const Head = require('Head'); diff --git a/website/core/Thing.js b/website/core/Thing.js index 3b8e0b530b2c..15ea614fb705 100644 --- a/website/core/Thing.js +++ b/website/core/Thing.js @@ -4,8 +4,6 @@ * @jsx React.DOM */ -/* eslint-disable max-len */ - const React = require('React'); const Site = require('Site'); const Marked = require('Marked'); diff --git a/website/layout/BlogPageLayout.js b/website/layout/BlogPageLayout.js index eec085be1908..bfecd4e6bc53 100644 --- a/website/layout/BlogPageLayout.js +++ b/website/layout/BlogPageLayout.js @@ -5,8 +5,6 @@ * @jsx React.DOM */ -/* eslint-disable max-len */ - const BlogPost = require('BlogPost'); const BlogSidebar = require('BlogSidebar'); const Container = require('Container'); diff --git a/website/layout/BlogPostLayout.js b/website/layout/BlogPostLayout.js index 17f0e51821c0..7ad85fba8f34 100644 --- a/website/layout/BlogPostLayout.js +++ b/website/layout/BlogPostLayout.js @@ -4,7 +4,6 @@ * @providesModule BlogPostLayout * @jsx React.DOM */ -/* eslint-disable max-len */ const BlogPost = require('BlogPost'); const BlogSidebar = require('BlogSidebar'); diff --git a/website/layout/DocsLayout.js b/website/layout/DocsLayout.js index 17aeaa784602..021a5b0d7922 100644 --- a/website/layout/DocsLayout.js +++ b/website/layout/DocsLayout.js @@ -2,7 +2,6 @@ * @providesModule DocsLayout * @jsx React.DOM */ -/* eslint-disable max-len */ const React = require('React'); const Site = require('Site'); diff --git a/website/layout/PageLayout.js b/website/layout/PageLayout.js index b54248cf2a84..b4976b63a70e 100644 --- a/website/layout/PageLayout.js +++ b/website/layout/PageLayout.js @@ -2,7 +2,6 @@ * @providesModule PageLayout * @jsx React.DOM */ -/* eslint-disable max-len */ const React = require('React'); const Site = require('Site'); diff --git a/website/layout/RedirectLayout.js b/website/layout/RedirectLayout.js index 2f392b41937f..db7caeb2e245 100644 --- a/website/layout/RedirectLayout.js +++ b/website/layout/RedirectLayout.js @@ -2,7 +2,6 @@ * @providesModule RedirectLayout * @jsx React.DOM */ -/* eslint-disable max-len */ const React = require('React'); diff --git a/website/layout/ReferenceLayout.js b/website/layout/ReferenceLayout.js index cf5a8c2d5bd8..aa52e6b83543 100644 --- a/website/layout/ReferenceLayout.js +++ b/website/layout/ReferenceLayout.js @@ -2,7 +2,6 @@ * @providesModule ReferenceLayout * @jsx React.DOM */ -/* eslint-disable max-len */ const React = require('React'); const Site = require('Site'); diff --git a/website/server/server.js b/website/server/server.js index ce39ee3eef3e..7e38d8acac8d 100644 --- a/website/server/server.js +++ b/website/server/server.js @@ -1,4 +1,4 @@ -/* eslint-disable max-len, sort-keys */ +/* eslint-disable sort-keys */ 'use strict'; const http = require('http'); diff --git a/website/siteConfig.js b/website/siteConfig.js index 6a37f0a2bd73..cb0d59bd8b94 100644 --- a/website/siteConfig.js +++ b/website/siteConfig.js @@ -1,4 +1,4 @@ -/* eslint-disable sort-keys, max-len */ +/* eslint-disable sort-keys */ const React = require('React');