Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Orion/ESLint"

(Created page)
 
(adding rule parity table)
Line 1: Line 1:
Orion 5.0 will replace our current [http://www.jslint.com/ JSLint validator] with [https://github.com/nzakas/eslint/ ESLint].
+
Orion 5.0 will replace our current [http://www.jslint.com/ JSLint validator] with [https://github.com/nzakas/eslint/ ESLint]. This page captures ongoing issues.
 +
 
 +
== Rules ==
 +
Here's a table showing the equivalent validation rules in JSLint and ESLint.
 +
 
 +
{| class="wikitable" border="1" style="width: 85%;"
 +
! ESLint rule
 +
! JSLint option
 +
! JSLint message
 +
! Details
 +
|-
 +
 
 +
| eqeqeq
 +
| '''eqeqeq''' (or '''eqeq''' in older versions, with inverse on/off state)
 +
| Expected '===' and saw '=='.<br>Expected '!==' and saw '!='.
 +
| detail
 +
|-
 +
 
 +
| no-undef
 +
| ''node''', '''browser''', '''require'''
 +
|
 +
|-
 +
 
 +
| semi
 +
| -
 +
| Missing semicolon.
 +
|
 +
|-
 +
 
 +
| wrap-iife
 +
| -
 +
| Wrap the entire immediate function invocation in parens.<br>Do not wrap function literals in parens unless they are to be immediately invoked.<br>Move the invocation into the parens that contain the function.
 +
|
 +
|-
 +
 
 +
|}
 +
 
 +
== Rule priority ==
 +
Here are the rules we want, in order of priority:
 +
# no-undef

Revision as of 11:41, 15 November 2013

Orion 5.0 will replace our current JSLint validator with ESLint. This page captures ongoing issues.

Rules

Here's a table showing the equivalent validation rules in JSLint and ESLint.

ESLint rule JSLint option JSLint message Details
eqeqeq eqeqeq (or eqeq in older versions, with inverse on/off state) Expected '===' and saw '=='.
Expected '!==' and saw '!='.
detail
no-undef node', browser, require
semi - Missing semicolon.
wrap-iife - Wrap the entire immediate function invocation in parens.
Do not wrap function literals in parens unless they are to be immediately invoked.
Move the invocation into the parens that contain the function.

Rule priority

Here are the rules we want, in order of priority:

  1. no-undef

Back to the top