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

Install @babel/eslint-parser #266

Closed
blackfalcon opened this issue Nov 11, 2021 · 2 comments · Fixed by #265
Closed

Install @babel/eslint-parser #266

blackfalcon opened this issue Nov 11, 2021 · 2 comments · Fixed by #265
Assignees
Labels
Type: Bug Bug or Bug fixes

Comments

@blackfalcon
Copy link
Member

blackfalcon commented Nov 11, 2021

Describe the bug

When migrating repos, there are issues with bringing some code forward and our new eslint rules. This issue is specifically seen when all other @babel resources are removed as part of the deprecation of IE support as they are not needed to generate a legacy ES5 version of a bundled component.

To Reproduce

Steps to reproduce the behavior:

  1. Take any legacy repo
  2. Migrate to latest generator build
  3. Run build
  4. See error

Expected behavior

We need to allow for this legacy code to carry forward and still apply eslint rules.

Solution

Install @babel/eslint-parser

This issue was recently discovered with work done to auro-tokenlist and was recently seen again with a migration of auro-hyperlink.

@blackfalcon blackfalcon self-assigned this Nov 11, 2021
@blackfalcon blackfalcon mentioned this issue Nov 11, 2021
8 tasks
@blackfalcon blackfalcon linked a pull request Nov 11, 2021 that will close this issue
6 tasks
@geoffrich
Copy link
Contributor

The underlying issue in auro-tokenlist seemed to be using the newer null coalescing syntax, e.g. index.wcag?.ratio. I'd rather not add a babel dependency if we can avoid it. Can we update our ecmaVersion instead?

Updating the auro-tokenlist eslintrc to the following fixed the lint issue without installing @babel/eslint-parser as a dependency.

{
  "extends": ["@aurodesignsystem/eslint-config"],
  "parserOptions": {
    "ecmaVersion": "2020"
  }
}

@blackfalcon
Copy link
Member Author

Well... this is getting interesting. It turns out that this addition is not the fix after all. I also just discovered that linters have been silently failing for some time now as the jsdoc linter isn't installed by default. e42b62f

Closing this issue. The real issue now is

When linting something other than CSS, you should install an appropriate syntax, e.g. "postcss-scss", and use the "customSyntax" optio

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

Successfully merging a pull request may close this issue.

2 participants