Skip to content

Commit e73712d

Browse files
committed
Bug 1015013 - JSDoc 3 parse error getter/setter with the same name in strict mode
1 parent e83bd91 commit e73712d

File tree

8 files changed

+19
-38
lines changed

8 files changed

+19
-38
lines changed

.jsdocrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"plugins": ["plugins/markdown"],
2+
"plugins": ["plugins/markdown", "build/jsdoc/nostrict"],
33
"markdown": {
44
"parser": "gfm",
55
"hardwrap": true,

apps/calendar/jsdoc.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
{
22
"calendar": {
3-
"src": ["apps/calendar/js/**/*.js",
4-
"!apps/calendar/js/controllers/time.js",
5-
"!apps/calendar/js/models/account.js",
6-
"!apps/calendar/js/models/calendar.js",
7-
"!apps/calendar/js/models/event.js",
8-
"!apps/calendar/js/views/month_child.js"
9-
],
3+
"src": ["apps/calendar/js/**/*.js"],
104
"options": {
115
"destination": "docs/calendar"
126
}

apps/email/jsdoc.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{
22
"email": {
3-
"src": ["apps/email/js/**/*.js",
4-
"!apps/email/js/ext/mailapi/activesync/configurator.js"
5-
],
3+
"src": ["apps/email/js/**/*.js"],
64
"options": {
75
"destination": "docs/email"
86
}

apps/keyboard/jsdoc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"keyboard": {
33
"src": ["apps/keyboard/js/**/*.js",
4-
"!apps/keyboard/js/render.js"
4+
"!apps/keyboard/js/render.js",
5+
"!apps/keyboard/js/imes/vietnamese/vietnamese.js"
56
],
67
"options": {
78
"destination": "docs/keyboard"

apps/music/jsdoc.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
{
22
"music": {
3-
"src": ["apps/music/js/**/*.js",
4-
"!apps/music/js/Player.js",
5-
"!apps/music/js/music.js"
6-
],
3+
"src": ["apps/music/js/**/*.js"],
74
"options": {
85
"destination": "docs/music"
96
}

apps/settings/jsdoc.json

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
11
{
22
"settings": {
33
"src": ["apps/settings/README.md",
4-
"apps/settings/js/**/*.js",
5-
"!apps/settings/js/carrier.js",
6-
"!apps/settings/js/mvvm/views.js",
7-
"!apps/settings/js/settings.js",
8-
"!apps/settings/js/wifi.js",
9-
"!apps/settings/js/modules/mvvm/list_view.js",
10-
"!apps/settings/js/panels/feedback_send/feedback_send.js",
11-
"!apps/settings/js/panels/keyboard/core.js",
12-
"!apps/settings/js/panels/keyboard_add_layouts/core.js",
13-
"!apps/settings/js/panels/keyboard_enabled_layouts/core.js"
4+
"apps/settings/js/**/*.js"
145
],
156
"options": {
167
"destination": "docs/settings"

apps/system/jsdoc.json

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
11
{
22
"system": {
33
"src": ["apps/system/js/**/*.js",
4-
"!apps/system/js/airplane_mode.js",
5-
"!apps/system/js/sound_manager.js",
6-
"!apps/system/js/title.js",
7-
"!apps/system/js/value_selector/date_picker.js",
8-
"!apps/system/js/value_selector/spin_date_picker.js",
9-
"!apps/system/js/lockscreen.js",
10-
"!apps/system/js/edge_swipe_detector.js",
11-
"!apps/system/js/stack_manager.js",
12-
"!apps/system/js/lockscreen_window.js",
13-
"!apps/system/js/lockscreen_window_manager.js",
14-
"!apps/system/js/media_playback.js",
15-
"!apps/system/js/radio.js"
4+
"!apps/system/js/lockscreen_window_manager.js"
165
],
176
"options": {
187
"destination": "docs/system"

build/jsdoc/nostrict.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*global exports*/
2+
/*
3+
* plugin to remove strict mode before parsing to prevent getter/setter
4+
* parsing error.
5+
*/
6+
'use strict';
7+
exports.handlers = {
8+
beforeParse: function(e) {
9+
e.source = e.source.replace(/['"]use strict['"]/g, '//"use strict"');
10+
}
11+
};

0 commit comments

Comments
 (0)