Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 65a5936

Browse files
greenkeeper[bot]amsheehan
authored andcommitted
Update eslint to the latest version 🚀 (#855)
1 parent 5b10478 commit 65a5936

26 files changed

+632
-634
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"cz-conventional-changelog": "^2.0.0",
4646
"del-cli": "^1.0.0",
4747
"dom-events": "^0.1.1",
48-
"eslint": "^3.6.1",
48+
"eslint": "^4.1.0",
4949
"eslint-config-google": "^0.7.1",
5050
"eslint-plugin-mocha": "^4.8.0",
5151
"extract-text-webpack-plugin": "^2.1.2",

packages/mdc-base/component.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import MDCFoundation from './foundation';
2020
* @template F
2121
*/
2222
export default class MDCComponent {
23-
2423
/**
2524
* @param {!Element} root
2625
* @return {!MDCComponent}

packages/mdc-base/foundation.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
* @template A
1919
*/
2020
export default class MDCFoundation {
21-
2221
/** @return enum{cssClasses} */
2322
static get cssClasses() {
2423
// Classes extending MDCFoundation should implement this method to return an object which exports every

packages/mdc-base/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
export {default as MDCFoundation} from './foundation';
18-
export {default as MDCComponent} from './component';
17+
import MDCFoundation from './foundation';
18+
import MDCComponent from './component';
19+
20+
export {MDCFoundation, MDCComponent};

packages/mdc-checkbox/adapter.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
*/
3535

3636
export default class MDCCheckboxAdapter {
37-
3837
/** @param {string} className */
3938
addClass(className) {}
4039

@@ -60,7 +59,6 @@ export default class MDCCheckboxAdapter {
6059

6160
/** @return {boolean} */
6261
isAttachedToDOM() {}
63-
6462
}
6563

6664
/**

packages/mdc-checkbox/foundation.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export default class MDCCheckboxFoundation extends MDCFoundation {
164164

165165
CB_PROTO_PROPS.forEach((controlState) => {
166166
const desc = /** @type {!ObjectPropertyDescriptor} */ (
167-
Object.getOwnPropertyDescriptor(cbProto, controlState));
167+
Object.getOwnPropertyDescriptor(cbProto, controlState));
168168
if (validDescriptor(desc)) {
169169
Object.defineProperty(nativeCb, controlState, desc);
170170
}
@@ -246,15 +246,15 @@ export default class MDCCheckboxFoundation extends MDCFoundation {
246246
if (newState === TRANSITION_STATE_UNCHECKED) {
247247
return '';
248248
}
249-
// fallthrough
249+
// fallthrough
250250
case TRANSITION_STATE_UNCHECKED:
251251
return newState === TRANSITION_STATE_CHECKED ? ANIM_UNCHECKED_CHECKED : ANIM_UNCHECKED_INDETERMINATE;
252252
case TRANSITION_STATE_CHECKED:
253253
return newState === TRANSITION_STATE_UNCHECKED ? ANIM_CHECKED_UNCHECKED : ANIM_CHECKED_INDETERMINATE;
254-
// TRANSITION_STATE_INDETERMINATE
254+
// TRANSITION_STATE_INDETERMINATE
255255
default:
256256
return newState === TRANSITION_STATE_CHECKED ?
257-
ANIM_INDETERMINATE_CHECKED : ANIM_INDETERMINATE_UNCHECKED;
257+
ANIM_INDETERMINATE_CHECKED : ANIM_INDETERMINATE_UNCHECKED;
258258
}
259259
}
260260

packages/mdc-checkbox/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class MDCCheckbox extends MDCComponent {
4040
get nativeCb_() {
4141
const {NATIVE_CONTROL_SELECTOR} = MDCCheckboxFoundation.strings;
4242
const cbEl = /** @type {InputElementState|undefined} */ (
43-
this.root_.querySelector(NATIVE_CONTROL_SELECTOR));
43+
this.root_.querySelector(NATIVE_CONTROL_SELECTOR));
4444
return cbEl;
4545
}
4646

packages/mdc-drawer/persistent/index.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class MDCPersistentDrawer extends MDCComponent {
3838
}
3939
}
4040

41-
/* Return the drawer element inside the component. */
41+
// Return the drawer element inside the component.
4242
get drawer() {
4343
return this.root_.querySelector(MDCPersistentDrawerFoundation.strings.DRAWER_SELECTOR);
4444
}
@@ -52,22 +52,22 @@ export class MDCPersistentDrawer extends MDCComponent {
5252
hasClass: (className) => this.root_.classList.contains(className),
5353
hasNecessaryDom: () => Boolean(this.drawer),
5454
registerInteractionHandler: (evt, handler) =>
55-
this.root_.addEventListener(util.remapEvent(evt), handler, util.applyPassive()),
55+
this.root_.addEventListener(util.remapEvent(evt), handler, util.applyPassive()),
5656
deregisterInteractionHandler: (evt, handler) =>
57-
this.root_.removeEventListener(util.remapEvent(evt), handler, util.applyPassive()),
57+
this.root_.removeEventListener(util.remapEvent(evt), handler, util.applyPassive()),
5858
registerDrawerInteractionHandler: (evt, handler) =>
59-
this.drawer.addEventListener(util.remapEvent(evt), handler),
59+
this.drawer.addEventListener(util.remapEvent(evt), handler),
6060
deregisterDrawerInteractionHandler: (evt, handler) =>
61-
this.drawer.removeEventListener(util.remapEvent(evt), handler),
61+
this.drawer.removeEventListener(util.remapEvent(evt), handler),
6262
registerTransitionEndHandler: (handler) =>
63-
this.root_.addEventListener('transitionend', handler),
63+
this.root_.addEventListener('transitionend', handler),
6464
deregisterTransitionEndHandler: (handler) =>
65-
this.root_.removeEventListener('transitionend', handler),
65+
this.root_.removeEventListener('transitionend', handler),
6666
registerDocumentKeydownHandler: (handler) => document.addEventListener('keydown', handler),
6767
deregisterDocumentKeydownHandler: (handler) => document.removeEventListener('keydown', handler),
6868
getDrawerWidth: () => this.drawer.offsetWidth,
6969
setTranslateX: (value) => this.drawer.style.setProperty(
70-
util.getTransformPropertyName(), value === null ? null : `translateX(${value}px)`),
70+
util.getTransformPropertyName(), value === null ? null : `translateX(${value}px)`),
7171
getFocusableElements: () => this.drawer.querySelectorAll(FOCUSABLE_ELEMENTS),
7272
saveElementTabState: (el) => util.saveElementTabState(el),
7373
restoreElementTabState: (el) => util.restoreElementTabState(el),

packages/mdc-drawer/slidable/constants.js

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

1717
export const FOCUSABLE_ELEMENTS =
18-
'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), ' +
19-
'button:not([disabled]), iframe, object, embed, [tabindex], [contenteditable]';
18+
'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), ' +
19+
'button:not([disabled]), iframe, object, embed, [tabindex], [contenteditable]';

packages/mdc-drawer/slidable/foundation.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import {MDCFoundation} from '@material/base';
1818

1919
export class MDCSlidableDrawerFoundation extends MDCFoundation {
20-
2120
static get defaultAdapter() {
2221
return {
2322
addClass: (/* className: string */) => {},

packages/mdc-drawer/temporary/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,20 @@ export class MDCTemporaryDrawer extends MDCComponent {
5454
removeBodyClass: (className) => document.body.classList.remove(className),
5555
hasNecessaryDom: () => Boolean(this.drawer),
5656
registerInteractionHandler: (evt, handler) =>
57-
this.root_.addEventListener(util.remapEvent(evt), handler, util.applyPassive()),
57+
this.root_.addEventListener(util.remapEvent(evt), handler, util.applyPassive()),
5858
deregisterInteractionHandler: (evt, handler) =>
59-
this.root_.removeEventListener(util.remapEvent(evt), handler, util.applyPassive()),
59+
this.root_.removeEventListener(util.remapEvent(evt), handler, util.applyPassive()),
6060
registerDrawerInteractionHandler: (evt, handler) =>
61-
this.drawer.addEventListener(util.remapEvent(evt), handler),
61+
this.drawer.addEventListener(util.remapEvent(evt), handler),
6262
deregisterDrawerInteractionHandler: (evt, handler) =>
63-
this.drawer.removeEventListener(util.remapEvent(evt), handler),
63+
this.drawer.removeEventListener(util.remapEvent(evt), handler),
6464
registerTransitionEndHandler: (handler) => this.drawer.addEventListener('transitionend', handler),
6565
deregisterTransitionEndHandler: (handler) => this.drawer.removeEventListener('transitionend', handler),
6666
registerDocumentKeydownHandler: (handler) => document.addEventListener('keydown', handler),
6767
deregisterDocumentKeydownHandler: (handler) => document.removeEventListener('keydown', handler),
6868
getDrawerWidth: () => this.drawer.offsetWidth,
6969
setTranslateX: (value) => this.drawer.style.setProperty(
70-
util.getTransformPropertyName(), value === null ? null : `translateX(${value}px)`),
70+
util.getTransformPropertyName(), value === null ? null : `translateX(${value}px)`),
7171
updateCssVariable: (value) => {
7272
if (util.supportsCssCustomProperties()) {
7373
this.root_.style.setProperty(OPACITY_VAR_NAME, value);

packages/mdc-menu/simple/foundation.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export default class MDCSimpleMenuFoundation extends MDCFoundation {
192192
animationLoop_() {
193193
const time = this.adapter_.getAccurateTime();
194194
const {TRANSITION_DURATION_MS, TRANSITION_X1, TRANSITION_Y1, TRANSITION_X2, TRANSITION_Y2,
195-
TRANSITION_SCALE_ADJUSTMENT_X, TRANSITION_SCALE_ADJUSTMENT_Y} = MDCSimpleMenuFoundation.numbers;
195+
TRANSITION_SCALE_ADJUSTMENT_X, TRANSITION_SCALE_ADJUSTMENT_Y} = MDCSimpleMenuFoundation.numbers;
196196
const currentTime = clamp((time - this.startTime_) / TRANSITION_DURATION_MS);
197197

198198
// Animate X axis very slowly, so that only the Y axis animation is visible during fade-out.
@@ -477,5 +477,3 @@ export default class MDCSimpleMenuFoundation extends MDCFoundation {
477477
return this.isOpen_;
478478
}
479479
}
480-
481-

packages/mdc-ripple/adapter.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
* @record
3939
*/
4040
export default class MDCRippleAdapter {
41-
4241
/** @return {boolean} */
4342
browserSupportsCssVars() {}
4443

@@ -90,5 +89,4 @@ export default class MDCRippleAdapter {
9089

9190
/** @return {{x: number, y: number}} */
9291
getWindowPageOffset() {}
93-
9492
}

packages/mdc-ripple/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ export class MDCRipple extends MDCComponent {
6666
addClass: (className) => instance.root_.classList.add(className),
6767
removeClass: (className) => instance.root_.classList.remove(className),
6868
registerInteractionHandler: (evtType, handler) =>
69-
instance.root_.addEventListener(evtType, handler, util.applyPassive()),
69+
instance.root_.addEventListener(evtType, handler, util.applyPassive()),
7070
deregisterInteractionHandler: (evtType, handler) =>
71-
instance.root_.removeEventListener(evtType, handler, util.applyPassive()),
71+
instance.root_.removeEventListener(evtType, handler, util.applyPassive()),
7272
registerResizeHandler: (handler) => window.addEventListener('resize', handler),
7373
deregisterResizeHandler: (handler) => window.removeEventListener('resize', handler),
7474
updateCssVariable: (varName, value) => instance.root_.style.setProperty(varName, value),

packages/mdc-tabs/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
export {MDCTabFoundation, MDCTab} from './tab';
18-
export {MDCTabBarFoundation, MDCTabBar} from './tab-bar';
19-
export {MDCTabBarScrollerFoundation, MDCTabBarScroller} from './tab-bar-scroller';
17+
export {MDCTabFoundation, MDCTab} from './tab';
18+
export {MDCTabBarFoundation, MDCTabBar} from './tab-bar';
19+
export {MDCTabBarScrollerFoundation, MDCTabBarScroller} from './tab-bar-scroller';

packages/mdc-toolbar/foundation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export default class MDCToolbarFoundation extends MDCFoundation {
6161
this.calculations_ = {
6262
toolbarRowHeight: 0,
6363
// Calculated Height ratio. We use ratio to calculate corresponding heights in resize event.
64-
toolbarRatio: 0, // The ratio of toolbar height to row height
64+
toolbarRatio: 0, // The ratio of toolbar height to row height
6565
flexibleExpansionRatio: 0, // The ratio of flexible space height to row height
6666
maxTranslateYRatio: 0, // The ratio of max toolbar move up distance to row height
6767
scrollThresholdRatio: 0, // The ratio of max scrollTop that we should listen to to row height

scripts/rewrite-decl-statements-for-closure-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function rewriteDeclarationSource(node, srcFile, rootDir) {
121121
const pathParts = source.split('/');
122122
const isMDCImport = pathParts[0] === '@material';
123123
if (isMDCImport) {
124-
const modName = pathParts[1]; // @material/<modName>
124+
const modName = pathParts[1]; // @material/<modName>
125125
const atMaterialReplacementPath = `${rootDir}/mdc-${modName}`;
126126
const rewrittenSource = [atMaterialReplacementPath].concat(pathParts.slice(2)).join('/');
127127
source = rewrittenSource;

scripts/rewrite-sass-import-statements-for-closure.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function rewriteImportDeclaration(importSource, srcFile, rootDir) {
7373
const pathParts = importSource.split('/');
7474
const isMDCImport = pathParts[0] === '@material';
7575
if (isMDCImport) {
76-
const modName = pathParts[1]; // @material/<modName>
76+
const modName = pathParts[1]; // @material/<modName>
7777
const atMaterialReplacementPath = `${rootDir}/${modName}`;
7878
const rewrittenImportSource = [atMaterialReplacementPath].concat(pathParts.slice(2)).join('/');
7979
importSource = rewrittenImportSource;

test/unit/mdc-drawer/slidable.foundation.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ function setupTest(isRootTransitioningEventTarget) {
2525
const mockAdapter = td.object(MDCSlidableDrawerFoundation.defaultAdapter);
2626

2727
class MDCFakeSlideableDrawerFoundation extends MDCSlidableDrawerFoundation {
28-
2928
isRootTransitioningEventTarget_() {
3029
return isRootTransitioningEventTarget;
3130
}

0 commit comments

Comments
 (0)