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
Dynamic Imports and BigInt have arrived at Stage 4 🎉
#11803
Comments
I have opened an issue at Acorn's repo: acornjs/acorn#833 . |
While this gets implemented (thank you!), is there a way to get around it with an ignore?
you get:
The problem is that this is a parsing error... so the file doesn't get linted at all. |
You can use |
I'm trying to be babel-free. Please revisit #11189 as well. |
Don't worry. Dynamic imports will be supported by ESLint itself finally. However, this is still in progress, so you need |
Yeah, it's working in progress. As the issue description says, we are awaiting ESTree spec to be determined because we cannot implement it until the spec gets stable. |
I guess
This rule disallows
|
Oh, you are right. |
We are still awaiting ESTree's decide. I'm wondering that we should fork the AST spec because that PR has been inactive since two months ago. |
Yay, that PR has been merged! |
acornjs/acorn#844 has been merged too |
#11802 has also been merged |
eslint/eslint-visitor-keys#8 has also been merged! |
Now that we have estree/estree@9a38106 in ESTree spec, what is the status of this issue? |
@NemoStein Please look at the task list in the initial post. At this point, we have updated espree and just need to release espree and consume in ESLint, and then we can review and merge PRs like #11983. I'm hoping we can make big strides in this area for our users with the upcoming ESLint minor release sometime this weekend. But I can't promise anything. |
* upgrade deps * make CodePathAnalyzer handling ImportExpression as throwable * fix new-cap rule * fix astUtils.getPrecedence * fix astUtils.isNullLiteral * add env.es2020 * fix func-call-spacing rule * fix function-paren-newline rule * fix indent rule * fix no-extra-parens rule * Upgrade: espree@^6.1.0, eslint-visitor-keys@^1.1.0 * Chore: Ignore tools/internal-rules/node_modules * Upgrade: acorn@^7.0.0 This avoids a dependency deduplication conflict for developers
I noticed today that dynamic imports now works with the latest eslint release, even though this issue has not been updated. |
Hi,
Do they? From master, or npm?
Merc.
…On Sun., 1 Sep. 2019, 3:13 pm Jesper Kristensen, ***@***.***> wrote:
I noticed today that dynamic imports now works with the latest eslint
release, even though this issue has not been updated.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#11803?email_source=notifications&email_token=AAQHWXSQJNYFR5Y42HDQAVDQHNTQRA5CNFSM4HS4GGTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5T4EIQ#issuecomment-526893602>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAQHWXRZWPVRNMWFGFTKFGDQHNTQRANCNFSM4HS4GGTA>
.
|
This issue is updated. See the issue description; we have not done the last item "ESLint Update 2: the following stuff look like to need update, but breaking changes.", we will do it on 7.0.0 release. The syntax support is not completed, but you can use |
Oh, the issue was updated, it's just GitHub that only sends notifications when a new comment is added, but not when a comment is edited. |
Question: is everything except "ESLint Update 2: the following stuff look like to need update, but breaking changes." been released in the NPM distributed package? |
Yes. Those are in 6.2.0. |
Edit: This answered my question: #12310
Also, @mysticatea I'm probably missing something really obvious,
Thanks for the help! |
You are looking using old ESLint or at least old parser. Please open a new issue with our issue template. |
BigInt type doesn't have negative zero value? Object.is(-0n, 0n); // true So perhaps
This seems to already work by itself: I guess it works with a manually added |
It should probably warn on any occurrence if -0n |
* update no-magic-numbers to recognize bigint * update yoda to recognize bigint * add a no-extend-native test * update ci.yml temporary (this PR is blocked by #12700) * add astUtils.isNumericLiteral and use it in some rules * update no-dupe-class-members * update no-magic-number to support bigint in options * update some rules to use getStaticPropertyName * update quote-props * revert no-useless-computed-key change * revert "allowing {type: 'bigint'}" and update no-magic-number * no-magic-number 'ignores' allows negative bigint
…slint#12701) * update no-magic-numbers to recognize bigint * update yoda to recognize bigint * add a no-extend-native test * update ci.yml temporary (this PR is blocked by eslint#12700) * add astUtils.isNumericLiteral and use it in some rules * update no-dupe-class-members * update no-magic-number to support bigint in options * update some rules to use getStaticPropertyName * update quote-props * revert no-useless-computed-key change * revert "allowing {type: 'bigint'}" and update no-magic-number * no-magic-number 'ignores' allows negative bigint
Dynamic Imports and BigInt have arrived at Stage 4.
This is the tracking issue to support the new syntaxes.
eslint-visitor-keys
Updateespree
UpdateBigInt
,BigInt64Array
, andBigUint64Array
)CodePathAnalyzer
: should recognizeImportExpression
node as a throwable node.astUtils.getPrecedence(node)
: should recognizeImportExpression
literals.astUtils.isNullLiteral(node)
: should recognize BigInt literals.func-call-spacing
rule: should recognizeImportExpression
node. (or new rule?)function-paren-newline
rule: should recognizeImportExpression
node. (or new rule?)indent
rule: should recognizeImportExpression
node.new-cap
rule: should recognizeBigInt
function.no-extra-parens
rule: should recognizeImportExpression
node.valid-typeof
rule: should recognize BigInt type.no-compare-neg-zero
rule: should recognize BigInt literals.no-extend-native
rule: should recognizeBigInt
function.no-magic-number
rule: should recognize BigInt literals.yoda
rule: should recognize BigInt literals.The text was updated successfully, but these errors were encountered: