From f2198ee69edb299368afc821585d359f68bfb7b3 Mon Sep 17 00:00:00 2001 From: turnoffthiscomputer Date: Sun, 14 Jul 2024 19:19:55 +0200 Subject: [PATCH] add prettier --- circuits/.prettierrc | 18 ++++++++++++++++++ circuits/package.json | 7 +++++-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 circuits/.prettierrc diff --git a/circuits/.prettierrc b/circuits/.prettierrc new file mode 100644 index 000000000..ea575fbe9 --- /dev/null +++ b/circuits/.prettierrc @@ -0,0 +1,18 @@ +{ + "printWidth": 100, + "tabWidth": 2, + "useTabs": false, + "semi": true, + "singleQuote": true, + "quoteProps": "as-needed", + "jsxSingleQuote": false, + "trailingComma": "es5", + "bracketSpacing": true, + "bracketSameLine": false, + "arrowParens": "always", + "proseWrap": "preserve", + "htmlWhitespaceSensitivity": "css", + "endOfLine": "lf", + "embeddedLanguageFormatting": "auto", + "singleAttributePerLine": false +} diff --git a/circuits/package.json b/circuits/package.json index f451c7d0b..55ee53a36 100644 --- a/circuits/package.json +++ b/circuits/package.json @@ -5,7 +5,9 @@ "license": "MIT", "scripts": { "test": "yarn ts-mocha tests/**/*.test.ts --exit", - "install-circuits": "cd ../common && yarn && cd ../circuits && yarn" + "install-circuits": "cd ../common && yarn && cd ../circuits && yarn", + "format": "prettier --write .", + "lint": "prettier --check ." }, "dependencies": { "@types/chai-as-promised": "^7.1.6", @@ -40,7 +42,8 @@ "@types/mocha": "^10.0.6", "chai": "^4.3.8", "mocha": "^10.3.0", + "prettier": "^3.3.3", "ts-mocha": "^10.0.0", "ts-node": "^10.9.2" } -} \ No newline at end of file +}