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

Semicolons after export statements are optional. #282

Closed
diachedelic opened this issue May 13, 2021 · 2 comments · Fixed by #301
Closed

Semicolons after export statements are optional. #282

diachedelic opened this issue May 13, 2021 · 2 comments · Fixed by #301

Comments

@diachedelic
Copy link

JSLint produces no warnings for the following program, yet the program is missing a trailing semicolon.

export default Object.freeze({})

This appears to be due to this if statement, which looks intentional.

kaizhu256 added a commit to kaizhu256/jslint that referenced this issue May 28, 2021
kaizhu256 added a commit to kaizhu256/jslint that referenced this issue May 28, 2021
kaizhu256 added a commit to kaizhu256/jslint that referenced this issue May 28, 2021
kaizhu256 added a commit that referenced this issue May 28, 2021
…ult Object.freeze({})`. (#301)

- bugfix - fix #282 - fail to warn trailing semicolon in `export default Object.freeze({})`.
@kaizhu256
Copy link
Member

thx. fixed in pr #301 with regression-test

@diachedelic
Copy link
Author

Thanks!

kaizhu256 added a commit to kaizhu256/jslint that referenced this issue May 30, 2021
- bugfix - fix issue jslint-org#282 - fail to warn trailing semicolon in `export default Object.freeze({})`.
- ci - 100% code-coverage!
- ci - auto-update changelog in README.md from CHANGELOG.md.
- ci - auto-update version numbers in README.md and jslint.js from CHANGELOG.md.
- deadcode - replace with assertion-check in function choice() - `if (char === "|") { warn... }`.
- deadcode - replace with assertion-check in function do_function() - `if (mega_mode) { warn... }`.
- deadcode - replace with assertion-check in function no_space() - `const at = (free ? ...)`.
- deadcode - replace with assertion-check in function no_space() - `if (open) {...}`.
- deadcode - replace with assertion-check in function parse_directive() - `} else if (value === "false") {...}`.
- deadcode - replace with assertion-check in function supplant() - `return ( replacement !== undefined ?...)`.
- jslint - cleanup regexp code using switch-case-statements.
- jslint - inline function `activate` into function `action_var`.
- jslint - inline-document each deadcode-removal/assertion-check.
- jslint - inline-document each warning with cause that can reproduce it - part 2.
- tests - inline remaining causal-regressions from test.js into jslint.js
- tests - validate inline-multi-causes are sorted.
- website - replace links `branch.xxx` with `branch-xxx`.
kaizhu256 added a commit that referenced this issue May 30, 2021
v2021.5.30 - 100% code-coverage and bugfix #282 (failure to enforce semicolon in export-statement)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants