Comments (9)
Looking at usage patterns, I think I'd also like to make a small change:
- Add a
modules
feature flag that just enables import/export declarations and switches the parser into strict mode. - Make
sourceType = "module"
turn on every ES6 feature flag, includingmodules
.
I think that gives us both parity with Esprima and the configurability some have asked for in ESLint.
from espree.
ha, I told you so!, lets roll with that, should be flexible enough. I wonder if the inverse will be possible. Using sourceType="module"
with class
disabled. This is sort of a requirement that we have at Yahoo, where we want to focus on zero-cost abstraction features only rather than all. e.g.: we want to use modules but we don't want to use let
.
from espree.
Yup, you were right.
I think in this model, you can use sourceType="module"
and then set classes
to false explicitly to achieve what you want.
from espree.
👍
from espree.
I'll take a stab at the feature flag, then we can attack the other pieces.
from espree.
Oh I have PRs for the last 2 I can open I think...not sure how I missed this thread!
from espree.
Working on tests for sourceType="module"
from espree.
Wow, this is a really good test. Uncovered a few issues.
from espree.
All done!
from espree.
Related Issues (20)
- 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
- Bug: `scope-manager` does not support the `ecmaVersion` option set to "latest." HOT 6
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.