Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

The default plugin Jslint is too old to support new features, such as es6 #12000

@Lingcan

Description

@Lingcan

Jslint stop scanning while encounter const keyword. So I have to use Douglas Crockford's lastest jslint.js to override the local one at /src/extensions/default/JSLint/thirdparty/jslint/jslint.js and do a little following change on src/extensions/default/JSLint/main.js and it works great.

var jslintResult = jslint(text, options);
if (!jslintResult || jslintResult.ok) {
return null;
}
var errors = jslintResult.warnings.map(function (jslintError) {
return {
pos: { line: jslintError.line, ch: jslintError.column },
message: jslintError.message,
type: CodeInspection.Type.WARNING
};
});
var result = { errors: errors, aborted: false };
if (jslintResult.stop) {
var lastError = {
pos: {
line: jslintResult.warnings[jslintResult.warnings.length - 1].line,
ch: jslintResult.warnings[jslintResult.warnings.length - 1].column
},
message: 'Scanning stopped ...',
type: CodeInspection.Type.META
};
result.aborted = true;
result.errors.push(lastError);
}
return result;

Could anyone help to update the jslint to a newer version ?

Douglas Crockford's code:
https://github.com/douglascrockford/JSLint/blob/master/jslint.js

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions