Skip to content

Commit f4435f5

Browse files
committed
refactor: switch to prettier oxc parser
1 parent 5f43af3 commit f4435f5

4 files changed

Lines changed: 345 additions & 4 deletions

File tree

docs/docs.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Project documentation site generator.
99
- Data type definition should be placed in angle brackets. Example: {string}.
1010

1111
- Primitive data type should be in the lowercase. Example: {boolean}. List of primitive types:
12-
1312
- {any} any data type;
1413
- {string};
1514
- {number};

lib/lint/file.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import fs from "node:fs";
22
import path from "node:path";
3+
import PrettierPluginOxc from "@prettier/plugin-oxc";
34
import PrettierPluginXml from "@prettier/plugin-xml";
45
import editorconfig from "editorconfig";
56
import { ESLint as EsLint } from "eslint";
@@ -99,7 +100,7 @@ const USE_PRETTIER_FOR_JS = true,
99100
"text/javascript": {
100101
"prettier": {
101102
"parser": USE_PRETTIER_FOR_JS
102-
? "babel"
103+
? "oxc"
103104
: null,
104105
},
105106
"eslint": {
@@ -121,7 +122,7 @@ const USE_PRETTIER_FOR_JS = true,
121122
"application/x-typescript": {
122123
"prettier": {
123124
"parser": USE_PRETTIER_FOR_JS
124-
? "typescript"
125+
? "oxc-ts"
125126
: null,
126127
},
127128
"eslint": {
@@ -587,7 +588,7 @@ export class LintFile {
587588
prettierConfig = { ...prettierConfig };
588589

589590
prettierConfig.plugins ??= [];
590-
prettierConfig.plugins.push( PrettierPluginSh, PrettierPluginPackageJson, PrettierPluginXml );
591+
prettierConfig.plugins.push( PrettierPluginSh, PrettierPluginPackageJson, PrettierPluginXml, PrettierPluginOxc );
591592
prettierConfig.parser = this.#type.prettier.parser;
592593
prettierConfig.filepath = this.#fullPath;
593594

0 commit comments

Comments
 (0)