Skip to content

List of pages that are needed

James Allardice edited this page Aug 1, 2013 · 92 revisions

Following is a comprehensive list of pages for error messages that can be generated by JSLint and JSHint. The list is based on the strings found in the bundle object declared in jslint.js and by simply searching through the source of JSHint, since it doesn't centralise the possible strings like JSLint does.

Items that have been struck through have already been written about. Their articles can be found in the _posts directory. When writing a new article, please copy the file name from this list and save your article under that name.

If you discover a missing JSLint or JSHint message, please add it to the list. If you discover that a message is never actually generated by JSLint/JSHint, strike it through in the list and add a small note stating that, as far as you can tell, it is never used.

  • 2001-01-01-a-cannot-be-named-b.html (JSHint 2.1.0+ only)
  • 1980-01-01-a-is-already-defined.html
  • 1980-02-01-a-is-only-available-in-javascript-1-7.html
  • 1980-02-01-attempting-to-override-a-which-is-a-constant.html (JSHint only)
  • 1980-03-01-avoid-eol-escaping.html (JSHint only, <1.0.0 was "escapement")
  • 1979-01-01-the-and-subexpression-should-be-wrapped-in-parens.html
  • 1978-01-01-do-not-assign-to-the-exception-parameter.html
  • 1977-01-01-expected-an-assignment-or-function-call-and-saw-an-expression.html
  • 1975-01-01-avoid-a.html
  • 1974-01-01-bad-assignment.html
  • 1972-01-01-bad-constructor.html
  • 1971-02-01-bad-escapement-of-eol-use-option-multistr-if-needed.html (JSHint only)
  • 1971-03-01-bad-escapement.html (JSHint only)
  • 1968-01-01-bad-for-in-variable-a.html
  • 1967-01-01-bad-invocation.html
  • 1967-02-01-bad-line-breaking-before-a.html (JSHint only)
  • 1965-01-01-do-not-use-new-for-side-effects.html (ADD THIS TO ESLINT)
  • 1964-01-01-bad-number-a.html (It appears that this cannot be generated by JSLint)
  • 1963-01-01-bad-operand.html
  • 1963-02-01-bad-option.html (JSHint only)
  • 1963-03-02-bad-option-value.html (JSHint only, expands upon JSLint 'missing option value')
  • 1961-02-01-blocks-are-nested-too-deeply.html (JSHint only)
  • 1959-01-01-do-not-wrap-function-literals-in-parens-unless-they-are-immediately-invoked.html
  • 1958-01-01-combine-this-with-the-previous-var-statement.html
  • 1957-01-01-expected-a-conditional-expression-and-saw-an-assignment.html
  • 1957-02-01-comma-warnings-can-be-turned-off-with-laxcomma.html (JSHint only)
  • 1957-03-01-this-character-may-get-silently-deleted.html (JSHint only)
  • 1956-01-01-confusing-use-of-a.html
  • 1956-02-01-confusing-minusses.html (JSHint only)
  • 1956-03-01-confusing-plusses.html (JSHint only)
  • 1955-01-01-confusing-regular-expression.html
  • 1954-01-01-a-constructor-name-a-should-start-with-an-uppercase-letter.html (ADD THIS TO ESLINT TOO)
  • 1954-02-01-const-a-has-already-been-declared.html (JSHint only)
  • 1954-03-01-const-a-is-initialized-to-undefined.html (JSHint only)
  • 1954-04-01-constant-a-was-not-declared-correctly.html (JSHint only)
  • 1954-04-02-creating-global-for-variable.html (JSHint only)
  • 1954-05-01-cyclomatic-complexity-is-too-high-per-function.html (JSHint only)
  • 1953-01-01-unexpected-control-character-a.html
  • 1953-01-02-unexpected-control-character-in-string-a.html (JSHint only)
  • 1951-01-01-unexpected-dangling-_-in-a.html
  • 1950-01-01-dangerous-comment.html
  • 1950-02-01-all-debugger-statements-should-be-removed.html (JSHint only)
  • 1950-03-01-a-is-defined-but-never-used.html (JSHint only)
  • 1949-01-01-only-properties-should-be-deleted.html
  • 1948-01-01-duplicate-a.html
  • 1948-02-01-duplicate-member-a.html (JSHint only)
  • 1947-01-01-empty-block.html (Include ESHint)
  • 1946-01-01-empty-case.html
  • 1945-01-01-empty-class.html
  • 1944-01-01-this-is-an-es5-feature.html
  • 1944-01-02-es5-option-is-now-set-per-default.html (JSHint only)
  • 1944-01-03-each-value-should-have-its-own-case-label.html (JSHint only)
  • 1944-02-01-a-is-only-available-in-es6.html
  • 1943-01-01-eval-is-evil.html
  • 1942-01-01-expected-a.html
  • 1941-01-01-expected-a-and-instead-saw-b.html
  • 1940-01-01-expected-a-to-match-b-from-line-c-and-instead-saw-d.html
  • 1939-01-01-expected-an-at-rule-and-instead-saw-a.html
  • 1938-01-01-expected-a-at-column-b-not-column-c.html
  • 1934-01-01-expected-a-number-between-0-and-1-and-instead-saw-a.html
  • 1933-01-01-expected-an-id-and-instead-saw-a.html
  • 1932-01-01-expected-an-identifier-and-instead-saw-a.html
  • 1931-01-01-expected-an-identifier-and-instead-saw-a-a-reserved-word.html
  • 1931-02-01-expected-a-json-value.html (JSHint JSON mode only)
  • 1925-01-01-expected-a-number-and-instead-saw-a.html
  • 1924-01-01-expected-an-operator-and-instead-saw-a.html
  • 1923-01-01-expected-a-percentage-and-instead-saw-a.html
  • 1922-01-01-expected-a-positive-number-and-instead-saw-a.html
  • 1919-01-01-expected-a-small-positive-integer-and-instead-saw-a.html
  • 1918-01-01-expected-exactly-one-space-between-a-and-b.html
  • 1917-01-01-expected-a-string-and-instead-saw-a.html
  • 1913-02-01-extra-comma.html (JSHint only)
  • 1912-01-01-the-body-of-a-for-in-should-be-wrapped-in-an-if-statement.html (ADD THIS TO ESLINT TOO)
  • 1911-01-01-function-statements-should-not-be-placed-in-blocks.html
  • 1910-01-01-the-function-constructor-is-eval.html
  • 1909-01-01-dont-make-functions-within-a-loop.html
  • 1908-01-01-function-statements-are-not-invocable.html
  • 1907-01-01-use-the-function-form-of-use-strict.html
  • 1907-02-01-a-generator-function-shall-contain-a-yield-statement.html (JSHint only)
  • 1906-02-01-hasownproperty-is-a-really-bad-name.html (JSHint only)
  • 1905-01-01-avoid-html-event-handlers.html
  • 1904-01-01-expected-an-identifier-in-an-assignment-and-instead-saw-a-function-invocation.html
  • 1904-02-01-identifier-a-is-not-in-camel-case.html (JSHint only)
  • 1903-01-01-implied-eval-is-evil-pass-a-function-instead-of-a-string.html
  • 1903-02-01-illegal-comma.html (JSHint only)
  • 1902-01-01-unexpected-in-compare-with-undefined-or-use-the-hasownproperty-method-instead.html
  • 1901-01-01-insecure-a.html
  • 1901-02-01-inner-functions-should-be-listed-at-the-top-of-the-outer-function.html (JSHint only)
  • 1901-03-01-input-is-neither-a-string-nor-an-array-of-strings (JSHint call via JS only)
  • 1901-04-01-input-is-empty.html (JSHint only)
  • 1901-05-01-invalid-regular-expression.html (JSHint only)
  • 1901-06-01-invalid-for-each-loop.html (JSHint only)
  • 1900-01-01-use-the-isnan-function-to-compare-with-nan.html
  • 1898-01-01-a-leading-decimal-point-can-be-confused-with-a-dot-a.html
  • 1898-02-01-line-breaking-error-a.html (JSHint only)
  • 1898-03-01-let-declaration-not-directly-within-a-block.html (JSHint only)
  • 1897-01-01-missing-a.html
  • 1897-02-01-missing-semicolon.html (JSHint, ESLint only)
  • 1896-01-01-missing-a-after-b.html
  • 1894-01-01-missing-property-name.html
  • 1893-01-01-missing-space-between-a-and-b.html
  • 1891-01-01-missing-use-strict-statement.html
  • 1891-02-01-missing-invoking-a-constructor.html (JSHint only) (ADD THIS TO ESLINT TOO)
  • 1890-01-01-mixed-spaces-and-tabs.html
  • 1890-02-01-mixed-double-and-single-quotes.html (JSHint only)
  • 1889-01-01-move-the-invocation-into-the-parens-that-contain-the-function.html
  • 1888-01-01-move-var-declarations-to-the-top-of-the-function.html
  • 1888-02-01-a-is-only-available-in-mozilla-javascript-extensions.html
  • 1888-03-01-mozilla-requires-the-yield-expression-to-be-parenthesized-here.html (JSHint only)
  • 1887-01-01-missing-name-in-function-statement.html
  • 1887-02-01-missing-on-a-case-clause.html (JSHint only)
  • 1887-03-01-missing-to-match-from-line-a.html (JSHint only)
  • 1986-01-01-nested-comment.html
  • 1885-01-01-nested-not.html
  • 1884-01-01-do-not-use-a-as-a-constructor.html
  • 1883-01-01-a-has-not-been-fully-defined-yet.html
  • 1882-01-01-a-is-not-a-function.html
  • 1881-01-01-a-is-not-a-label.html
  • 1880-01-01-a-is-out-of-scope.html
  • 1879-01-01-a-should-not-be-greater-than-b.html
  • 1878-01-01-dont-use-octal-a-use-instead.html
  • 1878-02-01-octal-literals-are-not-allowed-in-strict-mode.html (JSHint only) (ESLint has something similar, probably add to this)
  • 1978-03-01-option-validthis-cant-be-used-in-a-global-scope.html (JSHint only)
  • 1877-01-01-do-not-mutate-parameter-a-when-using-arguments.html
  • 1876-01-01-unexpected-parameter-a-in-get-b-function.html
  • 1875-01-01-expected-parameter-value-in-set-a-function.html
  • 1875-02-01-the-a-property-is-deprecated.html (JSHint only)
  • 1875-03-01-math-is-not-a-function.html (JSHint only, covered by 1882-01-01)
  • 1874-01-01-missing-radix-parameter.html (ADD TO ESLINT TOO)
  • 1873-01-01-read-only.html
  • 1872-01-01-redefinition-of-a.html
  • 1871-01-01-reserved-name-a.html
  • 1871-02-01-did-you-mean-to-return-a-conditional.html (JSHint only)
  • 1870-01-01-a-b-scanned.html
  • 1869-01-01-a-regular-expression-literal-can-be-confused-with.html TODO: Update JSHint details... behaviour of this warning is confusing as of 1.0.0
  • 1868-01-01-expected-to-see-a-statement-and-instead-saw-a-block.html
  • 1868-02-01-setter-is-defined-without-getter.html (JSHint only)
  • 1867-01-01-stopping.html
  • 1866-01-01-strange-loop.html
  • 1865-01-01-strict-violation.html
  • 1865-02-01-strings-must-use-singlequote.html (JSHint only)
  • 1865-03-01-strings-must-use-doublequote.html (JSHint only, combined with 1865-02-01)
  • 1864-01-01-a-is-better-written-in-dot-notation.html (ADD ESLINT)
  • 1863-01-01-unexpected-sync-method-a.html
  • 1862-01-01-a-a-must-be-within-b.html
  • 1861-01-01-unexpected-todo-comment.html
  • 1860-01-01-line-too-long.html
  • 1859-01-01-too-many-errors.html
  • 1859-02-01-too-many-parameters-per-function.html (JSHint only)
  • 1859-03-01-too-many-statements-per-function.html (JSHint only)
  • 1859-04-01-too-many-var-statements.html (JSHint only)
  • 1858-01-01-a-trailing-decimal-point-can-be-confused-with-a-dot.html
  • 1856-01-01-unclosed-string.html
  • 1855-01-01-unclosed-comment.html
  • 1854-01-01-unclosed-regular-expression.html
  • 1854-02-01-unbegun-comment.html (JSHint only)
  • 1853-01-01-unescaped-a.html
  • 1852-01-01-unexpected-a.html (IN PROGRESS, GENERAL PAGE TO HOLD LINKS TO SPECIFIC MESSAGES)
  • 1852-01-02-unexpected-assignment-expression.html (Newer JSLint only)
  • 1852-02-01-unexpected-plus-plus.html (More detail on a specific 1852-01-1 message)
  • 1852-03-01-unexpected-nan.html (More detail on a specific 1852-01-1 message)
  • 1851-01-01-unexpected-character-a-in-b.html
  • 1850-01-01-unexpected-comment.html
  • 1849-01-01-unexpected-else-after-return.html
  • 1849-02-01-unexpected-early-end-of-program.html (JSHint only)
  • 1848-01-01-unexpected-label-a.html
  • 1847-01-01-unexpected-property-a.html
  • 1846-01-01-unexpected-space-between-a-and-b.html
  • 1845-01-01-unexpected-typeof-compare-directly-with-a.html
  • 1844-01-01-it-is-not-necessary-to-initialize-a-to-undefined.html
  • 1844-02-01-unnecessary-semicolon.html (JSHint only)
  • 1844-03-01-unnecessary-directive-a.html (JSHint only, generic version of JSLint 1843-01-01)
  • 1843-01-01-unnecessary-use-strict.html
  • 1843-02-01-unnecessary-else-after-disruption.html (newer JSLint only)
  • 1842-01-01-unreachable-a-after-b.html
  • 1839-01-01-unsafe-character.html
  • 1838-01-01-javascript-url.html
  • 1838-01-02-script-url.html (JSHint only, presumably equivalent of above)
  • 1838-01-03-label-a-looks-like-a-javascript-url.html (JSHint only)
  • 1838-02-01-unmatched-a.html (JSHint only)
  • 1837-01-01-use-the-array-literal-notation.html
  • 1836-01-01-spaces-are-hard-to-count-use-a.html
  • 1835-01-01-use-the-charat-method.html (seems to be unused)
  • 1834-01-01-use-the-object-literal-notation.html
  • 1834-02-01-use-the-object-literal-notation-or-object-create-null.html (newer JSLint only, perhaps just add to 1834-01-01)
  • 1833-01-01-use-the-or-operator.html
  • 1832-01-01-use-a-named-parameter.html
  • 1831-01-01-a-was-used-before-it-was-defined.html
  • 1830-01-01-variable-a-was-not-declared-correctly.html
  • 1830-02-01-value-of-a-may-be-overwritten-in-ie.html (JSHint only)
  • 1829-01-01-weird-assignment.html
  • 1828-01-01-weird-condition.html
  • 1827-01-01-weird-construction-delete-new.html
  • 1826-01-01-weird-program.html
  • 1825-01-01-weird-relation.html
  • 1824-01-01-weird-ternary.html
  • 1824-02-01-with-is-not-allowed-in-strict-mode.html (JSHint only)
  • 1824-03-01-dont-use-with.html (JSHint only)
  • 1823-01-01-wrap-an-immediate-function-invocation-in-parentheses.html
  • 1822-01-01-wrap-the-regexp-literal-in-parens.html
  • 1821-01-01-document-write-can-be-a-form-of-eval.html
  • 1820-01-01-a-yield-statement-shall-be-within-a-generator-function.html (JSHint only)
  • 1819-01-01-you-might-be-leaking-a-variable-here.html (JSHint only)

