JSLint v9 Released

JSLint v9 Released

This release is mostly a cleanup of the source code. The build process has been updated to use a more modern build tool (Gulp) and uses fewer dependencies.

The source code has been switched to ES2015 syntax, with appropriate transpiling as part of the build process. The tests have also been converted to ES2015

The dist directory now includes two versions of JSLint, one transpiled to ES5 syntax, and one that is the original ES2015 syntax. The former is the same as prior versions, and will be used when running from the command line. The latter is not usable from the command line, but may be useful for generating custom versions of JSLint for web apps.

JSLint v9 Released

JSLint version 9 has been released.

This release is mainly a maintenance release that deals with some bugs, but it also adds some new options. The new options are:

* -nopoison — Turn off the poison variables and functions.

* -noproto — Turn off the automatic insertion of a proto property by getValue.

* -nonewcap — Turn off the enforcement of capitalization of constructors.

* -noregexp — Turn off the warnings about using unsafe regular expressions.

The documentation has also been updated to discuss the use of JSLint with the CoffeeScript language, and to explain why JSLint uses /*properties*/ instead of /*property*/ and /*members*/ instead of /*member*/.

JSLint v9 is now out. I have been working on how to improve the documentation for JSLint, and I think I finally have it. The guidance that you get from JSLint is more complete than it has ever been.

I suspect that the most important change in this release is the new html attribute. If you use one of the HTML forms, then you can specify that the source text is an HTML fragment or an entire page. JSLint will then be able to distinguish between your own tokens and those of JavaScript libraries that you have referenced. This should help with false positives for things like undeclared variables.

The tool also allows for some limited linting of CSS, including rule ordering and duplicate rules. It also provides a warning when a @import statement appears anywhere other than at the beginning of a stylesheet.

JSLint no longer refers to “your browser”. If the code will run in a browser, then set browser to true . If not, then set browser to false . The default value is false .

In addition, there are many tweaks and improvements including better IE11 support and lots of additional messages about potential problems in your code. Checkout the changelog for all the details!

We have just released JSLint edition 9. This is a minor release that adds support for ES6 template strings, let expressions and const declarations.

In addition, we have improved the way JSLint deals with ES5 strict mode and added a new option, to allow you to specify which context JSLint will assume your code is running in.

JSLint 9 is a minor update and we recommend that everyone upgrade to it as soon as possible.

JSLint v9 has been released. It is a major update which incorporates several months of work. You can find the changes here.

I have also updated the JSLint Book. The chapter on directives has been rewritten and expanded to include the new directives and options. A new chapter has been added that documents all of the JSLint options.

The new directives are:

/*jslint this, bitwise*/

This directive will cause JSLint to assume that the code will run in strict mode and that this will refer to the global object, rather than to an instance object when used in an object literal or a class method. This directive may be followed by any number of options. For example:

/*jslint this, bitwise: true, plusplus: true*/

This directive is equivalent to using the following options:

{

“esversion”: 6,

“bitwise”: true,

“plusplus”: true

}

JSLint is a JavaScript program that looks for problems in JavaScript programs. It is a code quality tool.

JSLint was developed by Douglas Crockford. His work on JSLint, and especially his work on the language that it accepts, influenced the development of the ECMAScript Edition 5 standard and will influence the upcoming Edition 6.

If you are new to JSLint, please read The Good Parts first.

JSLint requires all functions to be placed before any use of a function. This allows JSLint to make simple and reliable assumptions about variable hoisting and function declaration hoisting. It also integrates well with other tools such as Douglas Crockford’s JSMin. The downside is that it may require changes to your source code and style, which can be difficult in large projects or when working with third-party libraries. A good compromise is to follow JSLint’s rules within your project but leave third-party code untouched.

The following major changes have been made since version 8:

1. The maxlen option has been added to allow line length limits to be configured.

2. The newcap option has been added to require constructors to be capitalized.

3. The noempty option has been added to disallow empty blocks.

4. The nonew option has been improved to disallow unnecessary constructor calls and only warn about side effects unless the unparam option is also enabled.

5. The undef option has been improved to disallow implicit globals unless the predef option is used to declare them explicitly as global, which is now also allowed for variables declared as parameters of functions, functions declared as statements, and implied globals in Node modules and HTML scripts.

6. The sub option has been improved to allow property names beginning with underscore or dollar sign, but only if no other properties have names that do not begin with an underscore or dollar sign, since such properties cannot be dereferenced using dot notation except in strict mode code or with an ES6 computed property name expression or bracketed property accessor expression (e.g., foo[“bar”]).

Leave a Reply