diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 9233564ee2..4b17d3877e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,7 +1,7 @@ name: Bug report description: Create a report to help us improve -title: "Bug: " -labels: ["type: bug"] +title: 'Bug: ' +labels: ['type: bug'] body: - type: textarea @@ -27,4 +27,3 @@ body: label: What version of the libraries are you using? placeholder: | - OnchainKit: [e.g. 0.2.x] - diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 746074ec7f..93c6ac0546 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -3,4 +3,3 @@ contact_links: - name: Base Discord url: https://base.org/discord about: The official Base Discord community. - diff --git a/.github/ISSUE_TEMPLATE/documentation_request.yml b/.github/ISSUE_TEMPLATE/documentation_request.yml index 702d168337..6fd6052be9 100644 --- a/.github/ISSUE_TEMPLATE/documentation_request.yml +++ b/.github/ISSUE_TEMPLATE/documentation_request.yml @@ -1,7 +1,7 @@ name: Documentation request description: Suggest a documentation for this project -title: "Documentation Request: " -labels: ["type: documentation"] +title: 'Documentation Request: ' +labels: ['type: documentation'] body: - type: markdown diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 62d6f350db..6f3faf589e 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -1,7 +1,7 @@ name: Feature request description: Suggest an idea for this project -title: "Feature Request: " -labels: ["type: enhancement"] +title: 'Feature Request: ' +labels: ['type: enhancement'] body: - type: textarea @@ -15,4 +15,3 @@ body: id: alternatives attributes: label: Describe alternatives you've considered. - diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 7de5d3a416..d160ffbef7 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,7 +1,5 @@ **What changed? Why?** - **Notes to reviewers** - **How has it been tested?** diff --git a/LICENSE.md b/LICENSE.md index 9f2e4251f0..a7d1a49d1a 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/README.md b/README.md index 217ba7dc96..fef1c83d48 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ ### generateFrameNextMetadata Next App `page.ts` + ```ts // Steps 1. import generateFrameNextMetadata from @coinbase/onchainkit import { generateFrameNextMetadata } from '@coinbase/onchainkit'; @@ -31,4 +32,4 @@ export const metadata: Metadata = { export default function Page() { return ; } -``` \ No newline at end of file +``` diff --git a/package.json b/package.json index 8780e831af..f32eb489db 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@coinbase/onchainkit", - "version": "0.1.2", + "version": "0.1.1", "repository": "https://github.com/coinbase/onchainkit.git", "license": "MIT", "dependencies": { @@ -8,8 +8,11 @@ "viem": "2.5.0" }, "scripts": { - "prebuild": "rimraf dist", "build": "tsc && tsc --module commonjs --outDir dist/lib", + "check": "yarn format", + "format": "prettier --log-level warn --write .", + "format:check": "prettier --check .", + "prebuild": "rimraf dist", "release:check": "changeset status --verbose --since=origin/main", "release:publish": "yarn install && yarn build && changeset publish", "release:version": "changeset version && yarn install --immutable" @@ -18,6 +21,7 @@ "@changesets/changelog-github": "^0.4.8", "@changesets/cli": "^2.26.2", "prettier": "^3.1.1", + "prettier-plugin-tailwindcss": "^0.5.9", "typescript": "~5.3.3", "yarn": "^1.22.21" }, diff --git a/prettier.config.js b/prettier.config.js new file mode 100644 index 0000000000..b7a9b45e74 --- /dev/null +++ b/prettier.config.js @@ -0,0 +1,21 @@ +module.exports = { + arrowParens: 'always', + bracketSameLine: false, + jsxSingleQuote: false, + plugins: ['prettier-plugin-tailwindcss'], + printWidth: 100, + semi: true, + singleQuote: true, + tabWidth: 2, + tailwindFunctions: ['clsx'], + trailingComma: 'all', + useTabs: false, + overrides: [ + { + files: '*.json', + options: { + parser: 'json-stringify', + }, + }, + ], +}; diff --git a/src/core/index.ts b/src/core/index.ts index 43e8726bc4..a27255f490 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -1 +1 @@ -export { generateFrameNextMetadata } from './generateFrameNextMetadata'; \ No newline at end of file +export { generateFrameNextMetadata } from './generateFrameNextMetadata'; diff --git a/tsconfig.json b/tsconfig.json index ed5c480404..32b28c8f21 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,8 +2,11 @@ "compilerOptions": { "moduleResolution": "node", "target": "es2020", - "module":"es2020", - "lib": ["es2020", "dom"], + "module": "es2020", + "lib": [ + "es2020", + "dom" + ], "strict": true, "sourceMap": true, "declaration": true, @@ -20,4 +23,4 @@ "include": [ "src" ] -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index 750e71d95d..751ce35d41 100644 --- a/yarn.lock +++ b/yarn.lock @@ -319,6 +319,7 @@ __metadata: "@changesets/changelog-github": "npm:^0.4.8" "@changesets/cli": "npm:^2.26.2" prettier: "npm:^3.1.1" + prettier-plugin-tailwindcss: "npm:^0.5.9" react: "npm:^18" typescript: "npm:~5.3.3" viem: "npm:2.5.0" @@ -1907,6 +1908,57 @@ __metadata: languageName: node linkType: hard +"prettier-plugin-tailwindcss@npm:^0.5.9": + version: 0.5.11 + resolution: "prettier-plugin-tailwindcss@npm:0.5.11" + peerDependencies: + "@ianvs/prettier-plugin-sort-imports": "*" + "@prettier/plugin-pug": "*" + "@shopify/prettier-plugin-liquid": "*" + "@trivago/prettier-plugin-sort-imports": "*" + prettier: ^3.0 + prettier-plugin-astro: "*" + prettier-plugin-css-order: "*" + prettier-plugin-import-sort: "*" + prettier-plugin-jsdoc: "*" + prettier-plugin-marko: "*" + prettier-plugin-organize-attributes: "*" + prettier-plugin-organize-imports: "*" + prettier-plugin-style-order: "*" + prettier-plugin-svelte: "*" + peerDependenciesMeta: + "@ianvs/prettier-plugin-sort-imports": + optional: true + "@prettier/plugin-pug": + optional: true + "@shopify/prettier-plugin-liquid": + optional: true + "@trivago/prettier-plugin-sort-imports": + optional: true + prettier-plugin-astro: + optional: true + prettier-plugin-css-order: + optional: true + prettier-plugin-import-sort: + optional: true + prettier-plugin-jsdoc: + optional: true + prettier-plugin-marko: + optional: true + prettier-plugin-organize-attributes: + optional: true + prettier-plugin-organize-imports: + optional: true + prettier-plugin-style-order: + optional: true + prettier-plugin-svelte: + optional: true + prettier-plugin-twig-melody: + optional: true + checksum: 46e095d2a4298820a75a7b36022e8f2bcd1658a289f2ab11e4b9d4b6075272fee003d9959d084dcb33d5d669daf275e978d9a9aed35efe5eb9e77e70070b47f6 + languageName: node + linkType: hard + "prettier@npm:^2.7.1": version: 2.8.8 resolution: "prettier@npm:2.8.8"