Removed but still in active use

  • 1858-11-01-type-confusion-a-and-b.html (introduced JSLint 2011-06-13, removed 2011-07-06... not sure how people still get this?!)

ESLint

ESLint is a new, in-progress tool. This list of errors is subject to frequent change, and is based off the rules found in the rules directory of the project.

  • 1987-10-01-non-camelcased-identifier-a-found.html
  • 1942-10-01-expected-after.html (Group page for "Expected { after...")
  • 1844-10-01-unexpected-use-of-use-instead.html (Group page for "Unexpected use of ==|!= use ===|!=== instead")
  • 1852-10-01-unexpected-alert.html (Group page for "Unexpected alert|confirm|prompt")
  • 1852-10-01-unexpected-console-statement.html
  • 1852-10-01-unexpected-debugger-statement.html
  • 1845-10-01-unexpected-use-of-found.html (Group page for bitwise operators)
  • 1845-10-01-unexpected-use-of-with-statement.html
  • 1975-10-01-avoid-arguments-callee.html
  • 1975-10-01-avoid-arguments-caller.html
  • 1945-10-01-empty-switch-statement.html
  • 1945-10-01-empty-statement.html
  • 1912-10-01-found-unexpected-statement-after-a.html
  • 1878-10-01-opening-curly-brace-not-on-same-line-as-block-identifier.html
  • 1885-10-01-non-quoted-property-a-found.html

