From 1589fd82e29fb74fa8bd49789b05f046433dbb45 Mon Sep 17 00:00:00 2001 From: Chris Krycho Date: Mon, 28 Aug 2023 17:21:52 -0600 Subject: [PATCH] Use dprint instead of Prettier --- .nova/Configuration.json | 8 +++-- dprint.json | 19 +++++++++++ package.json | 5 +-- pnpm-lock.yaml | 73 +++++++++++++++++++++++++++++++++++----- 4 files changed, 89 insertions(+), 16 deletions(-) create mode 100644 dprint.json diff --git a/.nova/Configuration.json b/.nova/Configuration.json index 63b169f..c05cb25 100644 --- a/.nova/Configuration.json +++ b/.nova/Configuration.json @@ -1,5 +1,7 @@ { - "workspace.art_style" : 1, - "workspace.color" : 6, - "workspace.name" : "Unison Nova" + "prettier.format-on-save": "Disable", + "prettier.format-on-save.ignore-without-config": "Global Default", + "workspace.art_style": 1, + "workspace.color": 6, + "workspace.name": "Unison Nova" } diff --git a/dprint.json b/dprint.json new file mode 100644 index 0000000..756b03c --- /dev/null +++ b/dprint.json @@ -0,0 +1,19 @@ +{ + "typescript": { + "lineWidth": 90, + "quoteStyle": "preferSingle" + }, + "json": { + }, + "toml": { + }, + "excludes": [ + "**/node_modules", + "**/*-lock.json" + ], + "plugins": [ + "https://plugins.dprint.dev/typescript-0.87.1.wasm", + "https://plugins.dprint.dev/json-0.17.4.wasm", + "https://plugins.dprint.dev/toml-0.5.4.wasm" + ] +} diff --git a/package.json b/package.json index e106f2a..41e72ca 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "author": "Chris Krycho ", "devDependencies": { "@types/nova-editor": "^1.0.1", - "prettier": "^3.0.2", + "dprint": "^0.40.2", "tree-sitter-unison": "kylegoetz/tree-sitter-unison#1df9e35477b4261abb7cd9d3ab5b2f565fc3fd8a", "typescript": "5.2" }, @@ -14,8 +14,5 @@ "volta": { "node": "18.17.1", "pnpm": "8.6.12" - }, - "prettier": { - "singleQuote": true } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3bc2bd1..6add21f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,9 +8,9 @@ devDependencies: '@types/nova-editor': specifier: ^1.0.1 version: 1.0.1 - prettier: - specifier: ^3.0.2 - version: 3.0.2 + dprint: + specifier: ^0.40.2 + version: 0.40.2 tree-sitter-unison: specifier: kylegoetz/tree-sitter-unison#1df9e35477b4261abb7cd9d3ab5b2f565fc3fd8a version: github.com/kylegoetz/tree-sitter-unison/1df9e35477b4261abb7cd9d3ab5b2f565fc3fd8a @@ -20,6 +20,54 @@ devDependencies: packages: + /@dprint/darwin-arm64@0.40.2: + resolution: {integrity: sha512-qharMFhxpNq9brgvHLbqzzAgVgPWSHLfzNLwWWhKcGOUUDUIilfAo3SlvOz6w4nQiIifLpYZOvZqK7Lpf9mSSw==} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@dprint/darwin-x64@0.40.2: + resolution: {integrity: sha512-FPDdOTVr1JfqtLBTCvqlihWslTy3LBUoi3H1gaqIazCKMj2dB9voFWkBiMT+REMHDrlVsoSpFAfsliNr/y7HPA==} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@dprint/linux-arm64-glibc@0.40.2: + resolution: {integrity: sha512-GmUWfKwEwXA+onvewX9hEJSMcd9V184+uRbEhI5tG28tBP9+IjQhrY7jCjxPvaZA+EvzNPnAy5D1wbJdlNLBNA==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@dprint/linux-x64-glibc@0.40.2: + resolution: {integrity: sha512-vMHAHdsOY+2thieSWbIrIioDfPgvipwUgd0MZUWOqycTrXU6kLyi2B+5J/2Jc+QO3CiLIbumQd2FH/0vB1eWqA==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@dprint/linux-x64-musl@0.40.2: + resolution: {integrity: sha512-nFSbDWd9ORyOhJ7a+RmE39WbuPoQ3OQutIgfAmfikiu/wENzEwxxv4QJ7aFnBaoZb0wuVEEpXShr8vY4p0exkg==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@dprint/win32-x64@0.40.2: + resolution: {integrity: sha512-qF4VCQzFTZYD61lbQqXLU/IwUTbLK22CancO+uVtXmZRoKU9GaVjcBhMUB7URxsa8rvxWHhHT6ldillI/aOWCg==} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + /@types/nova-editor-node@5.1.0: resolution: {integrity: sha512-Jj8wnUGOYmmNgd61JHSG0kV5o/zlthVn92qCdLz6VYa7CM4KSmwPjCeCzw2JqjJw6QONpcMXTVH9TKtLCnFf1Q==} dev: true @@ -30,14 +78,21 @@ packages: '@types/nova-editor-node': 5.1.0 dev: true - /nan@2.17.0: - resolution: {integrity: sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==} + /dprint@0.40.2: + resolution: {integrity: sha512-3LdyUV0itEW59UPtsRA2StOWOu8FyOW+BgvJpH/tACRHKi0z5gaQnvSxdS3mbG7dgtEhdRnGg6JoiQyGib6NTg==} + hasBin: true + requiresBuild: true + optionalDependencies: + '@dprint/darwin-arm64': 0.40.2 + '@dprint/darwin-x64': 0.40.2 + '@dprint/linux-arm64-glibc': 0.40.2 + '@dprint/linux-x64-glibc': 0.40.2 + '@dprint/linux-x64-musl': 0.40.2 + '@dprint/win32-x64': 0.40.2 dev: true - /prettier@3.0.2: - resolution: {integrity: sha512-o2YR9qtniXvwEZlOKbveKfDQVyqxbEIWn48Z8m3ZJjBjcCmUy3xZGIv+7AkaeuaTr6yPXJjwv07ZWlsWbEy1rQ==} - engines: {node: '>=14'} - hasBin: true + /nan@2.17.0: + resolution: {integrity: sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==} dev: true /typescript@5.2.2: