Community
Participate
Working Groups
We should move to ESLint as our tool for checking JavaScript code. Advantages are: * Built on Esprima This makes it feasible to share a single AST between our current Esprima-based Content Assist and ESLint, instead of parsing the same code multiple times. * Uses an extensible set of validation rules Unwanted rules can be disabled, new rules can be plugged in. * Plain MIT license Project page: https://github.com/nzakas/eslint/ Opened CQ 7466 for this.
ESLint has the following runtime dependencies, which we will have to distribute as well: * esprima (already distributed in Orion; no action required) * estraverse (opened CQ 7523) * escope (opened CQ 7522)
Note that ESLint does not handle HTML files, whereas JSLint does. We'd have to write some supporting code that extracts <script> tags from an HTML document and feeds them to ESLint.
We've obtained approval to use the core of ESLint -- however the contributed rules are problematic, due to their many authors.
Let's flip the switch in 5.0M1 and feel the pain
Added a Wiki page for this work: https://wiki.eclipse.org/Orion/5.0/Replacing_JSLint
Pushed http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=4da74be ESLint is now enabled by default, and JSLint is disabled by default. (You can change this in Settings > Validation.) Calling this bug fixed. I will open separate bugs dealing with specific bugs or features we need.
Released additional change to server repo to update the RequireJS module paths used by the PDE build: http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=e894ee1 And reenabling JSLint for HTML files only http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=3ee1743