[wp-trac] [WordPress Trac] #31823: Add ESLint integration

WordPress Trac noreply at wordpress.org
Tue Jun 6 15:54:15 UTC 2017


#31823: Add ESLint integration
------------------------------+-------------------------
 Reporter:  westonruter       |       Owner:
     Type:  enhancement       |      Status:  new
 Priority:  lowest            |   Milestone:  4.9
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:                    |     Focuses:  javascript
------------------------------+-------------------------

Comment (by netweb):

 Here's a first pass for a new Grunt task `grunt eslint` in
 [attachment:31823.diff]:

 * It uses the ESLint "shared config" https://github.com/WordPress-Coding-
 Standards/eslint-config-wordpress

 * It uses version `1.0.0` of the "shared config" which is designed as a
 "drop in" replacement for WordPress' `.jshintrc`

 * I designed a roadmap for future releases of `eslint-config-wordpress`,
 this would allow users of the shared config to "pin" to a version of the
 config that would be compatible with their codebase until such time
 they've updated their codebase and able to move to a newer version of the
 config

  * Version 1.0.0 - Parity with WordPress' `current .jshintrc`

  * Version 1.1.0 - Parity with WordPress' `current .jshintrc` with the
 extra now deprecated JSHint `onevar` and `trailing` options

  * Version 2.0.0 - Parity with the JSCS's WordPress config

  * Version 3.0.0 - Utilize and leverage ESLints rules to add sane defaults
 and further enhance WordPress' existing coding standards

  * Full roadmap details: https://github.com/WordPress-Coding-Standards
 /eslint-config-wordpress/issues/8

 The Grunt task currently errors on a handful of issues in `Gruntfile.js`
 and a Twenty Fourteen JS file, to force the Grunt task to run all the
 subtasks to see what ESLint errors are shown `grunt eslint --force` should
 do the trick.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31823#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list