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

Docs: no-unused-vars occurs on function type argument, in basic example #8045

Open
moeyashi opened this issue Apr 26, 2024 · 0 comments
Open
Assignees
Labels
area: examples Improvements or additions to examples owned-by: turborepo

Comments

@moeyashi
Copy link

What is the improvement or update you wish to see?

I want to avoid errors with the following definition

export type Add = (x: number, y: number) => number;

Is there any context that might help us understand?

I started with the basic example (https://github.com/vercel/turbo/tree/main/examples/basic).

Defining a function type like the one above will result in an error eslint(no-unused-vars).

I believe this behavior is inappropriate and needs to be fixed.

I know that this can be solved by changing the file at https://github.com/vercel/turbo/blob/main/examples/basic/apps/web/.eslintrc.js as follows

/** @type {import("eslint").Linter.Config} */
module.exports = {
  root: true,
  extends: [
    "@repo/eslint-config/next.js",
    "plugin:@typescript-eslint/recommended",
  ],
  parser: "@typescript-eslint/parser",
  parserOptions: {
    project: true,
  },
  plugins: ["@typescript-eslint"],
};

I'm new to monorepo development, so I'd like to ask here what's the appropriate file to change and how.

I'll also leave a capture of the error here.

スクリーンショット 2024-04-26 161417

Does the docs page already exist? Please link to it.

https://turbo.build/repo/docs/getting-started/from-example

@mehulkar mehulkar added area: examples Improvements or additions to examples owned-by: turborepo needs: triage New issues get this label. Remove it after triage and removed needs: triage New issues get this label. Remove it after triage labels Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: examples Improvements or additions to examples owned-by: turborepo
Projects
None yet
Development

No branches or pull requests

3 participants