Skip to content

Commit

Permalink
chore: re-activate prettier eslint rule
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Dec 27, 2018
1 parent f13b97b commit fe19d69
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ module.exports = {
'import/order': 0,
'no-console': 0,
'no-unused-vars': 2,
'prettier/prettier': 2,
},
settings: {
'import/resolver': {
Expand Down
4 changes: 1 addition & 3 deletions packages/jest-config/src/__tests__/normalize.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ import normalize from '../normalize';
import resolve from 'jest-resolve';
import {DEFAULT_JS_PATTERN} from '../constants';

jest
.mock('jest-resolve')
.mock('path', () => jest.requireActual('path').posix);
jest.mock('jest-resolve').mock('path', () => jest.requireActual('path').posix);
const DEFAULT_CSS_PATTERN = '^.+\\.(css)$';

let root;
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-haste-map/src/crawlers/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,4 @@ export default function nodeCrawl(
findNative(roots, extensions, ignore, callback);
}
});
};
}
2 changes: 1 addition & 1 deletion packages/jest-haste-map/src/crawlers/watchman.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,4 +217,4 @@ export default async function watchmanCrawl(

data.files = files;
return data;
};
}
2 changes: 1 addition & 1 deletion packages/jest-phabricator/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ export default function(results: AggregatedResult): PhabricatorReport {
return Object.assign({}, results, {
coverageMap: results.coverageMap && summarize(results.coverageMap),
});
};
}
2 changes: 1 addition & 1 deletion packages/jest-repl/src/cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ export default function() {
argv._ = [REPL_SCRIPT];

Runtime.runCLI(argv, [`Jest REPL v${VERSION}`]);
};
}
2 changes: 1 addition & 1 deletion packages/pretty-format/src/__tests__/Immutable.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import React from 'react';
import Immutable from 'immutable';
import prettyFormat from '..'
import prettyFormat from '..';
import getPrettyPrint from './getPrettyPrint';

const {Immutable: ImmutablePlugin, ReactElement} = prettyFormat.plugins;
Expand Down
5 changes: 4 additions & 1 deletion packages/pretty-format/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,10 @@ function createIndent(indent: number): string {
return new Array(indent + 1).join(' ');
}

export default function prettyFormat(val: any, options?: OptionsReceived): string {
export default function prettyFormat(
val: any,
options?: OptionsReceived,
): string {
if (options) {
validateOptions(options);
if (options.plugins) {
Expand Down

0 comments on commit fe19d69

Please sign in to comment.