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

JSLint doesn't recognize a .catch() as a valid operator to follow a .then() of a dynamic import promise #316

Closed
tmb-github opened this issue Jun 8, 2021 · 1 comment

Comments

@tmb-github
Copy link

tmb-github commented Jun 8, 2021

JSLint edition v2021.6.4-beta
Options selected: [x] in development [x] in browser

JSLint doesn't recognize a .catch() as a valid operator to follow a .then() of a dynamic import promise:

var o = {};

import("./common.mjs").then(function ({default: object}) {
    o.first = object;
}).catch(function (error) {
    console.log(error);
});

Error message:

[JSLint was unable to finish] Unexpected '.'.

kaizhu256 added a commit to kaizhu256/jslint that referenced this issue Jun 8, 2021
…s about dynamic-import.

- bugfix - fix off-by-one-column bug in missing-semicolon-warning.
kaizhu256 added a commit to kaizhu256/jslint that referenced this issue Jun 8, 2021
…s about dynamic-import.

- bugfix - fix off-by-one-column bug in missing-semicolon-warning.
kaizhu256 added a commit to kaizhu256/jslint that referenced this issue Jun 8, 2021
…s about dynamic-import.

- bugfix - fix off-by-one-column bug in missing-semicolon-warning.
kaizhu256 added a commit that referenced this issue Jun 8, 2021
…rt. (#318)

- bugfix - fix off-by-one-column bug in missing-semicolon-warning.
@kaizhu256
Copy link
Member

should be fixed now. thx for reporting,

kaizhu256 added a commit to kaizhu256/jslint that referenced this issue Jun 13, 2021
- bugfix - fix await expression/statement inside catch-statement not registered by functionage.await.
- bugfix - fix cli appending slash "/" to normalized filename.
- bugfix - fix issue jslint-org#316, jslint-org#317 - jslint complains about dynamic-import.
- bugfix - fix misleading warning describing alphabetical-order instead of ascii-order.
- bugfix - fix off-by-one-column bug in missing-semicolon-warning.
- bugfix - fix try-catch-block complaining about "Unexpected await" inside async-function.
- directive - re-introduce `/*jslint name*/` to ignore "Bad property name" warning.
- doc - add install-screenshots.
- jslint - add new warning if case-statements are not sorted.
- jslint - add warning for unexpected ? in example `aa=/.{0}?/`.
- jslint - add warning for unexpected-expr in example `async function aa(){await 0;}`.
- jslint-refactor-1 - make "stateful" variables scoped outside of jslint() "stateless" by moving them into jslint().
- jslint-refactor-2 - inline constants anticondition, bitwiseop, escapeable, and opener directly into code.
- jslint-refactor-3 - inline regexp-functions quantifier(), ranges(), klass(), choice(), directly into code.
- jslint-refactor-4 - document jslint process and each recursion-loop converted to while-loop.
    - remove unnecessary variables nr.
    - rename artifact-related variables a, b to let artifact_now, artifact_nxt.
    - rename functions make() to token_create().
    - reorganize/rename "global" variables by topical-prefixes:
        artifact_xxx, export_xxx, from_xxx, import_xxx, line_xxx, mode_xxx, token_xxx
- jslint-refactor-5 - split jslint-core-logic into 5-phases.
    - move phase-sub-functions out of function-jslint().
    - move global-vars into state-object, that can be passed between functions.
    - migrate recursive-loops to while-loops in sub-function phase2_lex().
    - move remaining global-vars into sub-functions or hardcode.
    - update functions artifact(), stop(), warn() with fallback-code `the_token = the_token || state.token_nxt;`.
- website - add ui-loader-animation.
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

2 participants