Skip to content

Commit

Permalink
Update to support prettier 3.0 (#2157)
Browse files Browse the repository at this point in the history
fix #2153

This include breaking change if using the typespec formatter
programatically. Some breaking changes to prettier carry over
https://prettier.io/blog/2023/07/05/3.0.0.html
  • Loading branch information
timotheeguerin authored Aug 4, 2023
1 parent 4e685d2 commit d355e5c
Show file tree
Hide file tree
Showing 58 changed files with 6,206 additions and 730 deletions.
6 changes: 3 additions & 3 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"arrowParens": "always",
"trailingComma": "es5",
"bracketSpacing": true,
"endOfLine": "lf",
"printWidth": 100,
"semi": true,
"singleQuote": false,
"tabWidth": 2,
"pluginSearchDirs": ["./packages/compiler"],
"plugins": [
"./packages/prettier-plugin-typespec",
"./packages/compiler/node_modules/prettier-plugin-organize-imports"
"./packages/prettier-plugin-typespec/dist/index.js",
"./packages/compiler/node_modules/prettier-plugin-organize-imports/index.js"
],
"overrides": [
{
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"TYPESPEC_VERBOSE_TEST_OUTPUT": "true",
"NODE_OPTIONS": "--stack-trace-limit=50"
},
"prettier.prettierPath": "./packages/compiler/node_modules/prettier",
"prettier.prettierPath": "./packages/compiler/node_modules/prettier/index.cjs",
"prettier.documentSelectors": ["**/*.tsp"],
"testExplorer.errorDecoration": false,
"typespec.tsp-server.path": "${workspaceFolder}/packages/compiler"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "@typespec/compiler",
"comment": "**Breaking change** `formatTypeSpec` is now async. Formatter was updated to use prettier 3.0.",
"type": "none"
},

],
"packageName": "@typespec/compiler"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@typespec/eslint-config-typespec",
"comment": "Update dependency on @typescript-eslint/parser",
"type": "none"
}
],
"packageName": "@typespec/eslint-config-typespec"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@typespec/eslint-plugin",
"comment": "Update dependencies",
"type": "none"
}
],
"packageName": "@typespec/eslint-plugin"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@typespec/html-program-viewer",
"comment": "",
"type": "none"
}
],
"packageName": "@typespec/html-program-viewer"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@typespec/internal-build-utils",
"comment": "",
"type": "none"
}
],
"packageName": "@typespec/internal-build-utils"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@typespec/json-schema",
"comment": "",
"type": "none"
}
],
"packageName": "@typespec/json-schema"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@typespec/migrate",
"comment": "",
"type": "none"
}
],
"packageName": "@typespec/migrate"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@typespec/prettier-plugin-typespec",
"comment": "Added support for prettier 3.0",
"type": "none"
}
],
"packageName": "@typespec/prettier-plugin-typespec"
}
Loading

0 comments on commit d355e5c

Please sign in to comment.