Skip to content

Commit bea5318

Browse files
committed
docs: update installation instructions in ts-blank-eslint-parser setup
1 parent 07d775c commit bea5318

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

apps/website/content/docs/using-an-alternative-parser/ts-blank-eslint-parser.mdx

+2-19
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Use it only if you are okay with the limitations.
1717
## Install
1818

1919
```package-install copy
20-
npm install --save-dev eslint typescript-eslint @eslint/js globals ts-blank-eslint-parser @eslint-react/eslint-plugin@next
20+
npm install --save-dev eslint @eslint/js globals ts-blank-eslint-parser @eslint-react/eslint-plugin@next
2121
```
2222

2323
## Setup
@@ -26,28 +26,11 @@ npm install --save-dev eslint typescript-eslint @eslint/js globals ts-blank-esli
2626
// @ts-check
2727
import eslintJs from "@eslint/js";
2828
import eslintReact from "@eslint-react/eslint-plugin";
29-
import { isInEditorEnv } from "@eslint-react/shared";
3029
import tsBlankEslintParser from "ts-blank-eslint-parser";
31-
import tseslint from "typescript-eslint";
3230
import globals from "globals";
3331

3432
const GLOB_TS = ["**/*.ts", "**/*.tsx"];
3533

36-
function getOptimalParserConfig(project = "tsconfig.json") {
37-
switch (true) {
38-
case isInEditorEnv():
39-
case process.argv.includes("--fix"):
40-
return {
41-
parser: tseslint.parser,
42-
parserOptions: {
43-
project,
44-
tsconfigRootDir: import.meta.dirname,
45-
},
46-
};
47-
}
48-
return { parser: tsBlankEslintParser };
49-
}
50-
5134
export default [
5235
// base configuration for browser environment source files
5336
{
@@ -56,7 +39,7 @@ export default [
5639
globals: {
5740
...globals.browser,
5841
},
59-
...getOptimalParserConfig(),
42+
parser: tsBlankEslintParser,
6043
},
6144
rules: {
6245
...eslintJs.configs.recommended.rules,

0 commit comments

Comments
 (0)