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

fix: languageOptions.parser should be an object #220

Merged
merged 3 commits into from Aug 4, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 4 additions & 8 deletions src/flat-config/language-options.d.ts
@@ -1,9 +1,5 @@
import type {
EcmaVersion,
Parser,
ParserOptions,
SourceType,
} from '../parser-options';
import type { Linter } from 'eslint';
Shinigami92 marked this conversation as resolved.
Show resolved Hide resolved
import type { EcmaVersion, ParserOptions, SourceType } from '../parser-options';

/**
* An object containing settings related to how JavaScript is configured for linting
Expand Down Expand Up @@ -37,13 +33,13 @@ export interface LanguageOptions {
>;

/**
* Either an object containing a `parse()` method or a string indicating the name of a parser inside of a plugin (i.e., `"pluginName/parserName"`).
* An object containing a parse() or parseForESLint() method.
*
* @default "@/espree"
*
* @see [Configuring a custom parser and its options](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#configuring-a-custom-parser-and-its-options)
*/
parser?: Parser;
parser?: Linter.ParserModule;

/**
* An object specifying additional options that are passed directly to the `parser()` method on the parser. The available options are parser-dependent.
Expand Down