Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit ecf1705

Browse files
Splaktarandrewseguin
authored andcommitted
style(eslint): enable keyword-spacing rule (#11586)
1 parent aa172b7 commit ecf1705

File tree

24 files changed

+35
-35
lines changed

24 files changed

+35
-35
lines changed

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"init-declarations": "off",
5757
"jsx-quotes": "error",
5858
"key-spacing": "off",
59-
"keyword-spacing": "off",
59+
"keyword-spacing": ["error", {"before": true, "after": true}],
6060
"line-comment-position": "off",
6161
"linebreak-style": "off",
6262
"lines-around-comment": "off",

docs/app/js/app.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ function(SERVICES, COMPONENTS, DEMOS, PAGES, $location, $rootScope, $http, $wind
469469
if (section.children) {
470470
// matches nested section toggles, such as API or Customization
471471
section.children.forEach(function(childSection){
472-
if(childSection.pages){
472+
if (childSection.pages){
473473
childSection.pages.forEach(function(page){
474474
matchPage(childSection, page);
475475
});
@@ -575,7 +575,7 @@ function(SERVICES, COMPONENTS, DEMOS, PAGES, $location, $rootScope, $http, $wind
575575
});
576576

577577
var parentNode = $element[0].parentNode.parentNode.parentNode;
578-
if(parentNode.classList.contains('parent-list-item')) {
578+
if (parentNode.classList.contains('parent-list-item')) {
579579
var heading = parentNode.querySelector('h2');
580580
$element[0].firstChild.setAttribute('aria-describedby', heading.id);
581581
}
@@ -689,12 +689,12 @@ function($scope, COMPONENTS, BUILDCONFIG, $mdSidenav, $timeout, $mdDialog, menu,
689689
function isSectionSelected(section) {
690690
var selected = false;
691691
var openedSection = menu.openedSection;
692-
if(openedSection === section){
692+
if (openedSection === section){
693693
selected = true;
694694
}
695-
else if(section.children) {
695+
else if (section.children) {
696696
section.children.forEach(function(childSection) {
697-
if(childSection === openedSection){
697+
if (childSection === openedSection){
698698
selected = true;
699699
}
700700
});

docs/app/js/codepen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
function appendLicenseFor(content, lang) {
125125
var commentStart = '', commentEnd = '';
126126

127-
switch(lang) {
127+
switch (lang) {
128128
case 'html' : commentStart = '<!--'; commentEnd = '-->'; break;
129129
case 'js' : commentStart = '/**'; commentEnd = '**/'; break;
130130
case 'css' : commentStart = '/*'; commentEnd = '*/'; break;

docs/app/js/demo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ angular.module('docsApp')
6565
};
6666

6767
function convertName(name) {
68-
switch(name) {
68+
switch (name) {
6969
case "index.html" : return "HTML";
7070
case "script.js" : return "JS";
7171
case "style.css" : return "CSS";

scripts/gulp-utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ exports.hoistScssVariables = function() {
267267
let closeCount = 0;
268268
let openBlock = false;
269269

270-
for(let currentLine = 0; currentLine < contents.length; ++currentLine) {
270+
for (let currentLine = 0; currentLine < contents.length; ++currentLine) {
271271
const line = contents[currentLine];
272272

273273
if (openBlock || /^\s*\$/.test(line) && !/^\s+/.test(line)) {

src/components/datepicker/js/datepickerDirective.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179

180180
if (!mdInputContainer.label) {
181181
$mdAria.expect(element, 'aria-label', attr.mdPlaceholder);
182-
} else if(!mdNoAsterisk) {
182+
} else if (!mdNoAsterisk) {
183183
attr.$observe('required', function(value) {
184184
mdInputContainer.label.toggleClass('md-required', !!value);
185185
});

src/components/gridList/demoDynamicTiles/script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ angular
1919
it.title = it.title + (j+1);
2020
it.span = { row : 1, col : 1 };
2121

22-
switch(j+1) {
22+
switch (j+1) {
2323
case 1:
2424
it.background = "red";
2525
it.span.row = it.span.col = 2;

src/components/gridList/grid-list.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ function GridListDirective($interpolate, $mdConstant, $mdGridLayout, $mdMedia) {
332332
function getGridStyle(colCount, rowCount, gutter, rowMode, rowHeight) {
333333
var style = {};
334334

335-
switch(rowMode) {
335+
switch (rowMode) {
336336
case 'fixed':
337337
style.height = DIMENSION({ unit: rowHeight, span: rowCount, gutter: gutter });
338338
style.paddingBottom = '';

src/components/icon/icon.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ describe('MdIcon directive', function() {
207207

208208
return {
209209
then: function(fn) {
210-
switch(id) {
210+
switch (id) {
211211
case 'android' : fn('<svg><g id="android"></g></svg>');
212212
break;
213213
case 'cake' : fn('<svg><g id="cake"></g></svg>');

src/components/input/input.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ function mdSelectOnFocusDirective($document, $timeout) {
868868
// The debounce is here for Edge's sake, otherwise the selection doesn't work.
869869
// Since focus may already have been lost on the input (and because `select()`
870870
// will re-focus), make sure the element is still active before applying.
871-
if($document[0].activeElement === element[0]) {
871+
if ($document[0].activeElement === element[0]) {
872872
element[0].select();
873873
}
874874

0 commit comments

Comments
 (0)