Comments (21)
+1
from espree.
ES6 progress is being tracked here: #10
from espree.
Oops, hit enter too soon. We will be adding each ES6 feature from Esprima piece by piece. Module will likely be last unless someone submits a PR.
from espree.
Well, there's not even a bullet point for it in #10's checklist currently.
from espree.
Thanks, I just added it.
from espree.
@nzakas I can probably take care of the modules grammar as I did for esprima a while ago.
from espree.
from espree.
👍
from espree.
👍
from espree.
😍
from espree.
@caridy awesome, we'd appreciate the contribution.
from espree.
ok, I got a chance to put some time on this last night, and a questions arise:
In esprima, we introduced {sourceType: "module"}
, which defines extra.isModule
flag to signal to esprima that is should enforce strict mode
, and should enable export/import declarations.
In espree, it seems that extra.ecmaFeatures.<something>
will be the way to switch modules on. The problem is that enabling modules implies enabling other features as per the modules' grammar, e.g.: import let foo = 1;
, which requires blockBindings
to be available. Is there a provision to define dependencies between features? My proposal will be to add a provision similar to {sourceType: "module"}
, which will flip multiple features under extra.ecmaFeatures
, in this case, modules and blockBindings
, and eventually classes.
from espree.
I think having sourceType: "module"
is the right choice, both for Esprima compatibility and also because I don't like the idea of ecmaFeatures
having dependencies on one another.
So +1 to your proposal.
from espree.
Interested too by import/export support in espree :)
from espree.
👍
from espree.
👍 This is awesome. When can we expect it to get published to npm?
from espree.
When the work has been done. :)
I appreciate everyone's enthusiasm, but there's no need for additional +1ing. We're doing our best to get this done and this issue will be closed when the work is complete.
from espree.
You're awesome <3
from espree.
Does eslint-babel can help in this issue?
from espree.
+1
from espree.
@ai, eslint-babel doesn't support it properly either. Given:
import foo as 'foo';
foo.bar();
currently results in:
3:1 error 'foo' is not defined no-undef
from espree.
Related Issues (20)
- Please export `TokenTranslator` for reusing outside for ESLint plugins HOT 4
- Error parsing file starting with '#!/usr/bin/env node' HOT 2
- support import assertions HOT 1
- as token type: Identifier -> Punctuator HOT 3
- How to use from a script tag? HOT 1
- Not able to access parent node from current node. HOT 2
- Set up release-please HOT 1
- Set up scripts/lint-staged to match those in eslint repo HOT 3
- remove sourcemap url HOT 7
- typing for parse() HOT 1
- Support for `using` keyword HOT 1
- # ⚠️ npm 6.x no extra double-dash: npm init @eslint/config --config semistandard HOT 2
- add npm install step to release-please workflow (#573) (d8900c1) run tests on Node.js v20 (#571) (adf478e) set up release-please (#569) (abda10f) upgrade [email protected] (#574) (8e73f11) HOT 1
- Invalid regular expression flag HOT 2
- 9 Failing tests on project install HOT 1
- espree improvements as an acorn plugin extension [RFC] HOT 1
- Is it possible to configure tokenize method to return hyphenated word as one token? HOT 1
- Not ES2020 HOT 1
- Convert into monorepo HOT 16
- Change Request: replace `npm-run-all` by `npm-run-all2` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from espree.