diff --git a/.gitignore b/.gitignore index 6714d4b9..501b97f0 100644 --- a/.gitignore +++ b/.gitignore @@ -34,7 +34,6 @@ yarn-error.log* *.tsbuildinfo next-env.d.ts - # Hardhat coverage coverage.json @@ -63,7 +62,8 @@ contracts/foundry/out/ # Dotenv file .env - secrets.json -yarn.lock \ No newline at end of file +yarn.lock + +.bw diff --git a/.prettierignore b/.prettierignore index bb3c8e64..63b3d28b 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1,5 @@ -/subgraph/subgraph.template.yaml \ No newline at end of file +/subgraph/subgraph.template.yaml +node_modules +artifacts +cache +coverage diff --git a/.prettierrc.cjs b/.prettierrc.cjs deleted file mode 100644 index 0adb74f4..00000000 --- a/.prettierrc.cjs +++ /dev/null @@ -1,24 +0,0 @@ -module.exports = { - plugins: [ - "prettier-plugin-solidity", - // "prettier-plugin-jsdoc", - // "prettier-plugin-tailwindcss", - ], - tailwindAttributes: ["className"], - tailwindFunctions: ["clsx", "twMerge"], - - // Note that Solidity's Style Guide suggests a maximum line length of 120 characters. - // See: https://docs.soliditylang.org/en/v0.8.17/style-guide.html#maximum-line-length - printWidth: 100, - - // Those explicit declarations are required because of a bug with pnpm. - // See: https://github.com/prettier-solidity/prettier-plugin-solidity#pnpm - overrides: [ - { - files: "**/*.sol", - options: { - parser: "solidity-parse", - }, - }, - ], -}; diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 00000000..53c49dc8 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,24 @@ +{ + "trailingComma": "all", + "semi": true, + "tabWidth": 2, + "endOfLine": "lf", + "quoteProps": "consistent", + "bracketSpacing": true, + "singleQuote": false, + "overrides": [ + { + "files": "*.ts", + "options": { + "printWidth": 80 + } + }, + { + "files": "*.sol", + "options": { + "printWidth": 70, + "semi": true + } + } + ] +} diff --git a/package.json b/package.json index f71632bb..55c2e4d3 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,9 @@ "graph:prepare-base-sepolia": "cd subgraph && mustache ./config/base-sepolia.json ./subgraph.template.yaml > ./subgraph.yaml", "graph:deploy-base-sepolia": "cd subgraph && graph deploy --node https://api.studio.thegraph.com/deploy/ ldystaking-subgraph ./subgraph.yaml", "graph:prepare-arbi-sepolia": "cd subgraph && mustache ./config/arbitrum-sepolia.json ./subgraph.template.yaml > ./subgraph.yaml", - "graph:deploy-arbi-sepolia": "cd subgraph && graph deploy ledgity-arbi-sepolia --version-label v0.0.1 ./subgraph.yaml --node https://subgraphs.alchemy.com/api/subgraphs/deploy --deploy-key 4SaXil3Dh3K9O --ipfs https://ipfs.satsuma.xyz" + "graph:deploy-arbi-sepolia": "cd subgraph && graph deploy ledgity-arbi-sepolia --version-label v0.0.1 ./subgraph.yaml --node https://subgraphs.alchemy.com/api/subgraphs/deploy --deploy-key 4SaXil3Dh3K9O --ipfs https://ipfs.satsuma.xyz", + "prettier:check": "prettier --check --config ./.prettierrc.json --plugin=prettier-plugin-solidity .", + "prettier:write": "prettier --write --config ./.prettierrc.json --plugin=prettier-plugin-solidity ." }, "dependencies": { "@auth/prisma-adapter": "^1.0.11", @@ -145,4 +147,4 @@ "path": "./node_modules/cz-conventional-changelog" } } -} +} \ No newline at end of file