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

Remove redundant eslint max-len overrides #3548

Merged
merged 1 commit into from
May 11, 2017
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 integration_tests/__tests__/stack_trace-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @flow
*/

/* eslint-disable sort-keys, max-len */
/* eslint-disable sort-keys */

'use strict';

Expand Down
2 changes: 0 additions & 2 deletions packages/jest-cli/src/lib/__tests__/isValidPath-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

'use strict';

/* eslint-disable max-len */

const path = require('path');
const isValidPath = require('../isValidPath');

Expand Down
1 change: 0 additions & 1 deletion packages/jest-cli/src/lib/getTestPathPattern.js
Original file line number Diff line number Diff line change
Expand Up @@ -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. ` +
Expand Down
2 changes: 0 additions & 2 deletions packages/jest-config/src/normalize.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 = {
Expand Down
4 changes: 0 additions & 4 deletions packages/jest-config/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) =>
Expand Down
1 change: 0 additions & 1 deletion packages/jest-docblock/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 0 additions & 2 deletions packages/jest-haste-map/src/lib/extractRequires.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<string> {
const dependencies = new Set();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*
* @emails oncall+jsinfra
*/
/* eslint-disable max-len */

'use strict';

Expand Down
1 change: 0 additions & 1 deletion packages/jest-matchers/src/__tests__/matchers-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*
* @emails oncall+jsinfra
*/
/* eslint-disable max-len */

'use strict';

Expand Down
1 change: 0 additions & 1 deletion packages/jest-matchers/src/__tests__/spyMatchers-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*
* @emails oncall+jsinfra
*/
/* eslint-disable max-len */
'use strict';

const jestExpect = require('../');
Expand Down
1 change: 0 additions & 1 deletion packages/jest-matchers/src/matchers.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*
* @flow
*/
/* eslint-disable max-len */

'use strict';

Expand Down
1 change: 0 additions & 1 deletion packages/jest-matchers/src/toThrowMatchers.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*
* @flow
*/
/* eslint-disable max-len */

'use strict';

Expand Down
2 changes: 0 additions & 2 deletions packages/jest-message-util/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ' ';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/,
Expand All @@ -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);
}));
Expand Down
2 changes: 0 additions & 2 deletions packages/jest-validate/src/__tests__/fixtures/jestConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -150,7 +149,6 @@ const deprecatedConfig = {

Please update your configuration.`,
};
/* eslint-enable max-len */

module.exports = {
defaultConfig,
Expand Down
2 changes: 0 additions & 2 deletions packages/jest-validate/src/warnings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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('../');
Expand Down
1 change: 0 additions & 1 deletion packages/pretty-format/src/__tests__/ConvertAnsi-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
1 change: 0 additions & 1 deletion packages/pretty-format/src/__tests__/Immutable-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
1 change: 0 additions & 1 deletion packages/pretty-format/src/__tests__/React-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
1 change: 0 additions & 1 deletion packages/pretty-format/src/__tests__/pretty-format-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
1 change: 0 additions & 1 deletion packages/pretty-format/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*
* @flow
*/
/* eslint-disable max-len */

'use strict';

Expand Down
1 change: 0 additions & 1 deletion website/core/Head.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* @providesModule Head
* @jsx React.DOM
*/
/* eslint-disable max-len */

const React = require('React');

Expand Down
2 changes: 1 addition & 1 deletion website/core/JestHelp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
1 change: 0 additions & 1 deletion website/core/JestIndex.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* @jsx React.DOM
*/

/* eslint-disable max-len */

const React = require('React');
const Site = require('Site');
Expand Down
2 changes: 1 addition & 1 deletion website/core/Marked.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
1 change: 0 additions & 1 deletion website/core/OpenSourceGlyph.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* @providesModule OpenSourceGlyph
* @jsx React.DOM
*/
/* eslint-disable max-len */

const React = require('React');

Expand Down
2 changes: 0 additions & 2 deletions website/core/Site.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
* @jsx React.DOM
*/

/* eslint-disable max-len */

const React = require('React');
const HeaderNav = require('HeaderNav');
const Head = require('Head');
Expand Down
2 changes: 0 additions & 2 deletions website/core/Thing.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* @jsx React.DOM
*/

/* eslint-disable max-len */

const React = require('React');
const Site = require('Site');
const Marked = require('Marked');
Expand Down
2 changes: 0 additions & 2 deletions website/layout/BlogPageLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* @jsx React.DOM
*/

/* eslint-disable max-len */

const BlogPost = require('BlogPost');
const BlogSidebar = require('BlogSidebar');
const Container = require('Container');
Expand Down
1 change: 0 additions & 1 deletion website/layout/BlogPostLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* @providesModule BlogPostLayout
* @jsx React.DOM
*/
/* eslint-disable max-len */

const BlogPost = require('BlogPost');
const BlogSidebar = require('BlogSidebar');
Expand Down
1 change: 0 additions & 1 deletion website/layout/DocsLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* @providesModule DocsLayout
* @jsx React.DOM
*/
/* eslint-disable max-len */

const React = require('React');
const Site = require('Site');
Expand Down
1 change: 0 additions & 1 deletion website/layout/PageLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* @providesModule PageLayout
* @jsx React.DOM
*/
/* eslint-disable max-len */

const React = require('React');
const Site = require('Site');
Expand Down
1 change: 0 additions & 1 deletion website/layout/RedirectLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* @providesModule RedirectLayout
* @jsx React.DOM
*/
/* eslint-disable max-len */

const React = require('React');

Expand Down
1 change: 0 additions & 1 deletion website/layout/ReferenceLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* @providesModule ReferenceLayout
* @jsx React.DOM
*/
/* eslint-disable max-len */

const React = require('React');
const Site = require('Site');
Expand Down
2 changes: 1 addition & 1 deletion website/server/server.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable max-len, sort-keys */
/* eslint-disable sort-keys */

'use strict';
const http = require('http');
Expand Down
2 changes: 1 addition & 1 deletion website/siteConfig.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable sort-keys, max-len */
/* eslint-disable sort-keys */

const React = require('React');

Expand Down