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

- directive - add new directive subscript for linting of scripts targeting Google Closure Compiler #404

Merged
merged 2 commits into from
Jun 20, 2022

Conversation

kaizhu256
Copy link
Member

  • directive - add new directive subscript for linting of scripts targeting Google Closure Compiler
/*jslint subscript*/
let aa = {};
// allow identifier in subscript-notation to prevent Google Closure Compiler
// from over-optimizing/renaming/mangling property-name "bb"
aa["bb"] = 1;
  • warning - relax warning about missing catch in try...finally statement
/*jslint browser*/
/*global _free, _malloc, manipulatePointer*/

function webassemblyFoo() {
    let pointer;
    try {
        pointer = _malloc(1024);
        manipulatePointer(pointer);
    } finally {
        // we want to cleanup pointer to prevent memory-leak,
        // but want the error to continue being raised
        _free(pointer);
    }
}

function uiFoo() {
    try {
        webassemblyFoo();
    } catch (err) {
        window.alert(err);
    }
}
  • jslint - allow aliases evil, nomen for jslint-directives eval, name, respectively for backwards-compatibility

  • bugfix - fix broken codemirror example

…d with scripts targeting Google Closure Compiler

- warning - relax warning about missing `catch` in `try...finally` statement
- jslint - allow aliases `evil, nomen` for jslint-directives `eval, name`, respectively
- bugfix - fix broken codemirror example
@kaizhu256 kaizhu256 merged commit 878a573 into jslint-org:beta Jun 20, 2022
@kaizhu256 kaizhu256 deleted the directive_subscript branch June 20, 2022 19:48
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

Successfully merging this pull request may close these issues.

None yet

1 participant