Skip to content

Commit a737c6e

Browse files
authored
Merge pull request #1201 from cpojer/master
Add commas to multiline function calls.
2 parents 76f544a + 9fd2665 commit a737c6e

File tree

71 files changed

+446
-431
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+446
-431
lines changed

.eslintrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
"array-bracket-spacing": [2, "never"],
1313
"arrow-spacing": [2],
1414
"babel/arrow-parens": [2, "as-needed"],
15+
"babel/flow-object-type": [2, "comma"],
16+
"babel/func-params-comma-dangle": [2, "always-multiline"],
1517
"brace-style": [2, "1tbs", {"allowSingleLine": true}],
1618
"comma-dangle": [2, "always-multiline"],
1719
"comma-spacing": [2],

examples/.eslintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"rules": {
3+
"babel/func-params-comma-dangle": 0
4+
}
5+
}

integration_tests/.eslintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"rules": {
3+
"babel/func-params-comma-dangle": 0
4+
}
5+
}

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"lerna": "2.0.0-beta.20",
3-
"version": "12.1.2",
3+
"version": "12.1.3",
44
"linkedFiles": {
55
"prefix": "/**\n * @flow\n */\n"
66
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"babel-plugin-transform-flow-strip-types": "^6.8.0",
88
"chalk": "^1.1.3",
99
"eslint": "^2.13.1",
10-
"eslint-plugin-babel": "^3.2.0",
10+
"eslint-plugin-babel": "^3.3.0",
1111
"fbjs-scripts": "^0.7.1",
1212
"flow-bin": "^0.27.0",
1313
"glob": "^7.0.4",

packages/babel-plugin-jest-hoist/src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ FUNCTIONS.mock = args => {
8181
const moduleFactory = args[1];
8282
invariant(
8383
moduleFactory.isFunction(),
84-
'The second argument of `jest.mock` must be a function.'
84+
'The second argument of `jest.mock` must be a function.',
8585
);
8686

8787
const ids = new Set();
@@ -108,7 +108,7 @@ FUNCTIONS.mock = args => {
108108
'reference any outside variables.\n' +
109109
'Invalid variable access: ' + name + '\n' +
110110
'Whitelisted objects: ' +
111-
Object.keys(WHITELISTED_IDENTIFIERS).join(', ') + '.'
111+
Object.keys(WHITELISTED_IDENTIFIERS).join(', ') + '.',
112112
);
113113
}
114114
}

packages/jest-changed-files/src/__tests__/hg-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe('hgChecker', () => {
3535
it('returns null for non hg repo folder', () =>
3636
hg.isHGRepository(tmpdir).then(res => {
3737
expect(res).toBeNull();
38-
})
38+
}),
3939
);
4040

4141
it('returns dirname for hg repo folder', () => {
@@ -56,7 +56,7 @@ describe('hgChecker', () => {
5656
it('returns an empty array for hg repo folder without modified files', () =>
5757
hg.findChangedFiles(tmpdir).then(res => {
5858
expect(res).toEqual([]);
59-
})
59+
}),
6060
);
6161

6262
it('returns an array of modified files for hg repo folder', () => {

packages/jest-changed-files/src/git.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function findChangedFiles(cwd: string): Promise<Array<Path>> {
3232
resolve([]);
3333
} else {
3434
resolve(stdout.split('\n').map(
35-
changedPath => path.resolve(cwd, changedPath)
35+
changedPath => path.resolve(cwd, changedPath),
3636
));
3737
}
3838
} else {

packages/jest-changed-files/src/hg.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function findChangedFiles(cwd: string, options: Options): Promise<Array<Path>> {
4242
resolve([]);
4343
} else {
4444
resolve(stdout.split('\n').map(
45-
changedPath => path.resolve(cwd, changedPath)
45+
changedPath => path.resolve(cwd, changedPath),
4646
));
4747
}
4848
} else {

packages/jest-cli/src/CoverageCollector.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ let _memoizedCoverageTemplate = null;
1818
function _getCoverageTemplate() {
1919
if (_memoizedCoverageTemplate === null) {
2020
_memoizedCoverageTemplate = require('lodash.template')(
21-
fs.readFileSync(COVERAGE_TEMPLATE_PATH, 'utf8')
21+
fs.readFileSync(COVERAGE_TEMPLATE_PATH, 'utf8'),
2222
);
2323
}
2424
return _memoizedCoverageTemplate;
@@ -67,7 +67,7 @@ class CoverageCollector {
6767
for (nodeIndex in instrumentationInfo.nodes) {
6868
if (!this._coverageDataStore.nodes.hasOwnProperty(nodeIndex)) {
6969
coverageInfo.uncoveredSpans.push(
70-
instrumentationInfo.nodes[nodeIndex].loc
70+
instrumentationInfo.nodes[nodeIndex].loc,
7171
);
7272
}
7373
}

0 commit comments

Comments
 (0)