Skip to content

Commit

Permalink
eslint stylistic rules (adobe#13177)
Browse files Browse the repository at this point in the history
* add some styling rules

* fix trailing commas
  • Loading branch information
zaggino authored and ficristo committed Mar 13, 2017
1 parent 8561a11 commit d00e464
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 8 deletions.
9 changes: 9 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,17 @@ module.exports = {
// http://eslint.org/docs/rules/#nodejs-and-commonjs
"no-new-require": 2,
// http://eslint.org/docs/rules/#stylistic-issues
"block-spacing": 1,
"brace-style": [1, "1tbs", { allowSingleLine: true }],
"camelcase": 1,
"comma-dangle": 2,
"comma-spacing": 1,
"comma-style": [1, "last"],
"computed-property-spacing": 1,
"eol-last": 1,
"func-call-spacing": 1,
"indent": [1, 4],
"key-spacing": [1, { beforeColon: false, afterColon: true }],
"max-len": [1, 120],
"new-cap": [0, {
"capIsNewExceptions": [
Expand Down
4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ module.exports = function (grunt) {
'keymap/{,*/}*',
'lib/{,*/}*',
'mode/{,*/}*',
'theme/{,*/}*',
'theme/{,*/}*'
]
},
{
Expand All @@ -149,7 +149,7 @@ module.exports = function (grunt) {
force: true,
files: false
},
src: ['dist/**/*'],
src: ['dist/**/*']
},
less: {
dist: {
Expand Down
2 changes: 1 addition & 1 deletion src/language/HTMLSimpleDOM.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ define(function (require, exports, module) {
rtc : { rb: true, rt: true, rtc: true, rp: true },
optgroup: { optgroup: true, option: true },
option : { option: true },
tbody : { caption: true, colgroup: true, thead: true, tbody: true, tfoot: true, },
tbody : { caption: true, colgroup: true, thead: true, tbody: true, tfoot: true },
tfoot : { caption: true, colgroup: true, thead: true, tbody: true },
thead : { caption: true, colgroup: true },
tr : { tr: true, th: true, td: true, caption: true },
Expand Down
2 changes: 1 addition & 1 deletion src/nls/hr/strings.js
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ define({
"COLLAPSE_ALL" : "Skupi Sve",
"EXPAND_ALL" : "Proširi Sve",
"COLLAPSE_CURRENT" : "Skupi Trenutno",
"EXPAND_CURRENT" : "Proširi Trenutno",
"EXPAND_CURRENT" : "Proširi Trenutno"
});

/* Last translated for a57bd8888da0b44f382e591c64b394b065178277 */
2 changes: 1 addition & 1 deletion src/preferences/PreferencesBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -1937,7 +1937,7 @@ define(function (require, exports, module) {
*/
getPrefixedSystem: function (prefix) {
return new PrefixedPreferencesSystem(this, prefix + ".");
},
}

});

Expand Down
2 changes: 1 addition & 1 deletion src/project/FileTreeView.js
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ define(function (require, exports, module) {
},
DOM.ins({
className: "jstree-icon"
}),
})
];

var thickness = _createThickness(this.props.depth);
Expand Down
2 changes: 1 addition & 1 deletion src/utils/AnimationUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ define(function (require, exports, module) {
"OTransition" : "oTransitionEnd",
"MozTransition" : "transitionend",
"WebkitTransition": "webkitTransitionEnd",
"transition" : "transitionend",
"transition" : "transitionend"
};

_.forEach(transitions, function (value, key) {
Expand Down
2 changes: 1 addition & 1 deletion test/spec/PreferencesBase-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ define(function (require, exports, module) {
"dontCloseTags": [],
"indentTags": [],
"whenClosing": true,
"whenOpening": false,
"whenOpening": false
});
});

Expand Down

0 comments on commit d00e464

Please sign in to comment.