<
8000
script type="application/json" data-target="react-app.embeddedData">{"payload":{"allShortcutsEnabled":false,"path":"packages/parser","repo":{"id":386675592,"defaultBranch":"master","name":"typescript-eslint","ownerLogin":"ivliag","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2021-07-16T15:02:49.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/2974415?v=4","public":true,"private":false,"isOrgOwned":false},"currentUser":null,"refInfo":{"name":"master","listCacheKey":"v0:1629496017.880053","canEdit":false,"refType":"branch","currentOid":"75dcf6942286f6ad3b507e469d160dc526cc7274"},"tree":{"items":[{"name":"src","path":"packages/parser/src","contentType":"directory"},{"name":"tests","path":"packages/parser/tests","contentType":"directory"},{"name":"CHANGELOG.md","path":"packages/parser/CHANGELOG.md","contentType":"file"},{"name":"LICENSE","path":"packages/parser/LICENSE","contentType":"file"},{"name":"README.md","path":"packages/parser/README.md","contentType":"file"},{"name":"jest.config.js","path":"packages/parser/jest.config.js","contentType":"file"},{"name":"package.json","path":"packages/parser/package.json","contentType":"file"},{"name":"tsconfig.build.json","path":"packages/parser/tsconfig.build.json","contentType":"file"},{"name":"tsconfig.json","path":"packages/parser/tsconfig.json","contentType":"file"}],"templateDirectorySuggestionUrl":null,"readme":{"displayName":"README.md","richText":"\u003carticle class=\"markdown-body entry-content container-lg\" itemprop=\"text\"\u003e\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch1 align=\"center\" tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eTypeScript ESLint Parser\u003c/h1\u003e\u003ca id=\"user-content-typescript-eslint-parser\" class=\"anchor\" aria-label=\"Permalink: TypeScript ESLint Parser\" href=\"#typescript-eslint-parser\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp align=\"center\" dir=\"auto\"\u003eAn ESLint parser which leverages \u003ca href=\"https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/typescript-estree\"\u003eTypeScript ESTree\u003c/a\u003e to allow for ESLint to lint TypeScript source code.\u003c/p\u003e\n\u003cp align=\"center\" dir=\"auto\"\u003e\n \u003ca target=\"_blank\" rel=\"noopener noreferrer\" href=\"https://github.com/typescript-eslint/typescript-eslint/workflows/CI/badge.svg\"\u003e\u003cimg src=\"https://github.com/typescript-eslint/typescript-eslint/workflows/CI/badge.svg\" alt=\"CI\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\n \u003ca href=\"https://www.npmjs.com/package/@typescript-eslint/parser\" rel=\"nofollow\"\u003e\u003cimg src=\"https://camo.githubusercontent.com/a8ff4ddbf1c8509fe0d018a3b71fd58a405da879b1011c66a232ec72109ce551/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f40747970657363726970742d65736c696e742f7061727365722e7376673f7374796c653d666c61742d737175617265\" alt=\"NPM Version\" data-canonical-src=\"https://img.shields.io/npm/v/@typescript-eslint/parser.svg?style=flat-square\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\n \u003ca href=\"https://www.npmjs.com/package/@typescript-eslint/parser\" rel=\"nofollow\"\u003e\u003cimg src=\"https://camo.githubusercontent.com/e85dadb82d41b4893deec6d97c132fd07036c7844058ea27ad5daa33224375ae/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f646d2f40747970657363726970742d65736c696e742f7061727365722e7376673f7374796c653d666c61742d737175617265\" alt=\"NPM Downloads\" data-canonical-src=\"https://img.shields.io/npm/dm/@typescript-eslint/parser.svg?style=flat-square\" style=\"max-width: 100%;\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eGetting Started\u003c/h2\u003e\u003ca id=\"user-content-getting-started\" class=\"anchor\" aria-label=\"Permalink: Getting Started\" href=\"#getting-started\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003e\u003ca href=\"/ivliag/typescript-eslint/blob/master/docs/getting-started/linting/README.md\"\u003eYou can find our Getting Started docs here\u003c/a\u003e\u003c/strong\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThese docs walk you through setting up ESLint, this parser, and our plugin. If you know what you're doing and just want to quick start, read on...\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eQuick-start\u003c/h2\u003e\u003ca id=\"user-content-quick-start\" class=\"anchor\" aria-label=\"Permalink: Quick-start\" href=\"#quick-start\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eInstallation\u003c/h3\u003e\u003ca id=\"user-content-installation\" class=\"anchor\" aria-label=\"Permalink: Installation\" href=\"#installation\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"$ yarn add -D typescript @typescript-eslint/parser\n$ npm i --save-dev typescript @typescript-eslint/parser\"\u003e\u003cpre\u003e$ yarn add -D typescript @typescript-eslint/parser\n$ npm i --save-dev typescript @typescript-eslint/parser\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eUsage\u003c/h3\u003e\u003ca id=\"user-content-usage\" class=\"anchor\" aria-label=\"Permalink: Usage\" href=\"#usage\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eIn your ESLint configuration file, set the \u003ccode\u003eparser\u003c/code\u003e property:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-json notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"{\n \u0026quot;parser\u0026quot;: \u0026quot;@typescript-eslint/parser\u0026quot;\n}\"\u003e\u003cpre\u003e{\n \u003cspan class=\"pl-ent\"\u003e\"parser\"\u003c/span\u003e: \u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-pds\"\u003e\"\u003c/span\u003e@typescript-eslint/parser\u003cspan class=\"pl-pds\"\u003e\"\u003c/span\u003e\u003c/span\u003e\n}\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThere is sometimes an incorrect assumption that the parser itself is what does everything necessary to facilitate the use of ESLint with TypeScript. In actuality, it is the combination of the parser \u003cem\u003eand\u003c/em\u003e one or more plugins which allow you to maximize your usage of ESLint with TypeScript.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eFor example, once this parser successfully produces an AST for the TypeScript source code, it might well contain some information which simply does not exist in a standard JavaScript context, such as the data for a TypeScript-specific construct, like an \u003ccode\u003einterface\u003c/code\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThe core rules built into ESLint, such as \u003ccode\u003eindent\u003c/code\u003e have no knowledge of such constructs, so it is impossible to expect them to work out of the box with them.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eInstead, you also need to make use of one more plugins which will add or extend rules with TypeScript-specific features.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eBy far the most common case will be installing the \u003ca href=\"https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin\"\u003e\u003ccode\u003e@typescript-eslint/eslint-plugin\u003c/code\u003e\u003c/a\u003e plugin, but there are also other relevant options available such a \u003ca href=\"https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin-tslint\"\u003e\u003ccode\u003e@typescript-eslint/eslint-plugin-tslint\u003c/code\u003e\u003c/a\u003e.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eConfiguration\u003c/h2\u003e\u003ca id=\"user-content-configuration\" class=\"anchor\" aria-label=\"Permalink: Configuration\" href=\"#configuration\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThe following additional configuration options are available by specifying them in \u003ca href=\"https://eslint.org/docs/user-guide/configuring/language-options#specifying-parser-options\" rel=\"nofollow\"\u003e\u003ccode\u003eparserOptions\u003c/code\u003e\u003c/a\u003e in your ESLint configuration file.\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ts notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"interface ParserOptions {\n ecmaFeatures?: {\n jsx?: boolean;\n globalReturn?: boolean;\n };\n ecmaVersion?: number;\n\n jsxPragma?: string;\n jsxFragmentName?: string | null;\n lib?: string[];\n\n project?: string | string[];\n projectFolderIgnoreList?: string[];\n tsconfigRootDir?: string;\n extraFileExtensions?: string[];\n warnOnUnsupportedTypeScriptVersion?: boolean;\n\n program?: import('typescript').Program;\n}\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003einterface\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003eParserOptions\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\n \u003cspan class=\"pl-c1\"\u003eecmaFeatures\u003c/span\u003e?: \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\n \u003cspan class=\"pl-c1\"\u003ejsx\u003c/span\u003e?: \u003cspan class=\"pl-smi\"\u003eboolean\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e;\u003c/span\u003e\n \u003cspan class=\"pl-c1\"\u003eglobalReturn\u003c/span\u003e?: \u003cspan class=\"pl-smi\"\u003eboolean\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e;\u003c/span\u003e\n \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e;\u003c/span\u003e\n \u003cspan class=\"pl-c1\"\u003eecmaVersion\u003c/span\u003e?: \u003cspan class=\"pl-smi\"\u003enumber\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e;\u003c/span\u003e\n\n \u003cspan class=\"pl-c1\"\u003ejsxPragma\u003c/span\u003e?: \u003cspan class=\"pl-smi\"\u003estring\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e;\u003c/span\u003e\n \u003cspan class=\"pl-c1\"\u003ejsxFragmentName\u003c/span\u003e?: \u003cspan class=\"pl-smi\"\u003estring\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e|\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003enull\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e;\u003c/span\u003e\n \u003cspan class=\"pl-c1\"\u003elib\u003c/span\u003e?: \u003cspan class=\"pl-smi\"\u003estring\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e[\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e]\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e;\u003c/span\u003e\n\n \u003cspan class=\"pl-c1\"\u003eproject\u003c/span\u003e?: \u003cspan class=\"pl-smi\"\u003estring\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e|\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003estring\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e[\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e]\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e;\u003c/span\u003e\n \u003cspan class=\"pl-c1\"\u003eprojectFolderIgnoreList\u003c/span\u003e?: \u003cspan class=\"pl-smi\"\u003estring\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e[\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e]\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e;\u003c/span\u003e\n \u003cspan class=\"pl-c1\"\u003etsconfigRootDir\u003c/span\u003e?: \u003cspan class=\"pl-smi\"\u003estring\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e;\u003c/span\u003e\n \u003cspan class=\"pl-c1\"\u003eextraFileExtensions\u003c/span\u003e?: \u003cspan class=\"pl-smi\"\u003estring\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e[\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e]\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e;\u003c/span\u003e\n \u003cspan class=\"pl-c1\"\u003ewarnOnUnsupportedTypeScriptVersion\u003c/span\u003e?: \u003cspan class=\"pl-smi\"\u003eboolean\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e;\u003c/span\u003e\n\n \u003cspan class=\"pl-c1\"\u003eprogram\u003c/span\u003e?: \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e'typescript'\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eProgram\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e;\u003c/span\u003e\n\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ccode\u003eparserOptions.ecmaFeatures.jsx\u003c/code\u003e\u003c/h3\u003e\u003ca id=\"user-content-parseroptionsecmafeaturesjsx\" class=\"anchor\" aria-label=\"Permalink: parserOptions.ecmaFeatures.jsx\" href=\"#parseroptionsecmafeaturesjsx\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eDefault \u003ccode\u003efalse\u003c/code\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eEnable parsing JSX when \u003ccode\u003etrue\u003c/code\u003e. More details can be found \u003ca href=\"https://www.typescriptlang.org/docs/handbook/jsx.html\" rel=\"nofollow\"\u003ehere\u003c/a\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003eNOTE:\u003c/strong\u003e this setting does not affect known file types (\u003ccode\u003e.js\u003c/code\u003e, \u003ccode\u003e.jsx\u003c/code\u003e, \u003ccode\u003e.ts\u003c/code\u003e, \u003ccode\u003e.tsx\u003c/code\u003e, \u003ccode\u003e.json\u003c/code\u003e) because the TypeScript compiler has its own internal handling for known file extensions. The exact behavior is as follows:\u003c/p\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003eif \u003ccode\u003eparserOptions.project\u003c/code\u003e is \u003cem\u003enot\u003c/em\u003e provided:\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ccode\u003e.js\u003c/code\u003e, \u003ccode\u003e.jsx\u003c/code\u003e, \u003ccode\u003e.tsx\u003c/code\u003e files are parsed as if this is true.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003e.ts\u003c/code\u003e files are parsed as if this is false.\u003c/li\u003e\n\u003cli\u003eunknown extensions (\u003ccode\u003e.md\u003c/code\u003e, \u003ccode\u003e.vue\u003c/code\u003e) will respect this setting.\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003eif \u003ccode\u003eparserOptions.project\u003c/code\u003e is provided (i.e. you are using rules with type information):\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003ccode\u003e.js\u003c/code\u003e, \u003ccode\u003e.jsx\u003c/code\u003e, \u003ccode\u003e.tsx\u003c/code\u003e files are parsed as if this is true.\u003c/li\u003e\n\u003cli\u003e\u003ccode\u003e.ts\u003c/code\u003e files are parsed as if this is false.\u003c/li\u003e\n\u003cli\u003e\"unknown\" extensions (\u003ccode\u003e.md\u003c/code\u003e, \u003ccode\u003e.vue\u003c/code\u003e) \u003cstrong\u003eare parsed as if this is false\u003c/strong\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ccode\u003eparserOptions.ecmaFeatures.globalReturn\u003c/code\u003e\u003c/h3\u003e\u003ca id=\"user-content-parseroptionsecmafeaturesglobalreturn\" class=\"anchor\" aria-label=\"Permalink: parserOptions.ecmaFeatures.globalReturn\" href=\"#parseroptionsecmafeaturesglobalreturn\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eDefault \u003ccode\u003efalse\u003c/code\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThis options allows you to tell the parser if you want to allow global \u003ccode\u003ereturn\u003c/code\u003e statements in your codebase.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ccode\u003eparserOptions.ecmaVersion\u003c/code\u003e\u003c/h3\u003e\u003ca id=\"user-content-parseroptionsecmaversion\" class=\"anchor\" aria-label=\"Permalink: parserOptions.ecmaVersion\" href=\"#parseroptionsecmaversion\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eDefault \u003ccode\u003e2018\u003c/code\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eAccepts any valid ECMAScript version number:\u003c/p\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003eA version: es3, es5, es6, es7, es8, es9, es10, es11, ..., or\u003c/li\u003e\n\u003cli\u003eA year: es2015, es2016, es2017, es2018, es2019, es2020, ...\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp dir=\"auto\"\u003eThe value \u003cstrong\u003emust\u003c/strong\u003e be a number - so do not include the \u003ccode\u003ees\u003c/code\u003e prefix.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eSpecifies the version of ECMAScript syntax you want to use. This is used by the parser to determine how to perform scope analysis, and it affects the default\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ccode\u003eparserOptions.jsxPragma\u003c/code\u003e\u003c/h3\u003e\u003ca id=\"user-content-parseroptionsjsxpragma\" class=\"anchor\" aria-label=\"Permalink: parserOptions.jsxPragma\" href=\"#parseroptionsjsxpragma\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eDefault \u003ccode\u003e'React'\u003c/code\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThe identifier that's used for JSX Elements creation (after transpilation).\nIf you're using a library other than React (like \u003ccode\u003epreact\u003c/code\u003e), then you should change this value.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThis should not be a member expression - just the root identifier (i.e. use \u003ccode\u003e\"React\"\u003c/code\u003e instead of \u003ccode\u003e\"React.createElement\"\u003c/code\u003e).\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eIf you provide \u003ccode\u003eparserOptions.project\u003c/code\u003e, you do not need to set this, as it will automatically detected from the compiler.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ccode\u003eparserOptions.jsxFragmentName\u003c/code\u003e\u003c/h3\u003e\u003ca id=\"user-content-parseroptionsjsxfragmentname\" class=\"anchor\" aria-label=\"Permalink: parserOptions.jsxFragmentName\" href=\"#parseroptionsjsxfragmentname\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eDefault \u003ccode\u003enull\u003c/code\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThe identifier that's used for JSX fragment elements (after transpilation).\nIf \u003ccode\u003enull\u003c/code\u003e, assumes transpilation will always use a member of the configured \u003ccode\u003ejsxPragma\u003c/code\u003e.\nThis should not be a member expression - just the root identifier (i.e. use \u003ccode\u003e\"h\"\u003c/code\u003e instead of \u003ccode\u003e\"h.Fragment\"\u003c/code\u003e).\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eIf you provide \u003ccode\u003eparserOptions.project\u003c/code\u003e, you do not need to set this, as it will automatically detected from the compiler.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ccode\u003eparserOptions.lib\u003c/code\u003e\u003c/h3\u003e\u003ca id=\"user-content-parseroptionslib\" class=\"anchor\" aria-label=\"Permalink: parserOptions.lib\" href=\"#parseroptionslib\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eDefault \u003ccode\u003e['es2018']\u003c/code\u003e\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eFor valid options, see the \u003ca href=\"https://www.typescriptlang.org/tsconfig#lib\" rel=\"nofollow\"\u003eTypeScript compiler options\u003c/a\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eSpecifies the TypeScript \u003ccode\u003elib\u003c/code\u003es that are available. This is used by the scope analyser to ensure there are global variables declared for the types exposed by TypeScript.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eIf you provide \u003ccode\u003eparserOptions.project\u003c/code\u003e, you do not need to set this, as it will automatically detected from the compiler.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ccode\u003eparserOptions.project\u003c/code\u003e\u003c/h3\u003e\u003ca id=\"user-content-parseroptionsproject\" class=\"anchor\" aria-label=\"Permalink: parserOptions.project\" href=\"#parseroptionsproject\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eDefault \u003ccode\u003eundefined\u003c/code\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThis option allows you to provide a path to your project's \u003ccode\u003etsconfig.json\u003c/code\u003e. \u003cstrong\u003eThis setting is required if you want to use rules which require type information\u003c/strong\u003e. Relative paths are interpreted relative to the current working directory if \u003ccode\u003etsconfigRootDir\u003c/code\u003e is not set. If you intend on running ESLint from directories other than the project root, you should consider using \u003ccode\u003etsconfigRootDir\u003c/code\u003e.\u003c/p\u003e\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003eAccepted values:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"// path\nproject: './tsconfig.json';\n\n// glob pattern\nproject: './packages/**/tsconfig.json';\n\n// array of paths and/or glob patterns\nproject: ['./packages/**/tsconfig.json', './separate-package/tsconfig.json'];\"\u003e\u003cpre\u003e\u003cspan class=\"pl-c\"\u003e// path\u003c/span\u003e\nproject: \u003cspan class=\"pl-s\"\u003e'./tsconfig.json'\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e;\u003c/span\u003e\n\n\u003cspan class=\"pl-c\"\u003e// glob pattern\u003c/span\u003e\nproject: \u003cspan class=\"pl-s\"\u003e'./packages/**/tsconfig.json'\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e;\u003c/span\u003e\n\n\u003cspan class=\"pl-c\"\u003e// array of paths and/or glob patterns\u003c/span\u003e\nproject: \u003cspan class=\"pl-kos\"\u003e[\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e'./packages/**/tsconfig.json'\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e \u003cspan class=\"pl-s\"\u003e'./separate-package/tsconfig.json'\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e]\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e;\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003eIf you use project references, TypeScript will not automatically use project references to resolve files. This means that you will have to add each referenced tsconfig to the \u003ccode\u003eproject\u003c/code\u003e field either separately, or via a glob.\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003eTypeScript will ignore files with duplicate filenames in the same folder (for example, \u003ccode\u003esrc/file.ts\u003c/code\u003e and \u003ccode\u003esrc/file.js\u003c/code\u003e). TypeScri
8000
pt purposely ignore all but one of the files, only keeping the one file with the highest priority extension (the extension priority order (from highest to lowest) is \u003ccode\u003e.ts\u003c/code\u003e, \u003ccode\u003e.tsx\u003c/code\u003e, \u003ccode\u003e.d.ts\u003c/code\u003e, \u003ccode\u003e.js\u003c/code\u003e, \u003ccode\u003e.jsx\u003c/code\u003e). For more info see #955.\u003c/p\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cp dir=\"auto\"\u003eNote that if this setting is specified and \u003ccode\u003ecreateDefaultProgram\u003c/code\u003e is not, you must only lint files that are included in the projects as defined by the provided \u003ccode\u003etsconfig.json\u003c/code\u003e files. If your existing configuration does not include all of the files you would like to lint, you can create a separate \u003ccode\u003etsconfig.eslint.json\u003c/code\u003e as follows:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-json-comments notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"{\n // extend your base config so you don't have to redefine your compilerOptions\n \u0026quot;extends\u0026quot;: \u0026quot;./tsconfig.json\u0026quot;,\n \u0026quot;include\u0026quot;: [\n \u0026quot;src/**/*.ts\u0026quot;,\n \u0026quot;test/**/*.ts\u0026quot;,\n \u0026quot;typings/**/*.ts\u0026quot;,\n // etc\n\n // if you have a mixed JS/TS codebase, don't forget to include your JS files\n \u0026quot;src/**/*.js\u0026quot;\n ]\n}\"\u003e\u003cpre\u003e{\n \u003cspan class=\"pl-c\"\u003e\u003cspan class=\"pl-c\"\u003e//\u003c/span\u003e extend your base config so you don't have to redefine your compilerOptions\u003c/span\u003e\n \u003cspan class=\"pl-s\"\u003e\"extends\"\u003c/span\u003e: \u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-pds\"\u003e\"\u003c/span\u003e./tsconfig.json\u003cspan class=\"pl-pds\"\u003e\"\u003c/span\u003e\u003c/span\u003e,\n \u003cspan class=\"pl-s\"\u003e\"include\"\u003c/span\u003e: [\n \u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-pds\"\u003e\"\u003c/span\u003esrc/**/*.ts\u003cspan class=\"pl-pds\"\u003e\"\u003c/span\u003e\u003c/span\u003e,\n \u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-pds\"\u003e\"\u003c/span\u003etest/**/*.ts\u003cspan class=\"pl-pds\"\u003e\"\u003c/span\u003e\u003c/span\u003e,\n \u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-pds\"\u003e\"\u003c/span\u003etypings/**/*.ts\u003cspan class=\"pl-pds\"\u003e\"\u003c/span\u003e\u003c/span\u003e,\n \u003cspan class=\"pl-c\"\u003e\u003cspan class=\"pl-c\"\u003e//\u003c/span\u003e etc\u003c/span\u003e\n\n \u003cspan class=\"pl-c\"\u003e\u003cspan class=\"pl-c\"\u003e//\u003c/span\u003e if you have a mixed JS/TS codebase, don't forget to include your JS files\u003c/span\u003e\n \u003cspan class=\"pl-s\"\u003e\u003cspan class=\"pl-pds\"\u003e\"\u003c/span\u003esrc/**/*.js\u003cspan class=\"pl-pds\"\u003e\"\u003c/span\u003e\u003c/span\u003e\n ]\n}\u003c/pre\u003e\u003c/div\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ccode\u003eparserOptions.tsconfigRootDir\u003c/code\u003e\u003c/h3\u003e\u003ca id=\"user-content-parseroptionstsconfigrootdir\" class=\"anchor\" aria-label=\"Permalink: parserOptions.tsconfigRootDir\" href=\"#parseroptionstsconfigrootdir\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eDefault \u003ccode\u003eundefined\u003c/code\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThis option allows you to provide the root directory for relative tsconfig paths specified in the \u003ccode\u003eproject\u003c/code\u003e option above.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ccode\u003eparserOptions.projectFolderIgnoreList\u003c/code\u003e\u003c/h3\u003e\u003ca id=\"user-content-parseroptionsprojectfolderignorelist\" class=\"anchor\" aria-label=\"Permalink: parserOptions.projectFolderIgnoreList\" href=\"#parseroptionsprojectfolderignorelist\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eDefault \u003ccode\u003e[\"**/node_modules/**\"]\u003c/code\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThis option allows you to ignore folders from being included in your provided list of \u003ccode\u003eproject\u003c/code\u003es.\nThis is useful if you have configured glob patterns, but want to make sure you ignore certain folders.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eIt accepts an array of globs to exclude from the \u003ccode\u003eproject\u003c/code\u003e globs.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eFor example, by default it will ensure that a glob like \u003ccode\u003e./**/tsconfig.json\u003c/code\u003e will not match any \u003ccode\u003etsconfig\u003c/code\u003es within your \u003ccode\u003enode_modules\u003c/code\u003e folder (some npm packages do not exclude their source files from their published packages).\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ccode\u003eparserOptions.extraFileExtensions\u003c/code\u003e\u003c/h3\u003e\u003ca id=\"user-content-parseroptionsextrafileextensions\" class=\"anchor\" aria-label=\"Permalink: parserOptions.extraFileExtensions\" href=\"#parseroptionsextrafileextensions\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eDefault \u003ccode\u003eundefined\u003c/code\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThis option allows you to provide one or more additional file extensions which should be considered in the TypeScript Program compilation.\nThe default extensions are \u003ccode\u003e.ts\u003c/code\u003e, \u003ccode\u003e.tsx\u003c/code\u003e, \u003ccode\u003e.js\u003c/code\u003e, and \u003ccode\u003e.jsx\u003c/code\u003e. Add extensions starting with \u003ccode\u003e.\u003c/code\u003e, followed by the file extension. E.g. for a \u003ccode\u003e.vue\u003c/code\u003e file use \u003ccode\u003e\"extraFileExtensions: [\".vue\"]\u003c/code\u003e.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ccode\u003eparserOptions.warnOnUnsupportedTypeScriptVersion\u003c/code\u003e\u003c/h3\u003e\u003ca id=\"user-content-parseroptionswarnonunsupportedtypescriptversion\" class=\"anchor\" aria-label=\"Permalink: parserOptions.warnOnUnsupportedTypeScriptVersion\" href=\"#parseroptionswarnonunsupportedtypescriptversion\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eDefault \u003ccode\u003etrue\u003c/code\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThis option allows you to toggle the warning that the parser will give you if you use a version of TypeScript which is not explicitly supported\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ccode\u003eparserOptions.createDefaultProgram\u003c/code\u003e\u003c/h3\u003e\u003ca id=\"user-content-parseroptionscreatedefaultprogram\" class=\"anchor\" aria-label=\"Permalink: parserOptions.createDefaultProgram\" href=\"#parseroptionscreatedefaultprogram\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eDefault \u003ccode\u003efalse\u003c/code\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThis option allows you to request that when the \u003ccode\u003eproject\u003c/code\u003e setting is specified, files will be allowed when not included in the projects defined by the provided \u003ccode\u003etsconfig.json\u003c/code\u003e files. \u003cstrong\u003eUsing this option will incur significant performance costs. This option is primarily included for backwards-compatibility.\u003c/strong\u003e See the \u003cstrong\u003e\u003ccode\u003eproject\u003c/code\u003e\u003c/strong\u003e section above for more information.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ccode\u003eparserOptions.programs\u003c/code\u003e\u003c/h3\u003e\u003ca id=\"user-content-parseroptionsprograms\" class=\"anchor\" aria-label=\"Permalink: parserOptions.programs\" href=\"#parseroptionsprograms\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eDefault \u003ccode\u003eundefined\u003c/code\u003e.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003eThis option allows you to programmatically provide an array of one or more instances of a TypeScript Program object that will provide type information to rules.\nThis will override any programs that would have been computed from \u003ccode\u003eparserOptions.project\u003c/code\u003e or \u003ccode\u003eparserOptions.createDefaultProgram\u003c/code\u003e.\nAll linted files must be part of the provided program(s).\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eUtilities\u003c/h2\u003e\u003ca id=\"user-content-utilities\" class=\"anchor\" aria-label=\"Permalink: Utilities\" href=\"#utilities\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003e\u003ccode\u003ecreateProgram(configFile, projectDirectory)\u003c/code\u003e\u003c/h3\u003e\u003ca id=\"user-content-createprogramconfigfile-projectdirectory\" class=\"anchor\" aria-label=\"Permalink: createProgram(configFile, projectDirectory)\" href=\"#createprogramconfigfile-projectdirectory\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eThis serves as a utility method for users of the \u003ccode\u003eparserOptions.programs\u003c/code\u003e feature to create a TypeScript program instance from a config file.\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-ts notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"declare function createProgram(\n configFile: string,\n projectDirectory?: string,\n): import('typescript').Program;\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003edeclare\u003c/span\u003e \u003cspan class=\"pl-k\"\u003efunction\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ecreateProgram\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003econfigFile\u003c/span\u003e: \u003cspan class=\"pl-smi\"\u003estring\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e\n \u003cspan class=\"pl-s1\"\u003eprojectDirectory\u003c/span\u003e?: \u003cspan class=\"pl-smi\"\u003estring\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e\n\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e: \u003cspan class=\"pl-k\"\u003eimport\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e'typescript'\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eProgram\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e;\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eExample usage in .eslintrc.js:\u003c/p\u003e\n\u003cdiv class=\"highlight highlight-source-js notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"const parser = require('@typescript-eslint/parser');\nconst programs = [parser.createProgram('tsconfig.json')];\nmodule.exports = {\n parserOptions: {\n programs,\n },\n};\"\u003e\u003cpre\u003e\u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eparser\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-en\"\u003erequire\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e'@typescript-eslint/parser'\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e;\u003c/span\u003e\n\u003cspan class=\"pl-k\"\u003econst\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eprograms\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e[\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eparser\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-en\"\u003ecreateProgram\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-s\"\u003e'tsconfig.json'\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e)\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e]\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e;\u003c/span\u003e\n\u003cspan class=\"pl-smi\"\u003emodule\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e.\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003eexports\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e=\u003c/span\u003e \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\n \u003cspan class=\"pl-c1\"\u003eparserOptions\u003c/span\u003e: \u003cspan class=\"pl-kos\"\u003e{\u003c/span\u003e\n programs\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e\n \u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e,\u003c/span\u003e\n\u003cspan class=\"pl-kos\"\u003e}\u003c/span\u003e\u003cspan class=\"pl-kos\"\u003e;\u003c/span\u003e\u003c/pre\u003e\u003c/div\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eSupported TypeScript Version\u003c/h2\u003e\u003ca id=\"user-content-supported-typescript-version\" class=\"anchor\" aria-label=\"Permalink: Supported TypeScript Version\" href=\"#supported-typescript-version\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003ePlease see \u003ca href=\"https://github.com/typescript-eslint/typescript-eslint\"\u003e\u003ccode\u003etypescript-eslint\u003c/code\u003e\u003c/a\u003e for the supported TypeScript version.\u003c/p\u003e\n\u003cp dir=\"auto\"\u003e\u003cstrong\u003ePlease ensure that you are using a supported version before submitting any issues/bug reports.\u003c/strong\u003e\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eReporting Issues\u003c/h2\u003e\u003ca id=\"user-content-reporting-issues\" class=\"anchor\" aria-label=\"Permalink: Reporting Issues\" href=\"#reporting-issues\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003ePlease use the \u003ccode\u003e@typescript-eslint/parser\u003c/code\u003e issue template when creating your issue and fill out the information requested as best you can. This will really help us when looking into your issue.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eLicense\u003c/h2\u003e\u003ca id=\"user-content-license\" class=\"anchor\" aria-label=\"Permalink: License\" href=\"#license\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003eTypeScript ESLint Parser is licensed under a permissive BSD 2-clause license.\u003c/p\u003e\n\u003cdiv class=\"markdown-heading\" dir=\"auto\"\u003e\u003ch2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\"\u003eContributing\u003c/h2\u003e\u003ca id=\"user-content-contributing\" class=\"anchor\" aria-label=\"Permalink: Contributing\" href=\"#contributing\"\u003e\u003csvg class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"\u003e\u003cpath d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\u003e\u003c/path\u003e\u003c/svg\u003e\u003c/a\u003e\u003c/div\u003e\n\u003cp dir=\"auto\"\u003e\u003ca href=\"/ivliag/typescript-eslint/blob/master/CONTRIBUTING.md\"\u003eSee the contributing guide here\u003c/a\u003e\u003c/p\u003e\n\u003c/article\u003e","errorMessage":null,"headerInfo":{"toc":[{"level":1,"text":"TypeScript ESLint Parser","anchor":"typescript-eslint-parser","htmlText":"TypeScript ESLint Parser"},{"level":2,"text":"Getting Started","anchor":"getting-started","htmlText":"Getting Started"},{"level":2,"text":"Quick-start","anchor":"quick-start","htmlText":"Quick-start"},{"level":3,"text":"Installation","anchor":"installation","htmlText":"Installation"},{"level":3,"text":"Usage","anchor":"usage","htmlText":"Usage"},{"level":2,"text":"Configuration","anchor":"configuration","htmlText":"Configuration"},{"level":3,"text":"parserOptions.ecmaFeatures.jsx","anchor":"parseroptionsecmafeaturesjsx","htmlText":"parserOptions.ecmaFeatures.jsx"},{"level":3,"text":"parserOptions.ecmaFeatures.globalReturn","anchor":"parseroptionsecmafeaturesglobalreturn","htmlText":"parserOptions.ecmaFeatures.globalReturn"},{"level":3,"text":"parserOptions.ecmaVersion","anchor":"parseroptionsecmaversion","htmlText":"parserOptions.ecmaVersion"},{"level":3,"text":"parserOptions.jsxPragma","anchor":"parseroptionsjsxpragma","htmlText":"parserOptions.jsxPragma"},{"level":3,"text":"parserOptions.jsxFragmentName","anchor":"parseroptionsjsxfragmentname","htmlText":"parserOptions.jsxFragmentName"},{"level":3,"text":"parserOptions.lib","anchor":"parseroptionslib","htmlText":"parserOptions.lib"},{"level":3,"text":"parserOptions.project","anchor":"parseroptionsproject","htmlText":"parserOptions.project"},{"level":3,"text":"parserOptions.tsconfigRootDir","anchor":"parseroptionstsconfigrootdir","htmlText":"parserOptions.tsconfigRootDir"},{"level":3,"text":"parserOptions.projectFolderIgnoreList","anchor":"parseroptionsprojectfolderignorelist","htmlText":"parserOptions.projectFolderIgnoreList"},{"level":3,"text":"parserOptions.extraFileExtensions","anchor":"parseroptionsextrafileextensions","htmlText":"parserOptions.extraFileExtensions"},{"level":3,"text":"parserOptions.warnOnUnsupportedTypeScriptVersion","anchor":"parseroptionswarnonunsupportedtypescriptversion","htmlText":"parserOptions.warnOnUnsupportedTypeScriptVersion"},{"level":3,"text":"parserOptions.createDefaultProgram","anchor":"parseroptionscreatedefaultprogram","htmlText":"parserOptions.createDefaultProgram"},{"level":3,"text":"parserOptions.programs","anchor":"parseroptionsprograms","htmlText":"parserOptions.programs"},{"level":2,"text":"Utilities","anchor":"utilities","htmlText":"Utilities"},{"level":3,"text":"createProgram(configFile, projectDirectory)","anchor":"createprogramconfigfile-projectdirectory","htmlText":"createProgram(configFile, projectDirectory)"},{"level":2,"text":"Supported TypeScript Version","anchor":"supported-typescript-version","htmlText":"Supported TypeScript Version"},{"level":2,"text":"Reporting Issues","anchor":"reporting-issues","htmlText":"Reporting Issues"},{"level":2,"text":"License","anchor":"license","htmlText":"License"},{"level":2,"text":"Contributing","anchor":"contributing","htmlText":"Contributing"}],"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fivliag%2Ftypescript-eslint%2Ftree%2Fmaster%2Fpackages%2Fparser"}},"totalCount":9,"showBranchInfobar":true},"fileTree":{"packages":{"items":[{"name":"ast-spec","path":"packages/ast-spec","contentType":"directory"},{"name":"eslint-plugin-internal","path":"packages/eslint-plugin-internal","contentType":"directory"},{"name":"eslint-plugin-tslint","path":"packages/eslint-plugin-tslint","contentType":"directory"},{"name":"eslint-plugin","path":"packages/eslint-plugin","contentType":"directory"},{"name":"experimental-utils","path":"packages/experimental-utils","contentType":"directory"},{"name":"parser","path":"packages/parser","contentType":"directory"},{"name":"scope-manager","path":"packages/scope-manager","contentType":"directory"},{"name":"shared-fixtures","path":"packages/shared-fixtures","contentType":"directory"},{"name":"types","path":"packages/types","contentType":"directory"},{"name":"typescript-estree","path":"packages/typescript-estree","contentType":"directory"},{"name":"visitor-keys","path":"packages/visitor-keys","contentType":"directory"}],"totalCount":11},"":{"items":[{"name":".github","path":".github","contentType":"directory"},{"name":".husky","path":".husky","contentType":"directory"},{"name":".vscode","path":".vscode","contentType":"directory"},{"name":"docs","path":"docs","contentType":"directory"},{"name":"packages","path":"packages","contentType":"directory"},{"name":"tests","path":"tests","contentType":"directory"},{"name":"tools","path":"tools","contentType":"directory"},{"name":".all-contributorsrc","path":".all-contributorsrc","contentType":"file"},{"name":".codecov.yml","path":".codecov.yml","contentType":"file"},{"name":".cspell.json","path":".cspell.json","contentType":"file"},{"name":".editorconfig","path":".editorconfig","contentType":"file"},{"name":".eslintignore","path":".eslintignore","contentType":"file"},{"name":".eslintrc.js","path":".eslintrc.js","contentType":"file"},{"name":".gitattributes","path":".gitattributes","contentType":"file"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":".lintstagedrc","path":".lintstagedrc","contentType":"file"},{"name":".markdownlint.json","path":".markdownlint.json","contentType":"file"},{"name":".markdownlintignore","path":".markdownlintignore","contentType":"file"},{"name":".npmrc","path":".npmrc","contentType":"file"},{"name":".prettierignore","path":".prettierignore","contentType":"file"},{"name":".prettierrc.json","path":".prettierrc.json","contentType":"file"},{"name":"CHANGELOG.md","path":"CHANGELOG.md","contentType":"file"},{"name":"CODE_OF_CONDUCT.md","path":"CODE_OF_CONDUCT.md","contentType":"file"},{"name":"CONTRIBUTING.md","path":"CONTRIBUTING.md","contentType":"file"},{"name":"CONTRIBUTORS.md","path":"CONTRIBUTORS.md","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"lerna.json","path":"lerna.json","contentType":"file"},{"name":"nx.json","path":"nx.json","contentType":"file"},{"name":"package.json","path":"package.json","contentType":"file"},{"name":"tsconfig.base.json","path":"tsconfig.base.json","contentType":"file"},{"name":"tsconfig.eslint.json","path":"tsconfig.eslint.json","contentType":"file"},{"name":"workspace.json","path":"workspace.json","contentType":"file"},{"name":"yarn.lock","path":"yarn.lock","contentType":"file"}],"totalCount":34}},"fileTreeProcessingTime":17.298796000000003,"foldersToFetch":[],"treeExpanded":true,"symbolsExpanded":false,"csrf_tokens":{"/ivliag/typescript-eslint/branches":{"post":"W62AzF5zveoYM92uUZoonceE-0qaZaxZrZsi-GCrOajJW1xnSBzvww3A7WUGDZ6E9mBD3FjK3J4drKo2En0dZw"},"/ivliag/typescript-eslint/branches/fetch_and_merge/master":{"post":"J4_Endr0gkdQRPj6G8npaJNsUO3nvmZZLxlkMa43oUOxF1vkvyX4sSl2KJ_aMTwRtD4GN0CWhCpLUBHmGLfTaA"},"/ivliag/typescript-eslint/branches/fetch_and_merge/master?discard_changes=true":{"post":"9Iib4nm4EHf9UWd2v8GaAiwBfCeEDNOFvnvykoC6n2hiEASbHGlqgYRjtxN-OU97C1Mq_SMkMfbaModFNjrtQw"}}},"title":"typescript-eslint/packages/parser at master · ivliag/typescript-eslint","appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-7d7eb7c71814.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-1ae9fa256942.js","githubDevUrl":null,"enabled_features":{"code_nav_ui_events":false,"react_blob_overlay":false,"accessible_code_button":true,"github_models_repo_integration":false}}}
You can’t perform that action at this time.