Enable logical assignment by default in @babel/parser
See original GitHub issueFeature Request
<div align="center">Logical Assignment (&&=
, ||=
, ??=
) is Stage 4!
This means that it should be enabled by default in @babel/parser
🎉
It should be done similarly to this commit: https://github.com/babel/babel/commit/c3388ea42f3ec2d9614503fd0eff81b679ba12a7
- Remove all the
this.hasPlugin
andthis.expectPlugin
checks related tologicalAssignment
inpackages/babel-parser/src
- Remove all the usages of
logicalAssignment
in@babel/parser
’s tests - Probably there is a test to ensure that the plugin is required; it can be removed.
- Move the tests from the
experimental
folder toes2021
, create one if it doesn’t exist - PR! 🎉
If it is the first time that you contribute to Babel, follow these steps: (you need to have make
and yarn
available on your machine)
- Write a comment there to let other possible contributors know that you are working on this bug.
- Fork the repo
- Run
git clone https://github.com/<YOUR_USERNAME>/babel.git && cd babel
- Run
yarn && make bootstrap
- Wait ⏳
- Run
make watch
(ormake build
whenever you change a file) - Add a test if needed (only
input.js
;output.js
will be automatically generated) - Update the code!
yarn jest babel-parser
to run the tests- If some test outputs don’t match but the new results are correct, you can delete the bad
output.js
files and run the tests again - If you prefer, you can run
OVERWRITE=true yarn jest babel-parser
and they will be automatically updated.
- If some test outputs don’t match but the new results are correct, you can delete the bad
- If it is working, run
yarn jest
to run all the tests - Run
git push
and open a PR!
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
babel/plugin-syntax-logical-assignment-operators
Instead, use plugin-proposal-logical-assignment-operators to both parse and transform this syntax.
Read more >@babel/plugin-proposal-logical-assignment-operators | Yarn
Transforms logical assignment operators into short-circuited assignments. babel-plugin. readme. babel. The compiler for writing next generation JavaScript.
Read more >@babel/plugin-syntax-logical-assignment-operators | npm | Open ...
@babel/plugin-syntax-logical-assignment-operators. check_circle. 7.10.4. Default version ... Description. Allow parsing of the logical assignment operators ...
Read more >babel/eslint-parser - NPM Package Versions - Socket.dev
Start using Socket to analyze @babel/eslint-parser and its 3 dependencies to secure your app from ... babel-plugin-proposal-logical-assignment-operators ...
Read more >@babel/runtime: Versions | Openbase
#14695 [parser] Make decoratorsBeforeExport default to false (@nicolo-ribaudo) ... #11876 enable logical assignment in babel preset env (@morrme) ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@pustovalov Thanks for showing up. A good first issue targets to first-time contributors. That said, if it is not claimed by a new contributor in the next 24 hours, it will be yours!
@vahnag no rush!