Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
core-ai-bot opened this issue Aug 31, 2021 · 2 comments
Open

Comments

@core-ai-bot
Copy link
Member

Issue by Lingcan
Saturday Dec 12, 2015 at 13:46 GMT
Originally opened as adobe/brackets#12000


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

@core-ai-bot
Copy link
Member Author

Comment by petetnt
Saturday Dec 12, 2015 at 15:32 GMT


Brackets is moving to using ESLint as the default linter in 1.6, see adobe/brackets#11984 for more info. The status of JSLint is still undecided afaik but PR upgrading JSLint in the core would be appriciated

@core-ai-bot
Copy link
Member Author

Comment by ficristo
Wednesday Feb 03, 2016 at 11:34 GMT


@peterflynn Could you update the JSLint fork? And since we use the submodule take advantage of it and add an UMD wrapper?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant