mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiEditor
synced 2024-11-15 03:35:58 +00:00
7721909f9f
* Code clean up in preparation for enabling linting in the future * Update code to use latest code conventions and best practices: - Make use of jQuery.Event (e.g. no need to check both e.keyCode and e.which) - jQuery: .size() -> .length - jQuery: (where appropiate) .attr() -> .prop() Setting properties like 'checked' via attr() has been deprecated in jQuery. - Whitespace - Single quotes instead of double quotes - Use literal keys in object literals instead of strings - Pass mediaWiki to closure, use mw. locally instead of "mediaWiki" global directly. - Fix indentation - Brackets around if, else and for bodies - Strict comparison to 0, null, false, true etc. - Fix missing radix parameter in parseInt - Use local $ instead of global $ - Use `foo || bar` instead of `foo ? foo : bar` - Variable scope hoisting - Double/redundant variable declarations - ['foo'] is better written in dot notation - New line at EOF - Consistency in jQuery construction: Tag name for element creation $( '<div>' ) Valid html for html parsing $( '<div foo="bar"></div>' ) - Fix regex escape warnings per JSLint/JSHint. Do escape ][, don't escape >< - .. * Add .jshintrc / .jshintignore * Updated most files, but not all. Too much at once. Change-Id: I445639b25a9688b3cdf9e5449e3d31cbcfa9c7ae |
||
---|---|---|
.. | ||
images | ||
contentCollector.js | ||
ext.wikiEditor.css | ||
ext.wikiEditor.dialogs.js | ||
ext.wikiEditor.highlight.js | ||
ext.wikiEditor.js | ||
ext.wikiEditor.preview.js | ||
ext.wikiEditor.previewDialog.js | ||
ext.wikiEditor.publish.js | ||
ext.wikiEditor.templateEditor.js | ||
ext.wikiEditor.templates.js | ||
ext.wikiEditor.tests.toolbar.js | ||
ext.wikiEditor.toc.js | ||
ext.wikiEditor.toolbar.hideSig.js | ||
ext.wikiEditor.toolbar.js | ||
jquery.wikiEditor.css | ||
jquery.wikiEditor.dialogs.config.css | ||
jquery.wikiEditor.dialogs.config.js | ||
jquery.wikiEditor.dialogs.css | ||
jquery.wikiEditor.dialogs.js | ||
jquery.wikiEditor.highlight.js | ||
jquery.wikiEditor.html | ||
jquery.wikiEditor.iframe.js | ||
jquery.wikiEditor.js | ||
jquery.wikiEditor.preview.css | ||
jquery.wikiEditor.preview.js | ||
jquery.wikiEditor.previewDialog.css | ||
jquery.wikiEditor.previewDialog.js | ||
jquery.wikiEditor.publish.js | ||
jquery.wikiEditor.templateEditor.js | ||
jquery.wikiEditor.templates.js | ||
jquery.wikiEditor.toc.css | ||
jquery.wikiEditor.toc.js | ||
jquery.wikiEditor.toolbar.config.js | ||
jquery.wikiEditor.toolbar.css | ||
jquery.wikiEditor.toolbar.js |