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

Commit fca9d1d

Browse files
Splaktarandrewseguin
authored andcommitted
style(eslint): enable space-in-parens rule (#11589)
1 parent 9c079aa commit fca9d1d

File tree

62 files changed

+328
-328
lines changed

Some content is hidden

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

62 files changed

+328
-328
lines changed

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@
222222
"sort-vars": "off",
223223
"space-before-blocks": "off",
224224
"space-before-function-paren": "off",
225-
"space-in-parens": "off",
225+
"space-in-parens": ["error", "never"],
226226
"space-infix-ops": "off",
227227
"space-unary-ops": "off",
228228
"spaced-comment": "off",

config/ngModuleData.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ function buildScanner(pattern) {
4242
}
4343

4444
module.exports = {
45-
material : buildScanner( MATERIAL_ONLY ),
46-
any : buildScanner( ANY )
45+
material : buildScanner(MATERIAL_ONLY),
46+
any : buildScanner(ANY)
4747
};

docs/app/js/app.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -333,11 +333,11 @@ function(SERVICES, COMPONENTS, DEMOS, PAGES, $location, $rootScope, $http, $wind
333333
}]
334334
});
335335

336-
sections.push( {
336+
sections.push({
337337
name: 'Contributors',
338338
url: 'contributors',
339339
type: 'link'
340-
} );
340+
});
341341

342342
sections.push({
343343
name: 'License',
@@ -660,7 +660,7 @@ function($scope, COMPONENTS, BUILDCONFIG, $mdSidenav, $timeout, $mdDialog, menu,
660660

661661
function goHome($event) {
662662
menu.selectPage(null, null);
663-
$location.path( '/' );
663+
$location.path('/');
664664
}
665665

666666
function openPage() {
@@ -723,7 +723,7 @@ function($scope, $rootScope) {
723723
'$rootScope', '$http',
724724
function($rootScope, $http) {
725725
$rootScope.currentComponent = $rootScope.currentDoc = null;
726-
if ( !$rootScope.contributors ) {
726+
if (!$rootScope.contributors) {
727727
$http
728728
.get('./contributors.json')
729729
.then(function(response) {

docs/app/js/codepen.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
head: LINK_FONTS_ROBOTO,
8787

8888
js: processJs(files.js),
89-
css: mergeFiles( files.css ).join(' '),
89+
css: mergeFiles(files.css).join(' '),
9090

9191
js_external: externalScripts.concat([ASSET_CACHE_JS, CORE_JS]).join(';'),
9292
css_external: [CORE_CSS, DOC_CSS].join(';')

docs/config/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module.exports = new Package('angular-md', [
4848
docTypes: ['content'],
4949
getPath: function(doc) {
5050
let docPath = path.dirname(doc.fileInfo.relativePath);
51-
if ( doc.fileInfo.baseName !== 'index' ) {
51+
if (doc.fileInfo.baseName !== 'index') {
5252
docPath = path.join(docPath, doc.fileInfo.baseName);
5353
}
5454
return docPath;

docs/config/processors/buildConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports = function buildConfigProcessor() {
1818
});
1919

2020
return q.all([ getSHA(), getCommitDate() ])
21-
.then( function(){
21+
.then(function(){
2222
return docs;
2323
});
2424
}

gulp/tasks/build-scss.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ exports.task = function() {
4444
);
4545

4646
streams.push(
47-
gulp.src( config.cssIEPaths.slice() ) // append raw CSS for IE Fixes
48-
.pipe( concat('angular-material.layouts.ie_fixes.css') )
49-
.pipe( gulp.dest(layoutDest) )
47+
gulp.src(config.cssIEPaths.slice()) // append raw CSS for IE Fixes
48+
.pipe(concat('angular-material.layouts.ie_fixes.css'))
49+
.pipe(gulp.dest(layoutDest))
5050
);
5151

5252
// Generate standalone SCSS (and CSS) file for Layouts API
@@ -101,7 +101,7 @@ exports.task = function() {
101101

102102
function getPaths () {
103103
const paths = config.scssBaseFiles.slice();
104-
if ( modules ) {
104+
if (modules) {
105105
paths.push.apply(paths, modules.split(',').map(function (module) {
106106
return 'src/components/' + module + '/*.scss';
107107
}));

gulp/tasks/karma-fast.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ const args = util.args;
1717
exports.task = function (done) {
1818
let errorCount = 0;
1919

20-
if ( args.browsers ) {
20+
if (args.browsers) {
2121
karmaConfig.browsers = args.browsers.trim().split(',');
2222
}
2323
// NOTE: `karma-fast` does NOT test Firefox by default.
2424

25-
if ( args.reporters ) {
25+
if (args.reporters) {
2626
karmaConfig.reporters = args.reporters.trim().split(',');
2727
}
2828

gulp/tasks/karma.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ const karmaConfig = {
1313
exports.dependencies = ['build'];
1414

1515
exports.task = function (done) {
16-
if ( args.browsers ) karmaConfig.browsers = args.browsers.trim().split(',');
17-
if ( args.reporters ) karmaConfig.reporters = args.reporters.trim().split(',');
18-
if ( args.config ) karmaConfig.configFile = ROOT + '/' + args.config.trim();
16+
if (args.browsers) karmaConfig.browsers = args.browsers.trim().split(',');
17+
if (args.reporters) karmaConfig.reporters = args.reporters.trim().split(',');
18+
if (args.config) karmaConfig.configFile = ROOT + '/' + args.config.trim();
1919

2020
gutil.log(gutil.colors.blue('Running unit tests on unminified source.'));
2121

gulp/util.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ function buildJs () {
4545

4646
gutil.log("building js files...");
4747

48-
const jsBuildStream = gulp.src( jsFiles )
48+
const jsBuildStream = gulp.src(jsFiles)
4949
.pipe(filterNonCodeFiles())
5050
.pipe(utils.buildNgMaterialDefinition())
5151
.pipe(plumber())
5252
.pipe(ngAnnotate())
5353
.pipe(utils.addJsWrapper(true));
5454

55-
const jsProcess = series(jsBuildStream, themeBuildStream() )
55+
const jsProcess = series(jsBuildStream, themeBuildStream())
5656
.pipe(concat('angular-material.js'))
5757
.pipe(BUILD_MODE.transform())
5858
.pipe(insert.prepend(config.banner))
@@ -88,7 +88,7 @@ function minifyCss(extraOptions) {
8888
*/
8989
function buildModule(module, opts) {
9090
opts = opts || {};
91-
if ( module.indexOf(".") < 0) {
91+
if (module.indexOf(".") < 0) {
9292
module = "material.components." + module;
9393
}
9494
gutil.log('Building ' + module + (opts.isRelease && ' minified' || '') + ' ...');
@@ -224,7 +224,7 @@ function filterNonCodeFiles() {
224224

225225
// builds the theming related css and provides it as a JS const for angular
226226
function themeBuildStream() {
227-
return gulp.src( config.themeBaseFiles.concat(path.join(config.paths, '*-theme.scss')) )
227+
return gulp.src(config.themeBaseFiles.concat(path.join(config.paths, '*-theme.scss')))
228228
.pipe(concat('default-theme.scss'))
229229
.pipe(utils.hoistScssVariables())
230230
.pipe(sass())

0 commit comments

Comments
 (0)