Skip to content

Commit

Permalink
fix: downgrade prettier to v2
Browse files Browse the repository at this point in the history
  • Loading branch information
SimeonC committed Jul 21, 2023
1 parent 91fce63 commit 649159a
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 39 deletions.
42 changes: 20 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"lodash": "^4.17.21",
"nx": "16.5.0",
"nx-cloud": "16.0.5",
"prettier": "^3.0.0",
"prettier": "2.8.8",
"storybook": "^6.5.16",
"type-fest": "3.12.0",
"typescript": "5.1.6",
Expand Down
23 changes: 10 additions & 13 deletions packages/eslint-plugin/src/shortestImport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,19 @@ export const shortestImport: TSESLint.RuleModule<typeof messageId> = {
.readdirSync(path.join(path.dirname(filePath), baseUrl), {
withFileTypes: true,
})
.reduce(
(directoryMap, dirrent) => {
if (dirrent.isDirectory())
return {
...directoryMap,
[dirrent.name]: path.join(baseUrl, dirrent.name),
};
.reduce((directoryMap, dirrent) => {
if (dirrent.isDirectory())
return {
...directoryMap,
[dirrent.name.replace(/\.[^.]+$/gi, '')]: path
.join(baseUrl, dirrent.name)
.replace(/^\.\//gi, ''),
[dirrent.name]: path.join(baseUrl, dirrent.name),
};
},
{} as Record<string, string>,
)
return {
...directoryMap,
[dirrent.name.replace(/\.[^.]+$/gi, '')]: path
.join(baseUrl, dirrent.name)
.replace(/^\.\//gi, ''),
};
}, {} as Record<string, string>)
: {};
const compilerPaths = Object.entries(
config.compilerOptions.paths || {},
Expand Down
2 changes: 1 addition & 1 deletion packages/nx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"flat": "5.0.2",
"fs-extra": "11.1.1",
"lodash": "4.17.21",
"prettier": "3.0.0"
"prettier": "^2"
},
"devDependencies": {
"@types/flat": "5.0.2",
Expand Down
2 changes: 2 additions & 0 deletions packages/prettier-config/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"$schema": "http://json.schemastore.org/prettierrc",
"singleQuote": true,
"trailingComma": "all",
"overrides": [
{
"files": ["**/*.css", "**/*.scss", "**/*.html"],
Expand Down
2 changes: 1 addition & 1 deletion packages/prettier-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"version": "1.0.0",
"main": "./config.json",
"peerDependencies": {
"prettier": "^3"
"prettier": "^2"
},
"engines": {
"node": ">= 16.16.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"glob": "^10.3.1",
"jiti": "^1.18.2",
"minimist": "^1.2.8",
"prettier": "^3.0.0",
"prettier": "^2",
"prettier-package-json": "2.8.0"
},
"devDependencies": {
Expand Down

0 comments on commit 649159a

Please sign in to comment.