Skip to content

Commit 762b91b

Browse files
Update Prettier script [LG-5016] (#2788)
* Add prettier types * abstract LGFormat * update prettier ignore * add progress bar top prettier * rename formatLG * Create config.ts * creates formatESLint * update eslint formatter * Update format.ts * Create lint-utils.md * update createESLintInstance signature * rm progress bar * cleanup linter tests * add logging * Update index.ts
1 parent 963cda3 commit 762b91b

File tree

12 files changed

+320
-138
lines changed

12 files changed

+320
-138
lines changed

.changeset/lint-utils.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@lg-tools/lint': minor
3+
---
4+
5+
- Rewrites `prettier.ts` using the Prettier Node API
6+
- Exports `formatLG` function to format miscellaneous blocks of code.
7+
- Adds verbose logging to `prettier`

.prettierignore

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
node_modules/
2-
dist/
1+
node_modules/*
2+
dist/*
33
package.json
44
packages/icon/src/glyphs/*.svg
55
packages/icon/src/generated/*.tsx
6-
storybook-static
6+
storybook-static/*
77
.changeset/
88
**/package.json
99
**/tsconfig.json
1010
**/tsdoc.json
1111
packages/**/stories.js*
12-
.turbo
12+
.turbo/*

pnpm-lock.yaml

+82-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/codemods/src/utils/tests/transformTest.ts

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import fs from 'fs';
55
import jscodeshift, { type FileInfo } from 'jscodeshift';
66
import path from 'path';
7-
// @ts-expect-error - no prettier types
87
import prettier from 'prettier';
98

109
interface ParserExtensionMap {

tools/lint/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
"@eslint/eslintrc": "^3.2.0",
2121
"@eslint/js": "^9.16.0",
2222
"@lg-tools/build": "workspace:^",
23+
"@types/cli-progress": "^3.11.6",
2324
"@types/cross-spawn": "6.0.2",
25+
"@types/prettier": "^2.7.0",
2426
"@typescript-eslint/eslint-plugin": "8.17.0",
2527
"@typescript-eslint/parser": "8.17.0",
2628
"chalk": "4.1.2",
@@ -34,6 +36,7 @@
3436
"eslint-plugin-react-hooks": "5.0.0",
3537
"eslint-plugin-simple-import-sort": "12.1.1",
3638
"eslint-plugin-storybook": "0.11.1",
39+
"glob": "11.0.1",
3740
"globals": "^15.13.0",
3841
"npm-package-json-lint": "8.0.0",
3942
"npm-package-json-lint-config-default": "7.0.1",

0 commit comments

Comments
 (0)