2012-07-19 03:40:49 +00:00
|
|
|
{
|
2013-04-13 06:53:11 +00:00
|
|
|
/* Common */
|
2012-07-19 03:40:49 +00:00
|
|
|
|
2013-04-13 06:53:11 +00:00
|
|
|
// Enforcing
|
Make use of new jshint options
* Restricting "camelcase":
No changes, we were passing all of these already
* Explicitly unrestricting "forin" and "plusplus"
These are off by default in node-jshint, but some distro of jshint
and editors that use their own wrapper around jshint instead of
node-jshint (Eclipse?) may have different defaults. Therefor
setting them to false explicitly. This also serves as a reminder
for the future so we'll always know we don't pass that, in case
we would want to change that.
* Fix order ("quotemark" before "regexp")
* Restricting "unused"
We're not passing all of this, which is why I've set it to false
for now. But I did put it in .jshintrc as placeholder.
I've fixed most of them, there's some left where there is no clean
solution.
* While at it fix a few issues:
- Unused variables ($target, $window)
- Bad practices (using jQuery context for find instead of creation)
- Redundant /*global */ comments
- Parameters that are not used and don't have documentation either
- Lines longer than 100 chars @ 4 spaces/tab
* Note:
- ve.ce.Surface.prototype.onChange takes two arguments but never
uses the former. And even the second one can be null/undefined.
Aside from that, the .change() function emits
another event for the transaction already. Looks like this
should be refactored a bit, two more separated events probably
or one that is actually used better.
- Also cleaned up a lot of comments, some of which were missing,
others were incorrect
- Reworked the contentChange event so we are no longer using the
word new as an object key; expanded a complex object into multiple
arguments being passed through the event to make it easier to work
with and document
Change-Id: I8490815a508c6c379d5f9a743bb4aefd14576aa6
2012-08-07 06:02:18 +00:00
|
|
|
"camelcase": true,
|
2012-07-19 03:40:49 +00:00
|
|
|
"curly": true,
|
|
|
|
"eqeqeq": true,
|
|
|
|
"immed": true,
|
|
|
|
"latedef": true,
|
|
|
|
"newcap": true,
|
|
|
|
"noarg": true,
|
|
|
|
"noempty": true,
|
|
|
|
"nonew": true,
|
2012-08-07 05:02:01 +00:00
|
|
|
"quotmark": "single",
|
2013-04-13 06:53:11 +00:00
|
|
|
"trailing": true,
|
2012-07-19 03:40:49 +00:00
|
|
|
"undef": true,
|
2012-09-17 13:30:50 +00:00
|
|
|
"unused": true,
|
2013-04-13 06:53:11 +00:00
|
|
|
// Legacy
|
|
|
|
"onevar": true,
|
|
|
|
|
|
|
|
/* Local */
|
2012-07-19 03:40:49 +00:00
|
|
|
|
2013-04-13 06:53:11 +00:00
|
|
|
// Enforcing
|
|
|
|
"bitwise": true,
|
|
|
|
"forin": false,
|
|
|
|
"plusplus": false,
|
|
|
|
"regexp": true,
|
|
|
|
"strict": false,
|
|
|
|
// Relaxing
|
2012-10-07 07:14:45 +00:00
|
|
|
"es5": true,
|
2012-07-19 03:40:49 +00:00
|
|
|
"multistr": true,
|
2012-10-07 07:14:45 +00:00
|
|
|
"smarttabs": true,
|
2013-04-13 06:53:11 +00:00
|
|
|
// Environment
|
2012-07-19 03:40:49 +00:00
|
|
|
"browser": true,
|
|
|
|
"jquery": true,
|
2013-04-13 06:53:11 +00:00
|
|
|
// Legacy
|
2012-07-19 03:40:49 +00:00
|
|
|
"nomen": true,
|
2013-04-13 06:53:11 +00:00
|
|
|
|
|
|
|
"predef": [
|
|
|
|
"ve",
|
|
|
|
"unicodeJS",
|
|
|
|
"QUnit"
|
|
|
|
]
|
2012-07-19 03:40:49 +00:00
|
|
|
}
|