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

Getting lint error in latest version of language-tags #15

Closed
manju-s opened this issue Dec 2, 2022 · 19 comments
Closed

Getting lint error in latest version of language-tags #15

manju-s opened this issue Dec 2, 2022 · 19 comments

Comments

@manju-s
Copy link

manju-s commented Dec 2, 2022

Hey Matt,
After the release of version 1.0.6 eslint is picking up a Syntax error which is casuing our build to fail (screenshot below).
When i lock the version to 1.0.5, the error goes away. Can you please look into it, or suggest a fix if it can be done from the consumer side.
Thanks
image

mattcg added a commit that referenced this issue Dec 2, 2022
@mattcg
Copy link
Owner

mattcg commented Dec 2, 2022

Hi manju, thanks for filing. I'm not really sure why this is an issue because static class fields are part of the ECMAScript standard. It seems that jshint is missing support for them even though they're standard. See: jshint/jshint/issues/3139

In the meantime it might make sense to exclude /node_modules from your linter.

@enkhtulga
Copy link

Any update for it? How to resolve it?

@enkhtulga
Copy link

@manju-s did you resolve the issue?

@mattcg mattcg closed this as completed in a99f5cf Dec 15, 2022
@mattcg
Copy link
Owner

mattcg commented Dec 15, 2022

I added an eslint config block to the package config file and bumped the version to 1.0.7 on npm. Can you retest? I no longer get any errors with eslint lib/.

@manju-s
Copy link
Author

manju-s commented Dec 15, 2022

I added an eslint config block to the package config file and bumped the version to 1.0.7 on npm. Can you retest? I no longer get any errors with eslint lib/.

image

Still getting the same error Matt

@mattcg
Copy link
Owner

mattcg commented Dec 15, 2022

I guess that's because your linter isn't picking up the block in language-tags/package.json.

Shouldn't your linter configuration be ignoring the node_modules/ directory? Sure you only want to lint your own code and not that of third party modules?

Alternatively, if you also want to lint node_modules/, you'll have to set "ecmaVersion": 13 in your eslint configuration.

Unless you do that, there's nothing more I can do to fix this issue.

@manju-s
Copy link
Author

manju-s commented Dec 16, 2022

I guess that's because your linter isn't picking up the block in language-tags/package.json.

Shouldn't your linter configuration be ignoring the node_modules/ directory? Sure you only want to lint your own code and not that of third party modules?

Alternatively, if you also want to lint node_modules/, you'll have to set "ecmaVersion": 13 in your eslint configuration.

Unless you do that, there's nothing more I can do to fix this issue.

Yes Matt, node_modules is added in eslintignore but for some reason it isn't working. Anyway, thanks for the help, please update if any additional fixes are made.

@afc163
Copy link

afc163 commented Dec 19, 2022

https://github.com/cnpm/bug-versions/pull/217/files

language-tags 1.0.6 and 1.0.7 cannot work on node version like 1.0.5. Is it a better way to release a major version?

@mattcg
Copy link
Owner

mattcg commented Dec 19, 2022

Which nodejs version are you saying it doesn’t work in?

@ljharb
Copy link
Contributor

ljharb commented Jan 9, 2023

@mattcg this is a breaking change in a patch version. v1.0.5 works in node 6; v1.0.6 does not (for example, becuase of the spread operator - babel could fix this for you). This breaks eslint-plugin-jsx-a11y.

Can you please publish a v1.0.8 that restores these node versions, and if you like, publish a v2 that drops them?

ljharb added a commit to JoshuaKGoldberg/eslint-plugin-jsx-a11y that referenced this issue Jan 9, 2023
@ljharb
Copy link
Contributor

ljharb commented Jun 13, 2023

ping @mattcg; there's still a breaking change in a patch version in v1.0.6 and v1.0.7.

@mattcg
Copy link
Owner

mattcg commented Jun 13, 2023

Wait, why would anyone be running node 6?

@ljharb
Copy link
Contributor

ljharb commented Jun 13, 2023

All of my packages support as far back as possible, most down to node 0.4, but that’s irrelevant - semver applies to engine support. If you want to drop node 6 in a major, that’s fine, but not in a patch.

@mattcg
Copy link
Owner

mattcg commented Jun 14, 2023

Makes sense. How do you recommend to fix this?

@ljharb
Copy link
Contributor

ljharb commented Jun 14, 2023

I suspect if you adjust your babel config to target the lowest version of node that language-tags v1 supports - which since it lacks an engines declaration, is basically 0.4 or 0.6 - that it'd Just Work without any source code changes.

@ljharb
Copy link
Contributor

ljharb commented Aug 11, 2023

@mattcg are you interested in a PR for this? eslint-plugin-jsx-a11y is still pinned to v1.0.5.

@mattcg
Copy link
Owner

mattcg commented Aug 12, 2023 via email

@ljharb
Copy link
Contributor

ljharb commented Aug 14, 2023

@mattcg awesome! first is #17; once that's landed i'll put up one that adds babel.

@ljharb
Copy link
Contributor

ljharb commented Aug 15, 2023

#17#18#19

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

No branches or pull requests

5 participants