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

[Bug]: Linting fails on v8.0.0 javascript projects #11457

Closed
1 task done
Josh-Walker-GM opened this issue Sep 6, 2024 · 1 comment · Fixed by #11458
Closed
1 task done

[Bug]: Linting fails on v8.0.0 javascript projects #11457

Josh-Walker-GM opened this issue Sep 6, 2024 · 1 comment · Fixed by #11458
Assignees
Labels
bug/confirmed We have confirmed this is a bug topic/cli

Comments

@Josh-Walker-GM
Copy link
Collaborator

What's not working?

yarn rw lint fails with the following error:

/Users/jgmw/Development/redwood/rw-test/v8-javascript/api/src/lib/auth.js
  23:31  error  'roles' is defined but never used. Allowed unused args must match /^_/u  no-unused-vars

/Users/jgmw/Development/redwood/rw-test/v8-javascript/web/src/App.jsx
  9:2  error  Parsing error: This experimental syntax requires enabling one of the following parser plugin(s): "jsx", "flow", "typescript". (9:2)

/Users/jgmw/Development/redwood/rw-test/v8-javascript/web/src/Routes.jsx
  14:4  error  Parsing error: This experimental syntax requires enabling one of the following parser plugin(s): "jsx", "flow", "typescript". (14:4)

/Users/jgmw/Development/redwood/rw-test/v8-javascript/web/src/entry.client.jsx
  24:4  error  Parsing error: This experimental syntax requires enabling one of the following parser plugin(s): "jsx", "flow", "typescript". (24:4)

/Users/jgmw/Development/redwood/rw-test/v8-javascript/web/src/pages/FatalErrorPage/FatalErrorPage.jsx
  15:4  error  Parsing error: This experimental syntax requires enabling one of the following parser plugin(s): "jsx", "flow", "typescript". (15:4)

/Users/jgmw/Development/redwood/rw-test/v8-javascript/web/src/pages/NotFoundPage/NotFoundPage.jsx
  2:2  error  Parsing error: This experimental syntax requires enabling one of the following parser plugin(s): "jsx", "flow", "typescript". (2:2)

✖ 6 problems (6 errors, 0 warnings)

This occurs for the default redwood template when you select javascript over typescript.

How do we reproduce the bug?

  • yarn create redwood-app
  • select javascript
  • yarn rw lint

What's your environment? (If it applies)

System:
    OS: macOS 14.6.1
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.16.0 - /private/var/folders/zb/kc7f0z2d6973pg1p0pjz5nhm0000gn/T/xfs-ba1c093d/node
    Yarn: 4.4.0 - /private/var/folders/zb/kc7f0z2d6973pg1p0pjz5nhm0000gn/T/xfs-ba1c093d/yarn
  Databases:
    SQLite: 3.43.2 - /usr/bin/sqlite3
  Browsers:
    Chrome: 128.0.6613.120
    Safari: 17.6
  npmPackages:
    @redwoodjs/core: 8.0.0 => 8.0.0 
    @redwoodjs/project-config: 8.0.0 => 8.0.0 
  redwood.toml:
    [web]
      title = "Redwood App"
      port = 8910
      apiUrl = "/.redwood/functions" # You can customize graphql and dbauth urls individually too: see https://redwoodjs.com/docs/app-configuration-redwood-toml#api-paths
      includeEnvironmentVariables = [
        # Add any ENV vars that should be available to the web side to this array
        # See https://redwoodjs.com/docs/environment-variables#web
      ]
    [api]
      port = 8911
    [browser]
      open = true
    [notifications]
      versionUpdates = ["latest"]

Are you interested in working on this?

  • I'm interested in working on this
@Josh-Walker-GM Josh-Walker-GM added the bug/confirmed We have confirmed this is a bug label Sep 6, 2024
@Josh-Walker-GM Josh-Walker-GM self-assigned this Sep 6, 2024
@Josh-Walker-GM Josh-Walker-GM moved this from Backlog to Ready in Bighorn Development Sep 6, 2024
Josh-Walker-GM added a commit that referenced this issue Sep 6, 2024
…ojects (#11458)

Fixes #11457 

In #10867 I removed the presets by default and they are only included in
specific cases - for jest, for prerender. It looks like I forgot to
consider the case of linting javascript projects. I therefore re-enable
these presets in that specific case.

It's already on my medium term wish list to simplify and rip out as much
of our babel config/reliance as we can. It would be better if this was
all just simpler and didn't have as many branches.

I also introduced a copy of `isTypeScriptProject` into
`@redwoodjs/project-config`. It doesn't add any dependencies to that
package and it relies on the functionality already provided in it. I
will make a note to refactor our existing usage to use this one. I think
that would be better.
@github-project-automation github-project-automation bot moved this from Ready to Done in Bighorn Development Sep 6, 2024
Josh-Walker-GM added a commit that referenced this issue Sep 6, 2024
…ojects (#11458)

Fixes #11457 

In #10867 I removed the presets by default and they are only included in
specific cases - for jest, for prerender. It looks like I forgot to
consider the case of linting javascript projects. I therefore re-enable
these presets in that specific case.

It's already on my medium term wish list to simplify and rip out as much
of our babel config/reliance as we can. It would be better if this was
all just simpler and didn't have as many branches.

I also introduced a copy of `isTypeScriptProject` into
`@redwoodjs/project-config`. It doesn't add any dependencies to that
package and it relies on the functionality already provided in it. I
will make a note to refactor our existing usage to use this one. I think
that would be better.
@michalgm
Copy link

I can confirm updating to 8.1.0 fixed this issue - thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/confirmed We have confirmed this is a bug topic/cli
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants