Skip to content

Commit 0e7a581

Browse files
[added] yarn run ci
Summary: I checked out a fresh copy of the repo to ensure that it could pass CI. Here are the changes I made: - Moved the CI scripts from .travis.yml to package.json for consistency. It's nice to be able to type `yarn run ci` to run the same suite as Travis. - Ran `build` before `test`, to ensure any intra-repo dependencies are available in the dist folder for their siblings, as prescribed in package.json. If we had something like typescript:main, we could skip this step (microsoft/TypeScript#12561). - Fixed all the errors the linter complained about. Since a few packages were written before the linter existed, there were conflicts between their style and its. Reviewers: O3 Material JavaScript platform reviewers, #material_motion, O2 Material Motion, markwei Reviewed By: #material_motion, O2 Material Motion, markwei Tags: #material_motion Differential Revision: http://codereview.cc/D2395
1 parent 6374f33 commit 0e7a581

File tree

14 files changed

+22
-36
lines changed

14 files changed

+22
-36
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ addons:
1919
before_script:
2020
- yarn run bootstrap
2121
script:
22-
- yarn run test -- --single-run
23-
- yarn run build
22+
- yarn run ci
2423
group: stable
2524
os: linux

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"bootstrap": "yarn; $( yarn bin )/lerna bootstrap",
77
"build": "$( yarn bin )/lerna run build",
88
"lint": "$( yarn bin)/lerna run lint",
9-
"test": "$( yarn bin )/karma start"
9+
"test": "$( yarn bin )/karma start",
10+
"ci": "yarn run lint; yarn run build; yarn run test -- --single-run"
1011
},
1112
"devDependencies": {
1213
"@types/chai": "^3.4.34",

packages/demos-react/src/map-scroll-to-css/MapScrollPositionToCSSValuePerformer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
*/
1616

1717
import {
18-
Plan,
1918
Performing,
20-
PerformingArgs,
2119
PerformingAddPlanArgs,
20+
PerformingArgs,
21+
Plan,
2222
} from 'material-motion-runtime';
2323

2424
import MapScrollPositionToCSSValuePlan from './MapScrollPositionToCSSValuePlan';
@@ -37,7 +37,7 @@ export default class MapScrollPositionToCSSValuePerformer implements Performing
3737

3838
if (!willChange.includes('transform')) {
3939
if (willChange) {
40-
willChange += ', '
40+
willChange += ', ';
4141
}
4242

4343
willChange += 'transform';

packages/demos-react/src/map-scroll-to-css/components/ParallaxClouds.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export default class ParallaxClouds extends React.Component {
3434
makeRefForLayer(i) {
3535
return (element) => {
3636
this._layers[i] = element;
37-
}
37+
};
3838
}
3939

4040
// We have no props and no state, so no need to re-render

packages/demos-react/src/map-scroll-to-css/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717

18-
export function range({ start = 0, end = 1 }:{ start?: number, end?: number } = {}):Array<number> {
18+
export function range({ start = 0, end = 1 }:{ start?: number, end?: number } = {}):number[] {
1919
const length = end - start;
2020
return Array(length + 1).fill().map((_, i) => start + i);
2121
}

packages/demos-react/src/mount.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ ReactDOM.render(
2525
);
2626

2727
if (module.hot) {
28-
module.hot.accept()
28+
module.hot.accept();
2929
}

packages/demos-react/src/routes.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616

1717
import * as React from 'react';
1818

19-
import Link from 'react-router/Link'
20-
import Match from 'react-router/Match'
21-
import Miss from 'react-router/Miss'
22-
import Router from 'react-router/BrowserRouter'
19+
import Link from 'react-router/Link';
20+
import Match from 'react-router/Match';
21+
import Miss from 'react-router/Miss';
22+
import Router from 'react-router/BrowserRouter';
2323

2424
import ParallaxClouds from './map-scroll-to-css/components/ParallaxClouds';
2525

@@ -31,7 +31,7 @@ const links = [
3131
name: 'MapScrollPositionToCSSValue',
3232
component: ParallaxClouds,
3333
}
34-
]
34+
];
3535

3636
function Links() {
3737
return (

packages/runtime/src/Runtime.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export default class Runtime {
6565
}
6666

6767
const isActiveTokenGenerator = this._isActiveTokenGenerator;
68-
const PerformerType: PerformingConstructor = plan._PerformerType;
68+
const PerformerType: PerformingConstructor = plan._PerformerType; // tslint:disable-line
6969

7070
const performerMapKey = this._performerMapSelector({ PerformerType, target });
7171
let performer: Performing;
@@ -85,7 +85,7 @@ export default class Runtime {
8585
// them, it should ensure we get type errors if a feature isn't threaded
8686
// through correctly.
8787

88-
const PerformerOfAllFeatures = PerformerType as PerformingWithAllFeaturesConstructor;
88+
const PerformerOfAllFeatures = PerformerType as PerformingWithAllFeaturesConstructor; // tslint:disable-line
8989
performer = new PerformerOfAllFeatures({ target, isActiveTokenGenerator });
9090

9191
this._performerMap.set(performerMapKey, performer);

packages/runtime/src/TokenGenerator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export default class TokenGenerator {
5555
this._updateTokenCount(-1);
5656
}
5757
}
58-
}
58+
};
5959
}
6060

6161
_updateTokenCount(delta: number): void {

packages/runtime/src/internal/makeCompoundKeySelector.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
export type Dict = {
1818
[index:string]: any,
19-
}
19+
};
2020

2121
/**
2222
* A compound key selector searches the object it receives for the values at
@@ -34,8 +34,9 @@ export default function makeCompoundKeySelector(key1:string, key2:string):(dict:
3434
const value1 = dict[key1];
3535
const value2 = dict[key2];
3636

37-
if (!keyMap.has(value1))
37+
if (!keyMap.has(value1)) {
3838
keyMap.set(value1, new Map());
39+
}
3940

4041
const value1Map = keyMap.get(value1);
4142

packages/streams-dom/src/createMotionElementFromDOMNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ export default function createMotionElementFromDOMNode(domNode: Element): Motion
3737
);
3838
},
3939

40-
}
40+
};
4141
}

packages/streams-dom/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* under the License.
1515
*/
1616

17-
export * from './types';
1817
export * from './createMotionElementFromDOMNode';
1918
export { default as createMotionElementFromDOMNode } from './createMotionElementFromDOMNode';
2019

packages/streams-dom/src/types.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

tslint.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"ordered-imports": [
2828
true,
2929
{
30+
"import-sources-order": "any",
3031
"named-imports-order": "lowercase-last"
3132
}
3233
],

0 commit comments

Comments
 (0)