Skip to content

Docs: "Projects With Type Checking" missing parserOptions #11514

@thernstig

Description

@thernstig

Before You File a Documentation Request Please Confirm You Have Done The Following...

Suggested Changes

According to https://typescript-eslint.io/getting-started/typed-linting/ this needs to be added:

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';

export default tseslint.config(
  eslint.configs.recommended,
  tseslint.configs.recommendedTypeChecked,
  {
    languageOptions: {
      parserOptions: {
        projectService: true,
        tsconfigRootDir: import.meta.dirname,
      },
    },
  },
);

This is missing from https://typescript-eslint.io/users/configs/#projects-with-type-checking which only shows:

export default tseslint.config(
  eslint.configs.recommended,
  tseslint.configs.recommendedTypeChecked,
  tseslint.configs.stylisticTypeChecked,
);

There might be more places on that URL that maybe should show parserOptions for some of those configs.

Many users might Google and end up at that later URL, missing that important part.

Affected URL(s)

https://typescript-eslint.io/users/configs/#projects-with-type-checking

Additional Info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuedocumentationDocumentation ("docs") that needs adding/updating

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions