You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
build/generic/web/compatibility.js #1 'PDFJS' was used before it was defined.
if (typeof PDFJS === 'undefined') { // Line 23, Pos 12 #2 Expected '(' at column 5, not column 3.
(typeof window !== 'undefined' ? window : this).PDFJS = {}; // Line 24, Pos 3 #3 'window' was used before it was defined.
(typeof window !== 'undefined' ? window : this).PDFJS = {}; // Line 24, Pos 11 #4 Cannot read property 'arity' of undefined
// Line 24, Pos 49
build/generic/web/debugger.js #1 Expected 'var' at column 9, not column 3.
var fonts; // Line 22, Pos 3 #2 Expected 'var' at column 9, not column 3.
var panelWidth = 300; // Line 23, Pos 3 #3 Combine this with the previous 'var' statement.
var panelWidth = 300; // Line 23, Pos 7 #4 Expected 'var' at column 9, not column 3.
var active = false; // Line 24, Pos 3 #5 Combine this with the previous 'var' statement.
var active = false; // Line 24, Pos 7 #6 Expected 'var' at column 9, not column 3.
var fontAttribute = 'data-font-name'; // Line 25, Pos 3 #7 Combine this with the previous 'var' statement.
var fontAttribute = 'data-font-name'; // Line 25, Pos 7 #8 Expected 'function' at column 9, not column 3.
function removeSelection() { // Line 26, Pos 3 #9 Expected 'var' at column 13, not column 5.
var divs = document.querySelectorAll('div[' + fontAttribute + ']'); // Line 27, Pos 5 #10 'document' was used before it was defined.
var divs = document.querySelectorAll('div[' + fontAttribute + ']'); // Line 27, Pos 16
build/generic/web/l10n.js #1 'document' was used before it was defined.
document.webL10n = (function(window, document, undefined) { // Line 31, Pos 1 #2 Expected exactly one space between 'function' and '('.
document.webL10n = (function(window, document, undefined) { // Line 31, Pos 29 #3 Expected 'var' at column 5, not column 3.
var gL10nData = {}; // Line 32, Pos 3 #4 Expected 'var' at column 5, not column 3.
var gTextData = ''; // Line 33, Pos 3 #5 Combine this with the previous 'var' statement.
var gTextData = ''; // Line 33, Pos 7 #6 Expected 'var' at column 5, not column 3.
var gTextProp = 'textContent'; // Line 34, Pos 3 #7 Combine this with the previous 'var' statement.
var gTextProp = 'textContent'; // Line 34, Pos 7 #8 Expected 'var' at column 5, not column 3.
var gLanguage = ''; // Line 35, Pos 3 #9 Combine this with the previous 'var' statement.
var gLanguage = ''; // Line 35, Pos 7 #10 Expected 'var' at column 5, not column 3.
var gMacros = {}; // Line 36, Pos 3
#11 Combine this with the previous 'var' statement.
PDF.js uses JSHint as a lint tool, hence that is the only one that is supported out of the box.
If you want to use another lint tool, you need to configure it yourself to make it work properly. For JSHint, the configuration options are specified in: https://github.com/mozilla/pdf.js/blob/master/.jshintrc.
I believe that this question is unfortunately out of scope in the PDF.js project.
this is a followup of the Issue #3500.
the pdf.js is not JSlint freindly it generates the following errors:
rahmanih@kentoon:~/git_repos/pdf.js$ jslint --color build/generic/web/*.js
build/generic/web/compatibility.js
#1 'PDFJS' was used before it was defined.
if (typeof PDFJS === 'undefined') { // Line 23, Pos 12
#2 Expected '(' at column 5, not column 3.
(typeof window !== 'undefined' ? window : this).PDFJS = {}; // Line 24, Pos 3
#3 'window' was used before it was defined.
(typeof window !== 'undefined' ? window : this).PDFJS = {}; // Line 24, Pos 11
#4 Cannot read property 'arity' of undefined
// Line 24, Pos 49
build/generic/web/debugger.js
#1 Expected 'var' at column 9, not column 3.
var fonts; // Line 22, Pos 3
#2 Expected 'var' at column 9, not column 3.
var panelWidth = 300; // Line 23, Pos 3
#3 Combine this with the previous 'var' statement.
var panelWidth = 300; // Line 23, Pos 7
#4 Expected 'var' at column 9, not column 3.
var active = false; // Line 24, Pos 3
#5 Combine this with the previous 'var' statement.
var active = false; // Line 24, Pos 7
#6 Expected 'var' at column 9, not column 3.
var fontAttribute = 'data-font-name'; // Line 25, Pos 3
#7 Combine this with the previous 'var' statement.
var fontAttribute = 'data-font-name'; // Line 25, Pos 7
#8 Expected 'function' at column 9, not column 3.
function removeSelection() { // Line 26, Pos 3
#9 Expected 'var' at column 13, not column 5.
var divs = document.querySelectorAll('div[' + fontAttribute + ']'); // Line 27, Pos 5
#10 'document' was used before it was defined.
#11 Expected 'for' at column 13, not column 5.
#12 Move 'var' declarations to the top of the function.
#13 Stopping. (5% scanned).
build/generic/web/l10n.js
#1 'document' was used before it was defined.
document.webL10n = (function(window, document, undefined) { // Line 31, Pos 1
#2 Expected exactly one space between 'function' and '('.
document.webL10n = (function(window, document, undefined) { // Line 31, Pos 29
#3 Expected 'var' at column 5, not column 3.
var gL10nData = {}; // Line 32, Pos 3
#4 Expected 'var' at column 5, not column 3.
var gTextData = ''; // Line 33, Pos 3
#5 Combine this with the previous 'var' statement.
var gTextData = ''; // Line 33, Pos 7
#6 Expected 'var' at column 5, not column 3.
var gTextProp = 'textContent'; // Line 34, Pos 3
#7 Combine this with the previous 'var' statement.
var gTextProp = 'textContent'; // Line 34, Pos 7
#8 Expected 'var' at column 5, not column 3.
var gLanguage = ''; // Line 35, Pos 3
#9 Combine this with the previous 'var' statement.
var gLanguage = ''; // Line 35, Pos 7
#10 Expected 'var' at column 5, not column 3.
#11 Combine this with the previous 'var' statement.
#12 Expected 'var' at column 5, not column 3.
#13 Combine this with the previous 'var' statement.
#14 Expected 'var' at column 5, not column 3.
#15 Combine this with the previous 'var' statement.
#16 Expected 'function' at column 5, not column 3.
#17 Expected 'console' at column 9, not column 5.
#18 Expected '}' at column 5, not column 3.
#19 Missing space between '}' and ';'.
#20 Unexpected ';'.
#21 Expected 'function' at column 5, not column 3.
#22 Expected 'return' at column 9, not column 5.
#23 Expected '}' at column 5, not column 3.
#24 Expected 'function' at column 5, not column 3.
#25 Expected 'return' at column 9, not column 5.
#26 Expected '}' at column 5, not column 3.
#27 Expected 'function' at column 5, not column 3.
#28 Expected 'if' at column 9, not column 5.
#29 Expected exactly one space between ')' and 'return'.
#30 Expected '{' and instead saw 'return'.
#31 Expected 'return' at column 9, not column 7.
#32 Expected 'var' at column 9, not column 5.
#33 Expected 'var' at column 9, not column 5.
#34 Combine this with the previous 'var' statement.
#35 Expected 'var' at column 9, not column 5.
#36 Combine this with the previous 'var' statement.
#37 Expected 'if' at column 9, not column 5.
#38 Expected 'try' at column 13, not column 7.
#39 Expected 'args' at column 17, not column 9.
#40 Expected '}' at column 13, not column 7.
#41 Expected 'consoleWarn' at column 17, not column 9.
#42 Expected '}' at column 13, not column 7.
#43 Expected '}' at column 9, not column 5.
#44 Expected 'return' at column 9, not column 5.
#45 Expected '}' at column 5, not column 3.
#46 Expected 'function' at column 5, not column 3.
#47 Expected 'var' at column 9, not column 5.
#48 Expected 'evtObject' at column 9, not column 5.
#49 Expected 'evtObject' at column 9, not column 5.
#50 Expected 'window' at column 9, not column 5.
#51 Too many errors. (8% scanned).
build/generic/web/viewer.js
#1 Expected 'INITIAL' at column 9, not column 3.
INITIAL: 0, // Line 38, Pos 3
#2 Expected 'RUNNING' at column 9, not column 3.
RUNNING: 1, // Line 39, Pos 3
#3 Expected 'PAUSED' at column 9, not column 3.
PAUSED: 2, // Line 40, Pos 3
#4 Expected 'FINISHED' at column 9, not column 3.
FINISHED: 3 // Line 41, Pos 3
#5 Expected '}' at column 5, not column 1.
}; // Line 42, Pos 1
#6 Expected 'FIND_FOUND' at column 9, not column 3.
FIND_FOUND: 0, // Line 44, Pos 3
#7 Expected 'FIND_NOTFOUND' at column 9, not column 3.
FIND_NOTFOUND: 1, // Line 45, Pos 3
#8 Expected 'FIND_WRAPPED' at column 9, not column 3.
FIND_WRAPPED: 2, // Line 46, Pos 3
#9 Expected 'FIND_PENDING' at column 9, not column 3.
FIND_PENDING: 3 // Line 47, Pos 3
#10 Expected '}' at column 5, not column 1.
#11 'PDFJS' was used before it was defined.
#12 Expected 'PDFJS' at column 1, not column 3.
#13 'document' was used before it was defined.
#14 Expected 'var' at column 9, not column 3.
#15 Expected 'var' at column 9, not column 3.
#16 Unexpected dangling '_' in '_cache'.
#17 Combine this with the previous 'var' statement.
#18 Expected 'function' at column 9, not column 3.
#19 Expected '}' at column 9, not column 3.
#20 Expected 'CustomStyle' at column 9, not column 3.
#21 Expected 'if' at column 13, not column 5.
#22 Expected '===' and instead saw '=='.
#23 Unexpected dangling '_' in '_cache'.
#24 Expected '===' and instead saw '=='.
#25 Expected 'return' at column 17, not column 7.
#26 Unexpected dangling '_' in '_cache'.
#27 Expected '}' at column 13, not column 5.
#28 Expected 'element' at column 13, not column 5.
#29 Expected 'var' at column 13, not column 5.
#30 Expected 'if' at column 13, not column 5.
#31 Expected '===' and instead saw '=='.
#32 Expected 'return' at column 17, not column 7.
#33 Unexpected dangling '_' in '_cache'.
#34 Expected '}' at column 13, not column 5.
#35 Expected 'uPropName' at column 13, not column 5.
#36 Expected 'for' at column 13, not column 5.
#37 Move 'var' declarations to the top of the function.
#38 Stopping. (2% scanned).
is there any way to fix those issues?
thanks and regards
Haithem
The text was updated successfully, but these errors were encountered: