WordPress.org

Make WordPress Core

Opened 6 weeks ago

Last modified 6 hours ago

#42850 new defect (bug)

jshint.js uses non-free license

Reported by: csmall2 Owned by:
Milestone: 4.9.3 Priority: high
Severity: major Version: 4.9
Component: General Keywords: coding-standards
Focuses: javascript Cc:

Description

In version 4.9 of WordPress a series of linters were added to the editors to make sure that changes made to things such as themes still worked. This is a good idea.

Unfortunately the linter used for Javascript was jshint. This has a single file which uses the "Do not use for Evil" clause. It basically means anything that uses that file is unable to be distributed. In effect, if anyone makes a WordPress site that is "evil" (whatever that means) they're breaking the license.

You can find the file in wp-includes/js/codemirror/jshint.js

The jshint project is aware of the problem and are trying to fix it. https://github.com/jshint/jshint/issues/1234

I'll be making modifications to the Debian package to just not ship jshint which is a shame but brings it back to pre 4.9 behaviour. Ideally I'd like it fixed in WordPress proper.

Given WordPress does care about the licenses (e.g the React changes) you may want to look into this as well.

Change History (5)

#1 @voldemortensen
6 weeks ago

  • Focuses javascript added

After reading that entire github issue, I've pulled out some useful bits.

IBM got permission to re-license their fork and have re-licensed to the MIT license.

JSHint is currently trying to rewrite the portions that need to be changed to be compatible with that.

According to the [JSHint repo owner|https://github.com/jshint/jshint/issues/1234#issuecomment-331321897], may of the contributors aren't familiar with free code issues and need help rewriting those portions. I think this is a significant opportunity for WordPress to contribute to another project, much like has happened with PHPCS.

#2 @voldemortensen
6 weeks ago

  • Keywords coding-standards added

This ticket was mentioned in Slack in #core-committers by rmccue. View the logs.


5 weeks ago

#4 @jorbin
5 weeks ago

  • Milestone changed from Awaiting Review to 4.9.2
  • Priority changed from normal to high
  • Severity changed from normal to major

We should remove jshint both from our development dependencies ( related: #31823 ) and from codemirror while the license contains this clause.

#5 @dd32
6 hours ago

  • Milestone changed from 4.9.2 to 4.9.3

Bumping to 4.9.3 due to 4.9.2s release

Note: See TracTickets for help on using tickets.