Legacy

JSLint removed HTML, CSS and ADsafe parsing in a recent commit so any messages relating to those that are not yet documented are now low priority:

  • 1820-12-01-adsafe-violation-id-does-not-match.html
  • 1819-12-01-adsafe-violation-missing-adsafe-id-or-adsafe-go.html
  • 1818-12-01-adsafe-lib-violation.html
  • 1817-12-01-adsafe-the-second-argument-to-lib-must-be-a-function.html
  • 1816-12-01-adsafe-violation-missing-id_.html
  • 1815-12-01-adsafe-name-violation-a.html
  • 1814-12-01-adsafe-script-placement-violation.html
  • 1813-12-01-adsafe-violation-an-id-must-have-a-a-prefix.html
  • 1812-12-01-adsafe-script-violation.html
  • 1811-12-01-adsafe-unapproved-script-source.html
  • 1810-12-01-adsafe-subscript-a.html
  • 1809-12-01-adsafe-violation-disallowed-tag-a.html
  • 1841-12-01-unrecognized-style-attribute-a.html
  • 1840-12-01-unrecognized-tag.html
  • 1857-12-01-type-is-unnecessary.html
  • 1892-12-01-missing-url.html
  • 1895-12-01-missing-option-value.html
  • 1899-12-01-lang-is-deprecated.html
  • 1906-12-01-html-confusion-in-regular-expression-a.html
  • 1976-12-01-attribute-a-not-all-lower-case.html
  • 1973-12-01-bad-hex-color-a.html
  • 1970-12-01-bad-html-string.html
  • 1969-12-01-bad-id-a.html
  • 1971-12-01-bad-entity.html
  • 1966-12-01-bad-name-a.html
  • 1962-12-01-bad-style.html
  • 1961-12-01-bad-type.html
  • 1960-12-01-bad-url-a.html
  • 1937-12-01-expected-an-attribute-and-instead-saw-a.html
  • 1936-12-01-expected-an-attribute-value-and-instead-saw-a.html
  • 1935-12-01-expected-a-class-and-instead-saw-a.html
  • 1930-12-01-expected-a-linear-unit-and-instead-saw-a.html
  • 1929-12-01-expected-a-lang-code-and-instead-saw-a.html
  • 1928-12-01-expected-a-css-media-type-and-instead-saw-a.html
  • 1927-12-01-expected-a-name-and-instead-saw-a.html
  • 1926-12-01-expected-a-non-standard-style-attribute-and-instead-saw-a.html
  • 1921-12-01-expected-a-pseudo-and-instead-saw-a.html
  • 1920-12-01-expected-a-css-selector-and-instead-saw-a.html
  • 1916-12-01-expected-a-style-attribute-and-instead-saw-a.html
  • 1915-12-01-expected-a-style-pattern-and-instead-saw-a.html
  • 1914-12-01-expected-a-tagname-and-instead-saw-a.html
  • 1913-12-01-expected-a-type-and-instead-saw-a.html
  • 1952-12-01-a-css-file-should-begin-with-charset-utf-8.html
Clone this wiki locally