-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Stage 4 syntaxes in core rules #7101
Comments
maybe generator-star-spacing? https://github.com/babel/eslint-plugin-babel has an override for that |
|
Oh right, it was probably one of the rules you already mentioned then. Still need to fix it in babel-eslint. My mistake |
Hmm. I have a question: async () => 0
// │
// └ Should this space be warned by which rule?
//
// 1. keyword-spacing
// 2. space-before-function-paren
//
// By the way,
(function () {})
// │
// └ This space is warned by space-before-function-paren I guess |
@mysticatea Is |
Yes, |
I think this should be warned by For context, in my ideal world, I think |
I agree! In the ideal world, definitely
|
It looks like a new version of espree just came out with acorn 4.0.0, so our tests are now failing on master (example). |
Umm.. That's not good. That shouldn't be happening, since we haven't enabled ES2018 anywhere yet. I'll open a new issue for this. |
Oh, I have been late for the party. Thank you, @not-an-aardvark . |
Filled all items with PRs. |
I created #7307, which is a problem with the |
acorn
, the base ofespree
, has supported async/await and trailing function commas: Acorn 4.0.0espree
is going to support those, coming soon: eslint/espree#287Then, I'm starting to modify core rules to support those.
In my head, the following rules need some tweaks.
arrow-parens
handles async arrow functions correctly #7176 arrow-parens ... It has false positive/negative on async functions.keyword-spacing
supports async/await (refs #7101) #7179 keyword-spacing ... It has false positive/negative on async functions.no-extra-parens
supports async/await (refs #7101) #7178 no-extra-parens ... It should handle await expressions also by default.no-unused-expressions
#7175 no-unused-expressions ... It should handle await expressions also by default.prefer-arrow-callback
fixer #7173 prefer-arrow-callback ... It has wrong autofix on async functions.space-before-function-paren
supports async/await (refs #7101) #7180 space-before-function-paren ... It should handle async arrow functions (as anonymous function?).async(a) => a
.space-unary-ops
to handle await expressions #7174 space-unary-ops ... It should handle await expressions. It has handled yield expressions already.array-callback-return
#7172 array-callback-return ... I think should not warn async functions as callbacks.Promise.all(list.map(async x => { await doSomething(x) })
is legal usage.comma-dangle
supports trailing function commas (refs #7101) #7181 comma-dangle ... It should check functions also by opt-in.generator-star-spacing
and async (refs #7101) #7182 generator-star-spacing ... To make sure, it needs tests for async functions.Changelog:
space-before-function-paren
was added.space-unary-ops
was added.generator-star-spacing
was added.The text was updated successfully, but these errors were encountered: