Skip to content
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

Register export declaration in scope #77

Merged
merged 3 commits into from
Feb 17, 2023

Conversation

oleg-rdk
Copy link
Contributor

Fixes #74

src/index.js Show resolved Hide resolved
pre() {
console.warn = (msg) => { throw new Error(`Got console.warn: ${msg}`); };
},
}),
Copy link
Contributor Author

@oleg-rdk oleg-rdk Apr 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if some plugin call console.warn - fail the transformation. Inspired by test added to transform-typescript plugin
¯\_(ツ)_/¯

src/index.js Outdated Show resolved Hide resolved
src/index.js Outdated Show resolved Hide resolved
[transformTs, { isTSX: true }],
() => ({
pre() {
console.warn = (msg) => { throw new Error(`Got console.warn: ${msg}`); };
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.warn = (msg) => { throw new Error(`Got console.warn: ${msg}`); };
console.warn = function warn(msg) { throw new Error(`Got console.warn: ${msg}`); };

this seems worth adding to every test?

@pushred
Copy link

pushred commented Jun 7, 2021

@oleg-rdk do you plan to revisit this PR? The warning is super annoying =)

@ljharb
Copy link
Collaborator

ljharb commented Jun 8, 2021

If not, someone who wants it to land can post a link (not a new PR) to a branch or commit that rebases and accounts for review comments, and I’ll pull it into this PR.

@briganti
Copy link
Contributor

@ljharb I have pulled @oleg-rdk's branch, rebase it on master and tackle your comments: https://github.com/briganti/babel-plugin-inline-react-svg/commits/fix-declaration-warning

let me know if you need anything, I too need this PR released 🙂

@briganti
Copy link
Contributor

briganti commented Jan 5, 2022

@lencioni sorry to drag you in this, but I've noticed you also have contributed to this project. is there anything you can do to make this fix merged? I would really appreciate it.

@ljharb
Copy link
Collaborator

ljharb commented Jan 5, 2022

@briganti I haven't gotten to it yet, is all, but will do so soon.

@merlindru
Copy link

Would be happy to contribute to this as well! Anything I can do to help this get landed?

@simleb
Copy link

simleb commented Sep 10, 2022

👋 I'm happy to help too but it seems @briganti's branch is still as ready as ever. So this is just a friendly reminder about this PR that I'd also like to see merged! 😃

… `eslint`, `eslint-config-airbnb`, `eslint-plugin-import`, `eslint-plugin-jsx-a11y`, `eslint-plugin-react`
@ljharb ljharb force-pushed the fix-declaration-warning branch from 8dc7d6b to 66dfa52 Compare September 11, 2022 05:40
@ljharb ljharb marked this pull request as ready for review September 11, 2022 05:40
@ljharb
Copy link
Collaborator

ljharb commented Sep 11, 2022

This PR is now good to go on its own, but is blocked for the same reason as #116 (comment).

@simleb
Copy link

simleb commented Feb 16, 2023

@ljharb is this (and #116) unblocked now that #117 merged?

@ljharb ljharb force-pushed the fix-declaration-warning branch from 66dfa52 to 6e130a5 Compare February 17, 2023 22:52
@ljharb ljharb merged commit 6e130a5 into airbnb:master Feb 17, 2023
@simleb
Copy link

simleb commented Feb 22, 2023

@ljharb sorry to keep bugging you but would it be possible to tag a new version now that a few PRs (including this one) have been merged?

@ljharb
Copy link
Collaborator

ljharb commented Feb 22, 2023

@simleb i just got permissions sorted out yesterday so that i can release; i'll try to do that in the next couple days.

@ljharb
Copy link
Collaborator

ljharb commented Feb 23, 2023

v2.0.2 is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SVG identifier is not declared in Babel's scope tracker as a JavaScript value binding
6 participants