From 3a8b7b9b2febd2262dd0ffb4cc469c8bedd03e2e Mon Sep 17 00:00:00 2001 From: Emmanuel-Develops Date: Thu, 5 Sep 2024 03:05:59 +0100 Subject: [PATCH 1/4] ci: lint, prettier and typo check --- .github/workflows/check-code.yml | 31 + .github/workflows/spellings.yml | 16 + eslint.config.js | 29 + package.json | 13 +- typos.toml | 23 + yarn.lock | 1129 +++++++++++++++++++++++++++++- 6 files changed, 1210 insertions(+), 31 deletions(-) create mode 100644 .github/workflows/check-code.yml create mode 100644 .github/workflows/spellings.yml create mode 100644 eslint.config.js create mode 100644 typos.toml diff --git a/.github/workflows/check-code.yml b/.github/workflows/check-code.yml new file mode 100644 index 0000000..466d6c2 --- /dev/null +++ b/.github/workflows/check-code.yml @@ -0,0 +1,31 @@ +name: Check Code + +on: + pull_request: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + persist-credentials: true + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "20" + + - name: Install dependencies + run: yarn install --immutable + + - name: Run lint + run: yarn lint + + - name: Check formatting + run: yarn format:check + + - name: Run typecheck + run: yarn typecheck + diff --git a/.github/workflows/spellings.yml b/.github/workflows/spellings.yml new file mode 100644 index 0000000..f11e2ec --- /dev/null +++ b/.github/workflows/spellings.yml @@ -0,0 +1,16 @@ +name: Spelling + +on: + pull_request: + +jobs: + spelling: + name: Spell Check with Typos + runs-on: ubuntu-latest + steps: + - name: Checkout Actions Repository + uses: actions/checkout@v3 + - name: Spell Check Repo + uses: crate-ci/typos@master + with: + config: typos.toml diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..2b60b1d --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,29 @@ +const typescript = require('@typescript-eslint/eslint-plugin'); +const typescriptParser = require('@typescript-eslint/parser'); +const react = require('eslint-plugin-react'); + +module.exports = [ + { + files: ['**/*.{js,jsx,ts,tsx}'], + plugins: { + '@typescript-eslint': typescript, + 'react': react, + }, + languageOptions: { + parser: typescriptParser, + parserOptions: { + ecmaFeatures: { jsx: true }, + }, + }, + rules: { + ...typescript.configs['recommended'].rules, + ...react.configs['recommended'].rules, + 'no-console': ['warn', { allow: ['warn', 'error'] }], + }, + settings: { + react: { + version: 'detect', + }, + }, + }, +]; \ No newline at end of file diff --git a/package.json b/package.json index 97c8355..241c302 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,12 @@ "test": "jest", "prepublishOnly": "npm run build", "storybook": "storybook dev -p 6006", - "build-storybook": "storybook build" + "build-storybook": "storybook build", + "lint": "eslint \"src/**/*.{ts,tsx,js,jsx}\"", + "typecheck": "tsc --noEmit", + "format:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,css,md}\"", + "format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,json,css,md}\"", + "check-code": "yarn lint && yarn typecheck" }, "peerDependencies": { "react": "^17.0.0 || ^18.0.0", @@ -63,13 +68,19 @@ "@storybook/test": "^8.1.10", "@testing-library/jest-dom": "^6.4.6", "@testing-library/react": "^16.0.0", + "@types/eslint": "^9", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", + "@typescript-eslint/eslint-plugin": "^8.4.0", + "@typescript-eslint/parser": "^8.4.0", "autoprefixer": "^10.4.19", "concurrently": "^8.2.2", + "eslint": "^9.9.1", + "eslint-plugin-react": "^7.35.2", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", "postcss": "^8.4.38", + "prettier": "^3.3.3", "react": "^17.0.0 || ^18.0.0", "react-dom": "^17.0.0 || ^18.0.0", "semantic-release": "^24.0.0", diff --git a/typos.toml b/typos.toml new file mode 100644 index 0000000..9e3ed42 --- /dev/null +++ b/typos.toml @@ -0,0 +1,23 @@ +# ignore text that looks like a bitcoin address or a lightning invoice or a jwt token +# as they are likely to be false positives +[default] +extend-ignore-identifiers-re = [ + "^bc1[a-zA-Z0-9]{39,59}$", # Enhanced to specify length for Bitcoin bech32 addresses + "^lnbc1[a-zA-Z0-9]{71,}$", # Start for Lightning invoices; adjusted for potential longer starts + "\"eyJ[a-zA-Z0-9_\\-\\.]+\"" # JWT token pattern +] + +extend-ignore-re = [ + "\\/\\/[^\n]*" # Ignore double slash comments in code +] + +[files] +extend-exclude = [ + "**/node_modules/**", # Exclude all node_modules directories + "**/dist/**", # Exclude all dist directories + "**/*.json", # Exclude all JSON files + "scripts/**", # Exclude the scriptsOut directory + "**/*.min.js", # Exclude minified JS files + "**/*.bundle.js", # Exclude bundled JS files + "**/*.d.ts" # Exclude TypeScript definition files if not needed +] \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index c6a7b7a..dcc8de0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1512,14 +1512,20 @@ __metadata: "@storybook/test": "npm:^8.1.10" "@testing-library/jest-dom": "npm:^6.4.6" "@testing-library/react": "npm:^16.0.0" + "@types/eslint": "npm:^9" "@types/react": "npm:^18.3.3" "@types/react-dom": "npm:^18.3.0" + "@typescript-eslint/eslint-plugin": "npm:^8.4.0" + "@typescript-eslint/parser": "npm:^8.4.0" autoprefixer: "npm:^10.4.19" clsx: "npm:^2.1.1" concurrently: "npm:^8.2.2" + eslint: "npm:^9.9.1" + eslint-plugin-react: "npm:^7.35.2" jest: "npm:^29.7.0" jest-environment-jsdom: "npm:^29.7.0" postcss: "npm:^8.4.38" + prettier: "npm:^3.3.3" react: "npm:^17.0.0 || ^18.0.0" react-dom: "npm:^17.0.0 || ^18.0.0" semantic-release: "npm:^24.0.0" @@ -1892,6 +1898,66 @@ __metadata: languageName: node linkType: hard +"@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": + version: 4.4.0 + resolution: "@eslint-community/eslint-utils@npm:4.4.0" + dependencies: + eslint-visitor-keys: "npm:^3.3.0" + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + checksum: 10c0/7e559c4ce59cd3a06b1b5a517b593912e680a7f981ae7affab0d01d709e99cd5647019be8fafa38c350305bc32f1f7d42c7073edde2ab536c745e365f37b607e + languageName: node + linkType: hard + +"@eslint-community/regexpp@npm:^4.10.0, @eslint-community/regexpp@npm:^4.11.0": + version: 4.11.0 + resolution: "@eslint-community/regexpp@npm:4.11.0" + checksum: 10c0/0f6328869b2741e2794da4ad80beac55cba7de2d3b44f796a60955b0586212ec75e6b0253291fd4aad2100ad471d1480d8895f2b54f1605439ba4c875e05e523 + languageName: node + linkType: hard + +"@eslint/config-array@npm:^0.18.0": + version: 0.18.0 + resolution: "@eslint/config-array@npm:0.18.0" + dependencies: + "@eslint/object-schema": "npm:^2.1.4" + debug: "npm:^4.3.1" + minimatch: "npm:^3.1.2" + checksum: 10c0/0234aeb3e6b052ad2402a647d0b4f8a6aa71524bafe1adad0b8db1dfe94d7f5f26d67c80f79bb37ac61361a1d4b14bb8fb475efe501de37263cf55eabb79868f + languageName: node + linkType: hard + +"@eslint/eslintrc@npm:^3.1.0": + version: 3.1.0 + resolution: "@eslint/eslintrc@npm:3.1.0" + dependencies: + ajv: "npm:^6.12.4" + debug: "npm:^4.3.2" + espree: "npm:^10.0.1" + globals: "npm:^14.0.0" + ignore: "npm:^5.2.0" + import-fresh: "npm:^3.2.1" + js-yaml: "npm:^4.1.0" + minimatch: "npm:^3.1.2" + strip-json-comments: "npm:^3.1.1" + checksum: 10c0/5b7332ed781edcfc98caa8dedbbb843abfb9bda2e86538529c843473f580e40c69eb894410eddc6702f487e9ee8f8cfa8df83213d43a8fdb549f23ce06699167 + languageName: node + linkType: hard + +"@eslint/js@npm:9.9.1": + version: 9.9.1 + resolution: "@eslint/js@npm:9.9.1" + checksum: 10c0/a3a91de2ce78469f7c4eee78c1eba77360706e1d0fa0ace2e19102079bcf237b851217c85ea501dc92c4c3719d60d9df966977abc8554d4c38e3638c1f53dcb2 + languageName: node + linkType: hard + +"@eslint/object-schema@npm:^2.1.4": + version: 2.1.4 + resolution: "@eslint/object-schema@npm:2.1.4" + checksum: 10c0/e9885532ea70e483fb007bf1275968b05bb15ebaa506d98560c41a41220d33d342e19023d5f2939fed6eb59676c1bda5c847c284b4b55fce521d282004da4dda + languageName: node + linkType: hard + "@fal-works/esbuild-plugin-global-externals@npm:^2.1.2": version: 2.1.2 resolution: "@fal-works/esbuild-plugin-global-externals@npm:2.1.2" @@ -1899,6 +1965,20 @@ __metadata: languageName: node linkType: hard +"@humanwhocodes/module-importer@npm:^1.0.1": + version: 1.0.1 + resolution: "@humanwhocodes/module-importer@npm:1.0.1" + checksum: 10c0/909b69c3b86d482c26b3359db16e46a32e0fb30bd306a3c176b8313b9e7313dba0f37f519de6aa8b0a1921349e505f259d19475e123182416a506d7f87e7f529 + languageName: node + linkType: hard + +"@humanwhocodes/retry@npm:^0.3.0": + version: 0.3.0 + resolution: "@humanwhocodes/retry@npm:0.3.0" + checksum: 10c0/7111ec4e098b1a428459b4e3be5a5d2a13b02905f805a2468f4fa628d072f0de2da26a27d04f65ea2846f73ba51f4204661709f05bfccff645e3cedef8781bb6 + languageName: node + linkType: hard + "@isaacs/cliui@npm:^8.0.2": version: 8.0.2 resolution: "@isaacs/cliui@npm:8.0.2" @@ -2262,7 +2342,7 @@ __metadata: languageName: node linkType: hard -"@nodelib/fs.walk@npm:^1.2.3": +"@nodelib/fs.walk@npm:^1.2.3, @nodelib/fs.walk@npm:^1.2.8": version: 1.2.8 resolution: "@nodelib/fs.walk@npm:1.2.8" dependencies: @@ -4480,6 +4560,16 @@ __metadata: languageName: node linkType: hard +"@types/eslint@npm:^9": + version: 9.6.1 + resolution: "@types/eslint@npm:9.6.1" + dependencies: + "@types/estree": "npm:*" + "@types/json-schema": "npm:*" + checksum: 10c0/69ba24fee600d1e4c5abe0df086c1a4d798abf13792d8cfab912d76817fe1a894359a1518557d21237fbaf6eda93c5ab9309143dee4c59ef54336d1b3570420e + languageName: node + linkType: hard + "@types/estree@npm:*, @types/estree@npm:1.0.5, @types/estree@npm:^1.0.0, @types/estree@npm:^1.0.5": version: 1.0.5 resolution: "@types/estree@npm:1.0.5" @@ -4772,6 +4862,122 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/eslint-plugin@npm:^8.4.0": + version: 8.4.0 + resolution: "@typescript-eslint/eslint-plugin@npm:8.4.0" + dependencies: + "@eslint-community/regexpp": "npm:^4.10.0" + "@typescript-eslint/scope-manager": "npm:8.4.0" + "@typescript-eslint/type-utils": "npm:8.4.0" + "@typescript-eslint/utils": "npm:8.4.0" + "@typescript-eslint/visitor-keys": "npm:8.4.0" + graphemer: "npm:^1.4.0" + ignore: "npm:^5.3.1" + natural-compare: "npm:^1.4.0" + ts-api-utils: "npm:^1.3.0" + peerDependencies: + "@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 10c0/c75e9bb176e9e0277c9f9c4c006bc2c31ac91984e555de1390a9bbe876e3b6787d59d96015b3f0cd083fd22c814aea4ed4858910d3afdd24d64ab79815da31e5 + languageName: node + linkType: hard + +"@typescript-eslint/parser@npm:^8.4.0": + version: 8.4.0 + resolution: "@typescript-eslint/parser@npm:8.4.0" + dependencies: + "@typescript-eslint/scope-manager": "npm:8.4.0" + "@typescript-eslint/types": "npm:8.4.0" + "@typescript-eslint/typescript-estree": "npm:8.4.0" + "@typescript-eslint/visitor-keys": "npm:8.4.0" + debug: "npm:^4.3.4" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + peerDependenciesMeta: + typescript: + optional: true + checksum: 10c0/19f3358e5bc4bbad693183eefe1a90ea64be054a934bc2c8a972ff4738b94580b55ad4955af5797db42298628caa59b3ba3f9fd960582b5fc2c836da3a4578a5 + languageName: node + linkType: hard + +"@typescript-eslint/scope-manager@npm:8.4.0": + version: 8.4.0 + resolution: "@typescript-eslint/scope-manager@npm:8.4.0" + dependencies: + "@typescript-eslint/types": "npm:8.4.0" + "@typescript-eslint/visitor-keys": "npm:8.4.0" + checksum: 10c0/95188c663df7db106529c6b93c4c7c61647ed34ab6dd48114e41ddf49140ff606c5501ce2ae451a988ec49b5d3874ea96ff212fc102802327b10affd2ff80a37 + languageName: node + linkType: hard + +"@typescript-eslint/type-utils@npm:8.4.0": + version: 8.4.0 + resolution: "@typescript-eslint/type-utils@npm:8.4.0" + dependencies: + "@typescript-eslint/typescript-estree": "npm:8.4.0" + "@typescript-eslint/utils": "npm:8.4.0" + debug: "npm:^4.3.4" + ts-api-utils: "npm:^1.3.0" + peerDependenciesMeta: + typescript: + optional: true + checksum: 10c0/ae51100594d9ca61c7577b5aed0bd10c1959725df5c38cd9653eed1fd3dbdfff9146b6e48f3409994b4c8d781b9d95025c36b30f73a5a1b3dbdee6d142cecc87 + languageName: node + linkType: hard + +"@typescript-eslint/types@npm:8.4.0": + version: 8.4.0 + resolution: "@typescript-eslint/types@npm:8.4.0" + checksum: 10c0/15e09ced84827c349553530a31822f06ae5bad456c03d561b7d0c64b6ad9b5d7ca795e030bd93e65d5a2cd41bfde36ed08dcd2ff9feaa8b60a67080827f47ecb + languageName: node + linkType: hard + +"@typescript-eslint/typescript-estree@npm:8.4.0": + version: 8.4.0 + resolution: "@typescript-eslint/typescript-estree@npm:8.4.0" + dependencies: + "@typescript-eslint/types": "npm:8.4.0" + "@typescript-eslint/visitor-keys": "npm:8.4.0" + debug: "npm:^4.3.4" + fast-glob: "npm:^3.3.2" + is-glob: "npm:^4.0.3" + minimatch: "npm:^9.0.4" + semver: "npm:^7.6.0" + ts-api-utils: "npm:^1.3.0" + peerDependenciesMeta: + typescript: + optional: true + checksum: 10c0/170702b024121cff9268f53de8054796b0ce025f9a78d6f2bc850a360e5f3f7032ba3ee9d4b7392726308273a5f3ade5ab31b1788b504b514bc15afc07302b37 + languageName: node + linkType: hard + +"@typescript-eslint/utils@npm:8.4.0": + version: 8.4.0 + resolution: "@typescript-eslint/utils@npm:8.4.0" + dependencies: + "@eslint-community/eslint-utils": "npm:^4.4.0" + "@typescript-eslint/scope-manager": "npm:8.4.0" + "@typescript-eslint/types": "npm:8.4.0" + "@typescript-eslint/typescript-estree": "npm:8.4.0" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + checksum: 10c0/8c9c36b3aa23f9bcc28cc4b10f0fa2996f1bc6cdd75135f08c2ef734baa30dbd2a8b92f344b90518e1fd07a486936734789fc7e90b780221a7707dad8e9c9364 + languageName: node + linkType: hard + +"@typescript-eslint/visitor-keys@npm:8.4.0": + version: 8.4.0 + resolution: "@typescript-eslint/visitor-keys@npm:8.4.0" + dependencies: + "@typescript-eslint/types": "npm:8.4.0" + eslint-visitor-keys: "npm:^3.4.3" + checksum: 10c0/339199b7fbb9ac83b530d03ab25f6bc5ceb688c9cd0ae460112cd14ee78ca7284a845aef5620cdf70170980123475ec875e85ebf595c60255ba3c0d6fe48c714 + languageName: node + linkType: hard + "@ungap/structured-clone@npm:^1.0.0": version: 1.2.0 resolution: "@ungap/structured-clone@npm:1.2.0" @@ -5071,7 +5277,7 @@ __metadata: languageName: node linkType: hard -"acorn-jsx@npm:^5.3.1": +"acorn-jsx@npm:^5.3.1, acorn-jsx@npm:^5.3.2": version: 5.3.2 resolution: "acorn-jsx@npm:5.3.2" peerDependencies: @@ -5114,6 +5320,15 @@ __metadata: languageName: node linkType: hard +"acorn@npm:^8.12.0": + version: 8.12.1 + resolution: "acorn@npm:8.12.1" + bin: + acorn: bin/acorn + checksum: 10c0/51fb26cd678f914e13287e886da2d7021f8c2bc0ccc95e03d3e0447ee278dd3b40b9c57dc222acd5881adcf26f3edc40901a4953403232129e3876793cd17386 + languageName: node + linkType: hard + "address@npm:^1.0.1": version: 1.2.2 resolution: "address@npm:1.2.2" @@ -5193,7 +5408,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^6.12.5": +"ajv@npm:^6.12.4, ajv@npm:^6.12.5": version: 6.12.6 resolution: "ajv@npm:6.12.6" dependencies: @@ -5371,7 +5586,7 @@ __metadata: languageName: node linkType: hard -"array-buffer-byte-length@npm:^1.0.0": +"array-buffer-byte-length@npm:^1.0.0, array-buffer-byte-length@npm:^1.0.1": version: 1.0.1 resolution: "array-buffer-byte-length@npm:1.0.1" dependencies: @@ -5395,6 +5610,20 @@ __metadata: languageName: node linkType: hard +"array-includes@npm:^3.1.6, array-includes@npm:^3.1.8": + version: 3.1.8 + resolution: "array-includes@npm:3.1.8" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.2" + es-object-atoms: "npm:^1.0.0" + get-intrinsic: "npm:^1.2.4" + is-string: "npm:^1.0.7" + checksum: 10c0/5b1004d203e85873b96ddc493f090c9672fd6c80d7a60b798da8a14bff8a670ff95db5aafc9abc14a211943f05220dacf8ea17638ae0af1a6a47b8c0b48ce370 + languageName: node + linkType: hard + "array-union@npm:^2.1.0": version: 2.1.0 resolution: "array-union@npm:2.1.0" @@ -5402,6 +5631,73 @@ __metadata: languageName: node linkType: hard +"array.prototype.findlast@npm:^1.2.5": + version: 1.2.5 + resolution: "array.prototype.findlast@npm:1.2.5" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.2" + es-errors: "npm:^1.3.0" + es-object-atoms: "npm:^1.0.0" + es-shim-unscopables: "npm:^1.0.2" + checksum: 10c0/ddc952b829145ab45411b9d6adcb51a8c17c76bf89c9dd64b52d5dffa65d033da8c076ed2e17091779e83bc892b9848188d7b4b33453c5565e65a92863cb2775 + languageName: node + linkType: hard + +"array.prototype.flat@npm:^1.3.1": + version: 1.3.2 + resolution: "array.prototype.flat@npm:1.3.2" + dependencies: + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.2.0" + es-abstract: "npm:^1.22.1" + es-shim-unscopables: "npm:^1.0.0" + checksum: 10c0/a578ed836a786efbb6c2db0899ae80781b476200617f65a44846cb1ed8bd8b24c8821b83703375d8af639c689497b7b07277060024b9919db94ac3e10dc8a49b + languageName: node + linkType: hard + +"array.prototype.flatmap@npm:^1.3.2": + version: 1.3.2 + resolution: "array.prototype.flatmap@npm:1.3.2" + dependencies: + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.2.0" + es-abstract: "npm:^1.22.1" + es-shim-unscopables: "npm:^1.0.0" + checksum: 10c0/67b3f1d602bb73713265145853128b1ad77cc0f9b833c7e1e056b323fbeac41a4ff1c9c99c7b9445903caea924d9ca2450578d9011913191aa88cc3c3a4b54f4 + languageName: node + linkType: hard + +"array.prototype.tosorted@npm:^1.1.4": + version: 1.1.4 + resolution: "array.prototype.tosorted@npm:1.1.4" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.3" + es-errors: "npm:^1.3.0" + es-shim-unscopables: "npm:^1.0.2" + checksum: 10c0/eb3c4c4fc0381b0bf6dba2ea4d48d367c2827a0d4236a5718d97caaccc6b78f11f4cadf090736e86301d295a6aa4967ed45568f92ced51be8cbbacd9ca410943 + languageName: node + linkType: hard + +"arraybuffer.prototype.slice@npm:^1.0.3": + version: 1.0.3 + resolution: "arraybuffer.prototype.slice@npm:1.0.3" + dependencies: + array-buffer-byte-length: "npm:^1.0.1" + call-bind: "npm:^1.0.5" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.22.3" + es-errors: "npm:^1.2.1" + get-intrinsic: "npm:^1.2.3" + is-array-buffer: "npm:^3.0.4" + is-shared-array-buffer: "npm:^1.0.2" + checksum: 10c0/d32754045bcb2294ade881d45140a5e52bda2321b9e98fa514797b7f0d252c4c5ab0d1edb34112652c62fa6a9398def568da63a4d7544672229afea283358c36 + languageName: node + linkType: hard + "assert@npm:^2.1.0": version: 2.1.0 resolution: "assert@npm:2.1.0" @@ -6570,7 +6866,7 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.3": +"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" dependencies: @@ -6691,6 +6987,39 @@ __metadata: languageName: node linkType: hard +"data-view-buffer@npm:^1.0.1": + version: 1.0.1 + resolution: "data-view-buffer@npm:1.0.1" + dependencies: + call-bind: "npm:^1.0.6" + es-errors: "npm:^1.3.0" + is-data-view: "npm:^1.0.1" + checksum: 10c0/8984119e59dbed906a11fcfb417d7d861936f16697a0e7216fe2c6c810f6b5e8f4a5281e73f2c28e8e9259027190ac4a33e2a65fdd7fa86ac06b76e838918583 + languageName: node + linkType: hard + +"data-view-byte-length@npm:^1.0.1": + version: 1.0.1 + resolution: "data-view-byte-length@npm:1.0.1" + dependencies: + call-bind: "npm:^1.0.7" + es-errors: "npm:^1.3.0" + is-data-view: "npm:^1.0.1" + checksum: 10c0/b7d9e48a0cf5aefed9ab7d123559917b2d7e0d65531f43b2fd95b9d3a6b46042dd3fca597c42bba384e66b70d7ad66ff23932f8367b241f53d93af42cfe04ec2 + languageName: node + linkType: hard + +"data-view-byte-offset@npm:^1.0.0": + version: 1.0.0 + resolution: "data-view-byte-offset@npm:1.0.0" + dependencies: + call-bind: "npm:^1.0.6" + es-errors: "npm:^1.3.0" + is-data-view: "npm:^1.0.1" + checksum: 10c0/21b0d2e53fd6e20cc4257c873bf6d36d77bd6185624b84076c0a1ddaa757b49aaf076254006341d35568e89f52eecd1ccb1a502cfb620f2beca04f48a6a62a8f + languageName: node + linkType: hard + "date-fns@npm:^2.30.0": version: 2.30.0 resolution: "date-fns@npm:2.30.0" @@ -6721,7 +7050,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:^4.0.0": +"debug@npm:^4.0.0, debug@npm:^4.3.2": version: 4.3.6 resolution: "debug@npm:4.3.6" dependencies: @@ -6801,6 +7130,13 @@ __metadata: languageName: node linkType: hard +"deep-is@npm:^0.1.3": + version: 0.1.4 + resolution: "deep-is@npm:0.1.4" + checksum: 10c0/7f0ee496e0dff14a573dc6127f14c95061b448b87b995fc96c017ce0a1e66af1675e73f1d6064407975bc4ea6ab679497a29fff7b5b9c4e99cb10797c1ad0b4c + languageName: node + linkType: hard + "deepmerge@npm:^4.2.2": version: 4.3.1 resolution: "deepmerge@npm:4.3.1" @@ -6845,7 +7181,7 @@ __metadata: languageName: node linkType: hard -"define-properties@npm:^1.1.3, define-properties@npm:^1.2.1": +"define-properties@npm:^1.1.3, define-properties@npm:^1.2.0, define-properties@npm:^1.2.1": version: 1.2.1 resolution: "define-properties@npm:1.2.1" dependencies: @@ -6971,6 +7307,15 @@ __metadata: languageName: node linkType: hard +"doctrine@npm:^2.1.0": + version: 2.1.0 + resolution: "doctrine@npm:2.1.0" + dependencies: + esutils: "npm:^2.0.2" + checksum: 10c0/b6416aaff1f380bf56c3b552f31fdf7a69b45689368deca72d28636f41c16bb28ec3ebc40ace97db4c1afc0ceeb8120e8492fe0046841c94c2933b2e30a7d5ac + languageName: node + linkType: hard + "doctrine@npm:^3.0.0": version: 3.0.0 resolution: "doctrine@npm:3.0.0" @@ -7259,6 +7604,60 @@ __metadata: languageName: node linkType: hard +"es-abstract@npm:^1.17.5, es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3, es-abstract@npm:^1.23.0, es-abstract@npm:^1.23.1, es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.3": + version: 1.23.3 + resolution: "es-abstract@npm:1.23.3" + dependencies: + array-buffer-byte-length: "npm:^1.0.1" + arraybuffer.prototype.slice: "npm:^1.0.3" + available-typed-arrays: "npm:^1.0.7" + call-bind: "npm:^1.0.7" + data-view-buffer: "npm:^1.0.1" + data-view-byte-length: "npm:^1.0.1" + data-view-byte-offset: "npm:^1.0.0" + es-define-property: "npm:^1.0.0" + es-errors: "npm:^1.3.0" + es-object-atoms: "npm:^1.0.0" + es-set-tostringtag: "npm:^2.0.3" + es-to-primitive: "npm:^1.2.1" + function.prototype.name: "npm:^1.1.6" + get-intrinsic: "npm:^1.2.4" + get-symbol-description: "npm:^1.0.2" + globalthis: "npm:^1.0.3" + gopd: "npm:^1.0.1" + has-property-descriptors: "npm:^1.0.2" + has-proto: "npm:^1.0.3" + has-symbols: "npm:^1.0.3" + hasown: "npm:^2.0.2" + internal-slot: "npm:^1.0.7" + is-array-buffer: "npm:^3.0.4" + is-callable: "npm:^1.2.7" + is-data-view: "npm:^1.0.1" + is-negative-zero: "npm:^2.0.3" + is-regex: "npm:^1.1.4" + is-shared-array-buffer: "npm:^1.0.3" + is-string: "npm:^1.0.7" + is-typed-array: "npm:^1.1.13" + is-weakref: "npm:^1.0.2" + object-inspect: "npm:^1.13.1" + object-keys: "npm:^1.1.1" + object.assign: "npm:^4.1.5" + regexp.prototype.flags: "npm:^1.5.2" + safe-array-concat: "npm:^1.1.2" + safe-regex-test: "npm:^1.0.3" + string.prototype.trim: "npm:^1.2.9" + string.prototype.trimend: "npm:^1.0.8" + string.prototype.trimstart: "npm:^1.0.8" + typed-array-buffer: "npm:^1.0.2" + typed-array-byte-length: "npm:^1.0.1" + typed-array-byte-offset: "npm:^1.0.2" + typed-array-length: "npm:^1.0.6" + unbox-primitive: "npm:^1.0.2" + which-typed-array: "npm:^1.1.15" + checksum: 10c0/d27e9afafb225c6924bee9971a7f25f20c314f2d6cb93a63cada4ac11dcf42040896a6c22e5fb8f2a10767055ed4ddf400be3b1eb12297d281726de470b75666 + languageName: node + linkType: hard + "es-define-property@npm:^1.0.0": version: 1.0.0 resolution: "es-define-property@npm:1.0.0" @@ -7268,7 +7667,7 @@ __metadata: languageName: node linkType: hard -"es-errors@npm:^1.3.0": +"es-errors@npm:^1.2.1, es-errors@npm:^1.3.0": version: 1.3.0 resolution: "es-errors@npm:1.3.0" checksum: 10c0/0a61325670072f98d8ae3b914edab3559b6caa980f08054a3b872052640d91da01d38df55df797fcc916389d77fc92b8d5906cf028f4db46d7e3003abecbca85 @@ -7292,6 +7691,28 @@ __metadata: languageName: node linkType: hard +"es-iterator-helpers@npm:^1.0.19": + version: 1.0.19 + resolution: "es-iterator-helpers@npm:1.0.19" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.3" + es-errors: "npm:^1.3.0" + es-set-tostringtag: "npm:^2.0.3" + function-bind: "npm:^1.1.2" + get-intrinsic: "npm:^1.2.4" + globalthis: "npm:^1.0.3" + has-property-descriptors: "npm:^1.0.2" + has-proto: "npm:^1.0.3" + has-symbols: "npm:^1.0.3" + internal-slot: "npm:^1.0.7" + iterator.prototype: "npm:^1.1.2" + safe-array-concat: "npm:^1.1.2" + checksum: 10c0/ae8f0241e383b3d197383b9842c48def7fce0255fb6ed049311b686ce295595d9e389b466f6a1b7d4e7bb92d82f5e716d6fae55e20c1040249bf976743b038c5 + languageName: node + linkType: hard + "es-module-lexer@npm:^1.2.1, es-module-lexer@npm:^1.5.0": version: 1.5.4 resolution: "es-module-lexer@npm:1.5.4" @@ -7299,6 +7720,46 @@ __metadata: languageName: node linkType: hard +"es-object-atoms@npm:^1.0.0": + version: 1.0.0 + resolution: "es-object-atoms@npm:1.0.0" + dependencies: + es-errors: "npm:^1.3.0" + checksum: 10c0/1fed3d102eb27ab8d983337bb7c8b159dd2a1e63ff833ec54eea1311c96d5b08223b433060ba240541ca8adba9eee6b0a60cdbf2f80634b784febc9cc8b687b4 + languageName: node + linkType: hard + +"es-set-tostringtag@npm:^2.0.3": + version: 2.0.3 + resolution: "es-set-tostringtag@npm:2.0.3" + dependencies: + get-intrinsic: "npm:^1.2.4" + has-tostringtag: "npm:^1.0.2" + hasown: "npm:^2.0.1" + checksum: 10c0/f22aff1585eb33569c326323f0b0d175844a1f11618b86e193b386f8be0ea9474cfbe46df39c45d959f7aa8f6c06985dc51dd6bce5401645ec5a74c4ceaa836a + languageName: node + linkType: hard + +"es-shim-unscopables@npm:^1.0.0, es-shim-unscopables@npm:^1.0.2": + version: 1.0.2 + resolution: "es-shim-unscopables@npm:1.0.2" + dependencies: + hasown: "npm:^2.0.0" + checksum: 10c0/f495af7b4b7601a4c0cfb893581c352636e5c08654d129590386a33a0432cf13a7bdc7b6493801cadd990d838e2839b9013d1de3b880440cb537825e834fe783 + languageName: node + linkType: hard + +"es-to-primitive@npm:^1.2.1": + version: 1.2.1 + resolution: "es-to-primitive@npm:1.2.1" + dependencies: + is-callable: "npm:^1.1.4" + is-date-object: "npm:^1.0.1" + is-symbol: "npm:^1.0.2" + checksum: 10c0/0886572b8dc075cb10e50c0af62a03d03a68e1e69c388bd4f10c0649ee41b1fbb24840a1b7e590b393011b5cdbe0144b776da316762653685432df37d6de60f1 + languageName: node + linkType: hard + "esbuild-plugin-alias@npm:^0.2.1": version: 0.2.1 resolution: "esbuild-plugin-alias@npm:0.2.1" @@ -7512,6 +7973,13 @@ __metadata: languageName: node linkType: hard +"escape-string-regexp@npm:^4.0.0": + version: 4.0.0 + resolution: "escape-string-regexp@npm:4.0.0" + checksum: 10c0/9497d4dd307d845bd7f75180d8188bb17ea8c151c1edbf6b6717c100e104d629dc2dfb687686181b0f4b7d732c7dfdc4d5e7a8ff72de1b0ca283a75bbb3a9cd9 + languageName: node + linkType: hard + "escodegen@npm:^2.0.0, escodegen@npm:^2.1.0": version: 2.1.0 resolution: "escodegen@npm:2.1.0" @@ -7530,6 +7998,34 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-react@npm:^7.35.2": + version: 7.35.2 + resolution: "eslint-plugin-react@npm:7.35.2" + dependencies: + array-includes: "npm:^3.1.8" + array.prototype.findlast: "npm:^1.2.5" + array.prototype.flatmap: "npm:^1.3.2" + array.prototype.tosorted: "npm:^1.1.4" + doctrine: "npm:^2.1.0" + es-iterator-helpers: "npm:^1.0.19" + estraverse: "npm:^5.3.0" + hasown: "npm:^2.0.2" + jsx-ast-utils: "npm:^2.4.1 || ^3.0.0" + minimatch: "npm:^3.1.2" + object.entries: "npm:^1.1.8" + object.fromentries: "npm:^2.0.8" + object.values: "npm:^1.2.0" + prop-types: "npm:^15.8.1" + resolve: "npm:^2.0.0-next.5" + semver: "npm:^6.3.1" + string.prototype.matchall: "npm:^4.0.11" + string.prototype.repeat: "npm:^1.0.0" + peerDependencies: + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 + checksum: 10c0/5f891f5a77e902a0ca8d10b23d0b800e90a09400187febe5986c5078d6277baa4b974d6acdbba25baae065dbcf12eb9241b5f5782527d0780314c2ee5006a8af + languageName: node + linkType: hard + "eslint-scope@npm:5.1.1": version: 5.1.1 resolution: "eslint-scope@npm:5.1.1" @@ -7540,6 +8036,90 @@ __metadata: languageName: node linkType: hard +"eslint-scope@npm:^8.0.2": + version: 8.0.2 + resolution: "eslint-scope@npm:8.0.2" + dependencies: + esrecurse: "npm:^4.3.0" + estraverse: "npm:^5.2.0" + checksum: 10c0/477f820647c8755229da913025b4567347fd1f0bf7cbdf3a256efff26a7e2e130433df052bd9e3d014025423dc00489bea47eb341002b15553673379c1a7dc36 + languageName: node + linkType: hard + +"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.3": + version: 3.4.3 + resolution: "eslint-visitor-keys@npm:3.4.3" + checksum: 10c0/92708e882c0a5ffd88c23c0b404ac1628cf20104a108c745f240a13c332a11aac54f49a22d5762efbffc18ecbc9a580d1b7ad034bf5f3cc3307e5cbff2ec9820 + languageName: node + linkType: hard + +"eslint-visitor-keys@npm:^4.0.0": + version: 4.0.0 + resolution: "eslint-visitor-keys@npm:4.0.0" + checksum: 10c0/76619f42cf162705a1515a6868e6fc7567e185c7063a05621a8ac4c3b850d022661262c21d9f1fc1d144ecf0d5d64d70a3f43c15c3fc969a61ace0fb25698cf5 + languageName: node + linkType: hard + +"eslint@npm:^9.9.1": + version: 9.9.1 + resolution: "eslint@npm:9.9.1" + dependencies: + "@eslint-community/eslint-utils": "npm:^4.2.0" + "@eslint-community/regexpp": "npm:^4.11.0" + "@eslint/config-array": "npm:^0.18.0" + "@eslint/eslintrc": "npm:^3.1.0" + "@eslint/js": "npm:9.9.1" + "@humanwhocodes/module-importer": "npm:^1.0.1" + "@humanwhocodes/retry": "npm:^0.3.0" + "@nodelib/fs.walk": "npm:^1.2.8" + ajv: "npm:^6.12.4" + chalk: "npm:^4.0.0" + cross-spawn: "npm:^7.0.2" + debug: "npm:^4.3.2" + escape-string-regexp: "npm:^4.0.0" + eslint-scope: "npm:^8.0.2" + eslint-visitor-keys: "npm:^4.0.0" + espree: "npm:^10.1.0" + esquery: "npm:^1.5.0" + esutils: "npm:^2.0.2" + fast-deep-equal: "npm:^3.1.3" + file-entry-cache: "npm:^8.0.0" + find-up: "npm:^5.0.0" + glob-parent: "npm:^6.0.2" + ignore: "npm:^5.2.0" + imurmurhash: "npm:^0.1.4" + is-glob: "npm:^4.0.0" + is-path-inside: "npm:^3.0.3" + json-stable-stringify-without-jsonify: "npm:^1.0.1" + levn: "npm:^0.4.1" + lodash.merge: "npm:^4.6.2" + minimatch: "npm:^3.1.2" + natural-compare: "npm:^1.4.0" + optionator: "npm:^0.9.3" + strip-ansi: "npm:^6.0.1" + text-table: "npm:^0.2.0" + peerDependencies: + jiti: "*" + peerDependenciesMeta: + jiti: + optional: true + bin: + eslint: bin/eslint.js + checksum: 10c0/5e71efda7c0a14ee95436d5cdfed04ee61dfb1d89d7a32b50a424de2e680af82849628ea6581950c2e0726491f786a3cfd0032ce013c1c5093786e475cfdfb33 + languageName: node + linkType: hard + +"espree@npm:^10.0.1, espree@npm:^10.1.0": + version: 10.1.0 + resolution: "espree@npm:10.1.0" + dependencies: + acorn: "npm:^8.12.0" + acorn-jsx: "npm:^5.3.2" + eslint-visitor-keys: "npm:^4.0.0" + checksum: 10c0/52e6feaa77a31a6038f0c0e3fce93010a4625701925b0715cd54a2ae190b3275053a0717db698697b32653788ac04845e489d6773b508d6c2e8752f3c57470a0 + languageName: node + linkType: hard + "esprima@npm:^4.0.0, esprima@npm:^4.0.1, esprima@npm:~4.0.0": version: 4.0.1 resolution: "esprima@npm:4.0.1" @@ -7550,6 +8130,15 @@ __metadata: languageName: node linkType: hard +"esquery@npm:^1.5.0": + version: 1.6.0 + resolution: "esquery@npm:1.6.0" + dependencies: + estraverse: "npm:^5.1.0" + checksum: 10c0/cb9065ec605f9da7a76ca6dadb0619dfb611e37a81e318732977d90fab50a256b95fee2d925fba7c2f3f0523aa16f91587246693bc09bc34d5a59575fe6e93d2 + languageName: node + linkType: hard + "esrecurse@npm:^4.3.0": version: 4.3.0 resolution: "esrecurse@npm:4.3.0" @@ -7566,7 +8155,7 @@ __metadata: languageName: node linkType: hard -"estraverse@npm:^5.2.0": +"estraverse@npm:^5.1.0, estraverse@npm:^5.2.0, estraverse@npm:^5.3.0": version: 5.3.0 resolution: "estraverse@npm:5.3.0" checksum: 10c0/1ff9447b96263dec95d6d67431c5e0771eb9776427421260a3e2f0fdd5d6bd4f8e37a7338f5ad2880c9f143450c9b1e4fc2069060724570a49cf9cf0312bd107 @@ -7757,6 +8346,13 @@ __metadata: languageName: node linkType: hard +"fast-levenshtein@npm:^2.0.6": + version: 2.0.6 + resolution: "fast-levenshtein@npm:2.0.6" + checksum: 10c0/111972b37338bcb88f7d9e2c5907862c280ebf4234433b95bc611e518d192ccb2d38119c4ac86e26b668d75f7f3894f4ff5c4982899afced7ca78633b08287c4 + languageName: node + linkType: hard + "fastest-levenshtein@npm:^1.0.16": version: 1.0.16 resolution: "fastest-levenshtein@npm:1.0.16" @@ -7807,6 +8403,15 @@ __metadata: languageName: node linkType: hard +"file-entry-cache@npm:^8.0.0": + version: 8.0.0 + resolution: "file-entry-cache@npm:8.0.0" + dependencies: + flat-cache: "npm:^4.0.0" + checksum: 10c0/9e2b5938b1cd9b6d7e3612bdc533afd4ac17b2fc646569e9a8abbf2eb48e5eb8e316bc38815a3ef6a1b456f4107f0d0f055a614ca613e75db6bf9ff4d72c1638 + languageName: node + linkType: hard + "file-system-cache@npm:2.3.0": version: 2.3.0 resolution: "file-system-cache@npm:2.3.0" @@ -7945,6 +8550,16 @@ __metadata: languageName: node linkType: hard +"flat-cache@npm:^4.0.0": + version: 4.0.1 + resolution: "flat-cache@npm:4.0.1" + dependencies: + flatted: "npm:^3.2.9" + keyv: "npm:^4.5.4" + checksum: 10c0/2c59d93e9faa2523e4fda6b4ada749bed432cfa28c8e251f33b25795e426a1c6dbada777afb1f74fcfff33934fdbdea921ee738fcc33e71adc9d6eca984a1cfc + languageName: node + linkType: hard + "flatted@npm:^3.2.9": version: 3.3.1 resolution: "flatted@npm:3.3.1" @@ -8148,6 +8763,18 @@ __metadata: languageName: node linkType: hard +"function.prototype.name@npm:^1.1.6": + version: 1.1.6 + resolution: "function.prototype.name@npm:1.1.6" + dependencies: + call-bind: "npm:^1.0.2" + define-properties: "npm:^1.2.0" + es-abstract: "npm:^1.22.1" + functions-have-names: "npm:^1.2.3" + checksum: 10c0/9eae11294905b62cb16874adb4fc687927cda3162285e0ad9612e6a1d04934005d46907362ea9cdb7428edce05a2f2c3dabc3b2d21e9fd343e9bb278230ad94b + languageName: node + linkType: hard + "functions-have-names@npm:^1.2.3": version: 1.2.3 resolution: "functions-have-names@npm:1.2.3" @@ -8176,7 +8803,7 @@ __metadata: languageName: node linkType: hard -"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2, get-intrinsic@npm:^1.2.4": +"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": version: 1.2.4 resolution: "get-intrinsic@npm:1.2.4" dependencies: @@ -8241,6 +8868,17 @@ __metadata: languageName: node linkType: hard +"get-symbol-description@npm:^1.0.2": + version: 1.0.2 + resolution: "get-symbol-description@npm:1.0.2" + dependencies: + call-bind: "npm:^1.0.5" + es-errors: "npm:^1.3.0" + get-intrinsic: "npm:^1.2.4" + checksum: 10c0/867be6d63f5e0eb026cb3b0ef695ec9ecf9310febb041072d2e142f260bd91ced9eeb426b3af98791d1064e324e653424afa6fd1af17dee373bea48ae03162bc + languageName: node + linkType: hard + "giget@npm:^1.0.0": version: 1.2.3 resolution: "giget@npm:1.2.3" @@ -8358,6 +8996,23 @@ __metadata: languageName: node linkType: hard +"globals@npm:^14.0.0": + version: 14.0.0 + resolution: "globals@npm:14.0.0" + checksum: 10c0/b96ff42620c9231ad468d4c58ff42afee7777ee1c963013ff8aabe095a451d0ceeb8dcd8ef4cbd64d2538cef45f787a78ba3a9574f4a634438963e334471302d + languageName: node + linkType: hard + +"globalthis@npm:^1.0.3": + version: 1.0.4 + resolution: "globalthis@npm:1.0.4" + dependencies: + define-properties: "npm:^1.2.1" + gopd: "npm:^1.0.1" + checksum: 10c0/9d156f313af79d80b1566b93e19285f481c591ad6d0d319b4be5e03750d004dde40a39a0f26f7e635f9007a3600802f53ecd85a759b86f109e80a5f705e01846 + languageName: node + linkType: hard + "globby@npm:^11.0.3": version: 11.1.0 resolution: "globby@npm:11.1.0" @@ -8423,6 +9078,13 @@ __metadata: languageName: node linkType: hard +"graphemer@npm:^1.4.0": + version: 1.4.0 + resolution: "graphemer@npm:1.4.0" + checksum: 10c0/e951259d8cd2e0d196c72ec711add7115d42eb9a8146c8eeda5b8d3ac91e5dd816b9cd68920726d9fd4490368e7ed86e9c423f40db87e2d8dfafa00fa17c3a31 + languageName: node + linkType: hard + "gunzip-maybe@npm:^1.4.2": version: 1.4.2 resolution: "gunzip-maybe@npm:1.4.2" @@ -8457,7 +9119,7 @@ __metadata: languageName: node linkType: hard -"has-bigints@npm:^1.0.1": +"has-bigints@npm:^1.0.1, has-bigints@npm:^1.0.2": version: 1.0.2 resolution: "has-bigints@npm:1.0.2" checksum: 10c0/724eb1485bfa3cdff6f18d95130aa190561f00b3fcf9f19dc640baf8176b5917c143b81ec2123f8cddb6c05164a198c94b13e1377c497705ccc8e1a80306e83b @@ -8487,7 +9149,7 @@ __metadata: languageName: node linkType: hard -"has-proto@npm:^1.0.1": +"has-proto@npm:^1.0.1, has-proto@npm:^1.0.3": version: 1.0.3 resolution: "has-proto@npm:1.0.3" checksum: 10c0/35a6989f81e9f8022c2f4027f8b48a552de714938765d019dbea6bb547bd49ce5010a3c7c32ec6ddac6e48fc546166a3583b128f5a7add8b058a6d8b4afec205 @@ -8510,7 +9172,7 @@ __metadata: languageName: node linkType: hard -"hasown@npm:^2.0.0, hasown@npm:^2.0.2": +"hasown@npm:^2.0.0, hasown@npm:^2.0.1, hasown@npm:^2.0.2": version: 2.0.2 resolution: "hasown@npm:2.0.2" dependencies: @@ -8797,6 +9459,13 @@ __metadata: languageName: node linkType: hard +"ignore@npm:^5.3.1": + version: 5.3.2 + resolution: "ignore@npm:5.3.2" + checksum: 10c0/f9f652c957983634ded1e7f02da3b559a0d4cc210fca3792cb67f1b153623c9c42efdc1c4121af171e295444459fc4a9201101fb041b1104a3c000bccb188337 + languageName: node + linkType: hard + "import-fresh@npm:^3.2.1, import-fresh@npm:^3.3.0": version: 3.3.0 resolution: "import-fresh@npm:3.3.0" @@ -8910,7 +9579,7 @@ __metadata: languageName: node linkType: hard -"internal-slot@npm:^1.0.4": +"internal-slot@npm:^1.0.4, internal-slot@npm:^1.0.7": version: 1.0.7 resolution: "internal-slot@npm:1.0.7" dependencies: @@ -8998,6 +9667,15 @@ __metadata: languageName: node linkType: hard +"is-async-function@npm:^2.0.0": + version: 2.0.0 + resolution: "is-async-function@npm:2.0.0" + dependencies: + has-tostringtag: "npm:^1.0.0" + checksum: 10c0/787bc931576aad525d751fc5ce211960fe91e49ac84a5c22d6ae0bc9541945fbc3f686dc590c3175722ce4f6d7b798a93f6f8ff4847fdb2199aea6f4baf5d668 + languageName: node + linkType: hard + "is-bigint@npm:^1.0.1": version: 1.0.4 resolution: "is-bigint@npm:1.0.4" @@ -9026,7 +9704,7 @@ __metadata: languageName: node linkType: hard -"is-callable@npm:^1.1.3": +"is-callable@npm:^1.1.3, is-callable@npm:^1.1.4, is-callable@npm:^1.2.7": version: 1.2.7 resolution: "is-callable@npm:1.2.7" checksum: 10c0/ceebaeb9d92e8adee604076971dd6000d38d6afc40bb843ea8e45c5579b57671c3f3b50d7f04869618242c6cee08d1b67806a8cb8edaaaf7c0748b3720d6066f @@ -9051,7 +9729,16 @@ __metadata: languageName: node linkType: hard -"is-date-object@npm:^1.0.5": +"is-data-view@npm:^1.0.1": + version: 1.0.1 + resolution: "is-data-view@npm:1.0.1" + dependencies: + is-typed-array: "npm:^1.1.13" + checksum: 10c0/a3e6ec84efe303da859107aed9b970e018e2bee7ffcb48e2f8096921a493608134240e672a2072577e5f23a729846241d9634806e8a0e51d9129c56d5f65442d + languageName: node + linkType: hard + +"is-date-object@npm:^1.0.1, is-date-object@npm:^1.0.5": version: 1.0.5 resolution: "is-date-object@npm:1.0.5" dependencies: @@ -9083,6 +9770,15 @@ __metadata: languageName: node linkType: hard +"is-finalizationregistry@npm:^1.0.2": + version: 1.0.2 + resolution: "is-finalizationregistry@npm:1.0.2" + dependencies: + call-bind: "npm:^1.0.2" + checksum: 10c0/81caecc984d27b1a35c68741156fc651fb1fa5e3e6710d21410abc527eb226d400c0943a167922b2e920f6b3e58b0dede9aa795882b038b85f50b3a4b877db86 + languageName: node + linkType: hard + "is-fullwidth-code-point@npm:^3.0.0": version: 3.0.0 resolution: "is-fullwidth-code-point@npm:3.0.0" @@ -9097,7 +9793,7 @@ __metadata: languageName: node linkType: hard -"is-generator-function@npm:^1.0.7": +"is-generator-function@npm:^1.0.10, is-generator-function@npm:^1.0.7": version: 1.0.10 resolution: "is-generator-function@npm:1.0.10" dependencies: @@ -9106,7 +9802,7 @@ __metadata: languageName: node linkType: hard -"is-glob@npm:^4.0.1, is-glob@npm:^4.0.3, is-glob@npm:~4.0.1": +"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3, is-glob@npm:~4.0.1": version: 4.0.3 resolution: "is-glob@npm:4.0.3" dependencies: @@ -9153,6 +9849,13 @@ __metadata: languageName: node linkType: hard +"is-negative-zero@npm:^2.0.3": + version: 2.0.3 + resolution: "is-negative-zero@npm:2.0.3" + checksum: 10c0/bcdcf6b8b9714063ffcfa9929c575ac69bfdabb8f4574ff557dfc086df2836cf07e3906f5bbc4f2a5c12f8f3ba56af640c843cdfc74da8caed86c7c7d66fd08e + languageName: node + linkType: hard + "is-number-object@npm:^1.0.4": version: 1.0.7 resolution: "is-number-object@npm:1.0.7" @@ -9176,6 +9879,13 @@ __metadata: languageName: node linkType: hard +"is-path-inside@npm:^3.0.3": + version: 3.0.3 + resolution: "is-path-inside@npm:3.0.3" + checksum: 10c0/cf7d4ac35fb96bab6a1d2c3598fe5ebb29aafb52c0aaa482b5a3ed9d8ba3edc11631e3ec2637660c44b3ce0e61a08d54946e8af30dec0b60a7c27296c68ffd05 + languageName: node + linkType: hard + "is-plain-obj@npm:^4.1.0": version: 4.1.0 resolution: "is-plain-obj@npm:4.1.0" @@ -9223,7 +9933,7 @@ __metadata: languageName: node linkType: hard -"is-shared-array-buffer@npm:^1.0.2": +"is-shared-array-buffer@npm:^1.0.2, is-shared-array-buffer@npm:^1.0.3": version: 1.0.3 resolution: "is-shared-array-buffer@npm:1.0.3" dependencies: @@ -9262,7 +9972,7 @@ __metadata: languageName: node linkType: hard -"is-symbol@npm:^1.0.3": +"is-symbol@npm:^1.0.2, is-symbol@npm:^1.0.3": version: 1.0.4 resolution: "is-symbol@npm:1.0.4" dependencies: @@ -9271,7 +9981,7 @@ __metadata: languageName: node linkType: hard -"is-typed-array@npm:^1.1.3": +"is-typed-array@npm:^1.1.13, is-typed-array@npm:^1.1.3": version: 1.1.13 resolution: "is-typed-array@npm:1.1.13" dependencies: @@ -9301,6 +10011,15 @@ __metadata: languageName: node linkType: hard +"is-weakref@npm:^1.0.2": + version: 1.0.2 + resolution: "is-weakref@npm:1.0.2" + dependencies: + call-bind: "npm:^1.0.2" + checksum: 10c0/1545c5d172cb690c392f2136c23eec07d8d78a7f57d0e41f10078aa4f5daf5d7f57b6513a67514ab4f073275ad00c9822fc8935e00229d0a2089e1c02685d4b1 + languageName: node + linkType: hard + "is-weakset@npm:^2.0.3": version: 2.0.3 resolution: "is-weakset@npm:2.0.3" @@ -9433,6 +10152,19 @@ __metadata: languageName: node linkType: hard +"iterator.prototype@npm:^1.1.2": + version: 1.1.2 + resolution: "iterator.prototype@npm:1.1.2" + dependencies: + define-properties: "npm:^1.2.1" + get-intrinsic: "npm:^1.2.1" + has-symbols: "npm:^1.0.3" + reflect.getprototypeof: "npm:^1.0.4" + set-function-name: "npm:^2.0.1" + checksum: 10c0/a32151326095e916f306990d909f6bbf23e3221999a18ba686419535dcd1749b10ded505e89334b77dc4c7a58a8508978f0eb16c2c8573e6d412eb7eb894ea79 + languageName: node + linkType: hard + "jackspeak@npm:^3.1.2": version: 3.4.0 resolution: "jackspeak@npm:3.4.0" @@ -10125,6 +10857,13 @@ __metadata: languageName: node linkType: hard +"json-stable-stringify-without-jsonify@npm:^1.0.1": + version: 1.0.1 + resolution: "json-stable-stringify-without-jsonify@npm:1.0.1" + checksum: 10c0/cb168b61fd4de83e58d09aaa6425ef71001bae30d260e2c57e7d09a5fd82223e2f22a042dedaab8db23b7d9ae46854b08bb1f91675a8be11c5cffebef5fb66a5 + languageName: node + linkType: hard + "json-stringify-nice@npm:^1.1.4": version: 1.1.4 resolution: "json-stringify-nice@npm:1.1.4" @@ -10161,6 +10900,18 @@ __metadata: languageName: node linkType: hard +"jsx-ast-utils@npm:^2.4.1 || ^3.0.0": + version: 3.3.5 + resolution: "jsx-ast-utils@npm:3.3.5" + dependencies: + array-includes: "npm:^3.1.6" + array.prototype.flat: "npm:^1.3.1" + object.assign: "npm:^4.1.4" + object.values: "npm:^1.1.6" + checksum: 10c0/a32679e9cb55469cb6d8bbc863f7d631b2c98b7fc7bf172629261751a6e7bc8da6ae374ddb74d5fbd8b06cf0eb4572287b259813d92b36e384024ed35e4c13e1 + languageName: node + linkType: hard + "just-diff-apply@npm:^5.2.0": version: 5.5.0 resolution: "just-diff-apply@npm:5.5.0" @@ -10175,7 +10926,7 @@ __metadata: languageName: node linkType: hard -"keyv@npm:^4.5.3": +"keyv@npm:^4.5.3, keyv@npm:^4.5.4": version: 4.5.4 resolution: "keyv@npm:4.5.4" dependencies: @@ -10216,6 +10967,16 @@ __metadata: languageName: node linkType: hard +"levn@npm:^0.4.1": + version: 0.4.1 + resolution: "levn@npm:0.4.1" + dependencies: + prelude-ls: "npm:^1.2.1" + type-check: "npm:~0.4.0" + checksum: 10c0/effb03cad7c89dfa5bd4f6989364bfc79994c2042ec5966cb9b95990e2edee5cd8969ddf42616a0373ac49fac1403437deaf6e9050fbbaa3546093a59b9ac94e + languageName: node + linkType: hard + "libnpmaccess@npm:^8.0.6": version: 8.0.6 resolution: "libnpmaccess@npm:8.0.6" @@ -10476,6 +11237,13 @@ __metadata: languageName: node linkType: hard +"lodash.merge@npm:^4.6.2": + version: 4.6.2 + resolution: "lodash.merge@npm:4.6.2" + checksum: 10c0/402fa16a1edd7538de5b5903a90228aa48eb5533986ba7fa26606a49db2572bf414ff73a2c9f5d5fd36b31c46a5d5c7e1527749c07cbcf965ccff5fbdf32c506 + languageName: node + linkType: hard + "lodash.sortby@npm:^4.7.0": version: 4.7.0 resolution: "lodash.sortby@npm:4.7.0" @@ -11449,7 +12217,7 @@ __metadata: languageName: node linkType: hard -"object.assign@npm:^4.1.4": +"object.assign@npm:^4.1.4, object.assign@npm:^4.1.5": version: 4.1.5 resolution: "object.assign@npm:4.1.5" dependencies: @@ -11461,6 +12229,40 @@ __metadata: languageName: node linkType: hard +"object.entries@npm:^1.1.8": + version: 1.1.8 + resolution: "object.entries@npm:1.1.8" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-object-atoms: "npm:^1.0.0" + checksum: 10c0/db9ea979d2956a3bc26c262da4a4d212d36f374652cc4c13efdd069c1a519c16571c137e2893d1c46e1cb0e15c88fd6419eaf410c945f329f09835487d7e65d3 + languageName: node + linkType: hard + +"object.fromentries@npm:^2.0.8": + version: 2.0.8 + resolution: "object.fromentries@npm:2.0.8" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.2" + es-object-atoms: "npm:^1.0.0" + checksum: 10c0/cd4327e6c3369cfa805deb4cbbe919bfb7d3aeebf0bcaba291bb568ea7169f8f8cdbcabe2f00b40db0c20cd20f08e11b5f3a5a36fb7dd3fe04850c50db3bf83b + languageName: node + linkType: hard + +"object.values@npm:^1.1.6, object.values@npm:^1.2.0": + version: 1.2.0 + resolution: "object.values@npm:1.2.0" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-object-atoms: "npm:^1.0.0" + checksum: 10c0/15809dc40fd6c5529501324fec5ff08570b7d70fb5ebbe8e2b3901afec35cf2b3dc484d1210c6c642cd3e7e0a5e18dd1d6850115337fef46bdae14ab0cb18ac3 + languageName: node + linkType: hard + "objectorarray@npm:^1.0.5": version: 1.0.5 resolution: "objectorarray@npm:1.0.5" @@ -11529,6 +12331,20 @@ __metadata: languageName: node linkType: hard +"optionator@npm:^0.9.3": + version: 0.9.4 + resolution: "optionator@npm:0.9.4" + dependencies: + deep-is: "npm:^0.1.3" + fast-levenshtein: "npm:^2.0.6" + levn: "npm:^0.4.1" + prelude-ls: "npm:^1.2.1" + type-check: "npm:^0.4.0" + word-wrap: "npm:^1.2.5" + checksum: 10c0/4afb687a059ee65b61df74dfe87d8d6815cd6883cb8b3d5883a910df72d0f5d029821f37025e4bccf4048873dbdb09acc6d303d27b8f76b1a80dd5a7d5334675 + languageName: node + linkType: hard + "ora@npm:^5.4.1": version: 5.4.1 resolution: "ora@npm:5.4.1" @@ -12171,6 +12987,13 @@ __metadata: languageName: node linkType: hard +"prelude-ls@npm:^1.2.1": + version: 1.2.1 + resolution: "prelude-ls@npm:1.2.1" + checksum: 10c0/b00d617431e7886c520a6f498a2e14c75ec58f6d93ba48c3b639cf241b54232d90daa05d83a9e9b9fef6baa63cb7e1e4602c2372fea5bc169668401eb127d0cd + languageName: node + linkType: hard + "prettier-fallback@npm:prettier@^3, prettier@npm:^3.1.1": version: 3.3.2 resolution: "prettier@npm:3.3.2" @@ -12180,6 +13003,15 @@ __metadata: languageName: node linkType: hard +"prettier@npm:^3.3.3": + version: 3.3.3 + resolution: "prettier@npm:3.3.3" + bin: + prettier: bin/prettier.cjs + checksum: 10c0/b85828b08e7505716324e4245549b9205c0cacb25342a030ba8885aba2039a115dbcf75a0b7ca3b37bc9d101ee61fab8113fc69ca3359f2a226f1ecc07ad2e26 + languageName: node + linkType: hard + "pretty-error@npm:^4.0.0": version: 4.0.0 resolution: "pretty-error@npm:4.0.0" @@ -12313,7 +13145,7 @@ __metadata: languageName: node linkType: hard -"prop-types@npm:^15.7.2": +"prop-types@npm:^15.7.2, prop-types@npm:^15.8.1": version: 15.8.1 resolution: "prop-types@npm:15.8.1" dependencies: @@ -12793,6 +13625,21 @@ __metadata: languageName: node linkType: hard +"reflect.getprototypeof@npm:^1.0.4": + version: 1.0.6 + resolution: "reflect.getprototypeof@npm:1.0.6" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.1" + es-errors: "npm:^1.3.0" + get-intrinsic: "npm:^1.2.4" + globalthis: "npm:^1.0.3" + which-builtin-type: "npm:^1.1.3" + checksum: 10c0/baf4ef8ee6ff341600f4720b251cf5a6cb552d6a6ab0fdc036988c451bf16f920e5feb0d46bd4f530a5cce568f1f7aca2d77447ca798920749cfc52783c39b55 + languageName: node + linkType: hard + "regenerate-unicode-properties@npm:^10.1.0": version: 10.1.1 resolution: "regenerate-unicode-properties@npm:10.1.1" @@ -12825,7 +13672,7 @@ __metadata: languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.5.1": +"regexp.prototype.flags@npm:^1.5.1, regexp.prototype.flags@npm:^1.5.2": version: 1.5.2 resolution: "regexp.prototype.flags@npm:1.5.2" dependencies: @@ -12982,6 +13829,19 @@ __metadata: languageName: node linkType: hard +"resolve@npm:^2.0.0-next.5": + version: 2.0.0-next.5 + resolution: "resolve@npm:2.0.0-next.5" + dependencies: + is-core-module: "npm:^2.13.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10c0/a6c33555e3482ea2ec4c6e3d3bf0d78128abf69dca99ae468e64f1e30acaa318fd267fb66c8836b04d558d3e2d6ed875fe388067e7d8e0de647d3c21af21c43a + languageName: node + linkType: hard + "resolve@patch:resolve@npm%3A^1.1.7#optional!builtin, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.1#optional!builtin, resolve@patch:resolve@npm%3A^1.22.2#optional!builtin, resolve@patch:resolve@npm%3A^1.22.8#optional!builtin": version: 1.22.8 resolution: "resolve@patch:resolve@npm%3A1.22.8#optional!builtin::version=1.22.8&hash=c3c19d" @@ -12995,6 +13855,19 @@ __metadata: languageName: node linkType: hard +"resolve@patch:resolve@npm%3A^2.0.0-next.5#optional!builtin": + version: 2.0.0-next.5 + resolution: "resolve@patch:resolve@npm%3A2.0.0-next.5#optional!builtin::version=2.0.0-next.5&hash=c3c19d" + dependencies: + is-core-module: "npm:^2.13.0" + path-parse: "npm:^1.0.7" + supports-preserve-symlinks-flag: "npm:^1.0.0" + bin: + resolve: bin/resolve + checksum: 10c0/78ad6edb8309a2bfb720c2c1898f7907a37f858866ce11a5974643af1203a6a6e05b2fa9c53d8064a673a447b83d42569260c306d43628bff5bb101969708355 + languageName: node + linkType: hard + "restore-cursor@npm:^3.1.0": version: 3.1.0 resolution: "restore-cursor@npm:3.1.0" @@ -13122,6 +13995,18 @@ __metadata: languageName: node linkType: hard +"safe-array-concat@npm:^1.1.2": + version: 1.1.2 + resolution: "safe-array-concat@npm:1.1.2" + dependencies: + call-bind: "npm:^1.0.7" + get-intrinsic: "npm:^1.2.4" + has-symbols: "npm:^1.0.3" + isarray: "npm:^2.0.5" + checksum: 10c0/12f9fdb01c8585e199a347eacc3bae7b5164ae805cdc8c6707199dbad5b9e30001a50a43c4ee24dc9ea32dbb7279397850e9208a7e217f4d8b1cf5d90129dec9 + languageName: node + linkType: hard + "safe-buffer@npm:5.1.2, safe-buffer@npm:~5.1.0, safe-buffer@npm:~5.1.1": version: 5.1.2 resolution: "safe-buffer@npm:5.1.2" @@ -13136,6 +14021,17 @@ __metadata: languageName: node linkType: hard +"safe-regex-test@npm:^1.0.3": + version: 1.0.3 + resolution: "safe-regex-test@npm:1.0.3" + dependencies: + call-bind: "npm:^1.0.6" + es-errors: "npm:^1.3.0" + is-regex: "npm:^1.1.4" + checksum: 10c0/900bf7c98dc58f08d8523b7012b468e4eb757afa624f198902c0643d7008ba777b0bdc35810ba0b758671ce887617295fb742b3f3968991b178ceca54cb07603 + languageName: node + linkType: hard + "safer-buffer@npm:>= 2.1.2 < 3, safer-buffer@npm:>= 2.1.2 < 3.0.0": version: 2.1.2 resolution: "safer-buffer@npm:2.1.2" @@ -13257,7 +14153,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.1.1, semver@npm:^7.1.2, semver@npm:^7.3.2, semver@npm:^7.5.2, semver@npm:^7.6.2": +"semver@npm:^7.1.1, semver@npm:^7.1.2, semver@npm:^7.3.2, semver@npm:^7.5.2, semver@npm:^7.6.0, semver@npm:^7.6.2": version: 7.6.3 resolution: "semver@npm:7.6.3" bin: @@ -13331,7 +14227,7 @@ __metadata: languageName: node linkType: hard -"set-function-name@npm:^2.0.1": +"set-function-name@npm:^2.0.1, set-function-name@npm:^2.0.2": version: 2.0.2 resolution: "set-function-name@npm:2.0.2" dependencies: @@ -13713,6 +14609,70 @@ __metadata: languageName: node linkType: hard +"string.prototype.matchall@npm:^4.0.11": + version: 4.0.11 + resolution: "string.prototype.matchall@npm:4.0.11" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.2" + es-errors: "npm:^1.3.0" + es-object-atoms: "npm:^1.0.0" + get-intrinsic: "npm:^1.2.4" + gopd: "npm:^1.0.1" + has-symbols: "npm:^1.0.3" + internal-slot: "npm:^1.0.7" + regexp.prototype.flags: "npm:^1.5.2" + set-function-name: "npm:^2.0.2" + side-channel: "npm:^1.0.6" + checksum: 10c0/915a2562ac9ab5e01b7be6fd8baa0b2b233a0a9aa975fcb2ec13cc26f08fb9a3e85d5abdaa533c99c6fc4c5b65b914eba3d80c4aff9792a4c9fed403f28f7d9d + languageName: node + linkType: hard + +"string.prototype.repeat@npm:^1.0.0": + version: 1.0.0 + resolution: "string.prototype.repeat@npm:1.0.0" + dependencies: + define-properties: "npm:^1.1.3" + es-abstract: "npm:^1.17.5" + checksum: 10c0/94c7978566cffa1327d470fd924366438af9b04b497c43a9805e476e2e908aa37a1fd34cc0911156c17556dab62159d12c7b92b3cc304c3e1281fe4c8e668f40 + languageName: node + linkType: hard + +"string.prototype.trim@npm:^1.2.9": + version: 1.2.9 + resolution: "string.prototype.trim@npm:1.2.9" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.23.0" + es-object-atoms: "npm:^1.0.0" + checksum: 10c0/dcef1a0fb61d255778155006b372dff8cc6c4394bc39869117e4241f41a2c52899c0d263ffc7738a1f9e61488c490b05c0427faa15151efad721e1a9fb2663c2 + languageName: node + linkType: hard + +"string.prototype.trimend@npm:^1.0.8": + version: 1.0.8 + resolution: "string.prototype.trimend@npm:1.0.8" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-object-atoms: "npm:^1.0.0" + checksum: 10c0/0a0b54c17c070551b38e756ae271865ac6cc5f60dabf2e7e343cceae7d9b02e1a1120a824e090e79da1b041a74464e8477e2da43e2775c85392be30a6f60963c + languageName: node + linkType: hard + +"string.prototype.trimstart@npm:^1.0.8": + version: 1.0.8 + resolution: "string.prototype.trimstart@npm:1.0.8" + dependencies: + call-bind: "npm:^1.0.7" + define-properties: "npm:^1.2.1" + es-object-atoms: "npm:^1.0.0" + checksum: 10c0/d53af1899959e53c83b64a5fd120be93e067da740e7e75acb433849aa640782fb6c7d4cd5b84c954c84413745a3764df135a8afeb22908b86a835290788d8366 + languageName: node + linkType: hard + "string_decoder@npm:^1.1.1": version: 1.3.0 resolution: "string_decoder@npm:1.3.0" @@ -14084,7 +15044,7 @@ __metadata: languageName: node linkType: hard -"text-table@npm:~0.2.0": +"text-table@npm:^0.2.0, text-table@npm:~0.2.0": version: 0.2.0 resolution: "text-table@npm:0.2.0" checksum: 10c0/02805740c12851ea5982686810702e2f14369a5f4c5c40a836821e3eefc65ffeec3131ba324692a37608294b0fd8c1e55a2dd571ffed4909822787668ddbee5c @@ -14246,6 +15206,15 @@ __metadata: languageName: node linkType: hard +"ts-api-utils@npm:^1.3.0": + version: 1.3.0 + resolution: "ts-api-utils@npm:1.3.0" + peerDependencies: + typescript: ">=4.2.0" + checksum: 10c0/f54a0ba9ed56ce66baea90a3fa087a484002e807f28a8ccb2d070c75e76bde64bd0f6dce98b3802834156306050871b67eec325cb4e918015a360a3f0868c77c + languageName: node + linkType: hard + "ts-dedent@npm:^2.0.0, ts-dedent@npm:^2.2.0": version: 2.2.0 resolution: "ts-dedent@npm:2.2.0" @@ -14342,6 +15311,15 @@ __metadata: languageName: node linkType: hard +"type-check@npm:^0.4.0, type-check@npm:~0.4.0": + version: 0.4.0 + resolution: "type-check@npm:0.4.0" + dependencies: + prelude-ls: "npm:^1.2.1" + checksum: 10c0/7b3fd0ed43891e2080bf0c5c504b418fbb3e5c7b9708d3d015037ba2e6323a28152ec163bcb65212741fa5d2022e3075ac3c76440dbd344c9035f818e8ecee58 + languageName: node + linkType: hard + "type-detect@npm:4.0.8, type-detect@npm:^4.0.0, type-detect@npm:^4.0.8": version: 4.0.8 resolution: "type-detect@npm:4.0.8" @@ -14401,6 +15379,58 @@ __metadata: languageName: node linkType: hard +"typed-array-buffer@npm:^1.0.2": + version: 1.0.2 + resolution: "typed-array-buffer@npm:1.0.2" + dependencies: + call-bind: "npm:^1.0.7" + es-errors: "npm:^1.3.0" + is-typed-array: "npm:^1.1.13" + checksum: 10c0/9e043eb38e1b4df4ddf9dde1aa64919ae8bb909571c1cc4490ba777d55d23a0c74c7d73afcdd29ec98616d91bb3ae0f705fad4421ea147e1daf9528200b562da + languageName: node + linkType: hard + +"typed-array-byte-length@npm:^1.0.1": + version: 1.0.1 + resolution: "typed-array-byte-length@npm:1.0.1" + dependencies: + call-bind: "npm:^1.0.7" + for-each: "npm:^0.3.3" + gopd: "npm:^1.0.1" + has-proto: "npm:^1.0.3" + is-typed-array: "npm:^1.1.13" + checksum: 10c0/fcebeffb2436c9f355e91bd19e2368273b88c11d1acc0948a2a306792f1ab672bce4cfe524ab9f51a0505c9d7cd1c98eff4235c4f6bfef6a198f6cfc4ff3d4f3 + languageName: node + linkType: hard + +"typed-array-byte-offset@npm:^1.0.2": + version: 1.0.2 + resolution: "typed-array-byte-offset@npm:1.0.2" + dependencies: + available-typed-arrays: "npm:^1.0.7" + call-bind: "npm:^1.0.7" + for-each: "npm:^0.3.3" + gopd: "npm:^1.0.1" + has-proto: "npm:^1.0.3" + is-typed-array: "npm:^1.1.13" + checksum: 10c0/d2628bc739732072e39269389a758025f75339de2ed40c4f91357023c5512d237f255b633e3106c461ced41907c1bf9a533c7e8578066b0163690ca8bc61b22f + languageName: node + linkType: hard + +"typed-array-length@npm:^1.0.6": + version: 1.0.6 + resolution: "typed-array-length@npm:1.0.6" + dependencies: + call-bind: "npm:^1.0.7" + for-each: "npm:^0.3.3" + gopd: "npm:^1.0.1" + has-proto: "npm:^1.0.3" + is-typed-array: "npm:^1.1.13" + possible-typed-array-names: "npm:^1.0.0" + checksum: 10c0/74253d7dc488eb28b6b2711cf31f5a9dcefc9c41b0681fd1c178ed0a1681b4468581a3626d39cd4df7aee3d3927ab62be06aa9ca74e5baf81827f61641445b77 + languageName: node + linkType: hard + "typescript@npm:^5.5.2": version: 5.5.2 resolution: "typescript@npm:5.5.2" @@ -14437,6 +15467,18 @@ __metadata: languageName: node linkType: hard +"unbox-primitive@npm:^1.0.2": + version: 1.0.2 + resolution: "unbox-primitive@npm:1.0.2" + dependencies: + call-bind: "npm:^1.0.2" + has-bigints: "npm:^1.0.2" + has-symbols: "npm:^1.0.3" + which-boxed-primitive: "npm:^1.0.2" + checksum: 10c0/81ca2e81134167cc8f75fa79fbcc8a94379d6c61de67090986a2273850989dd3bae8440c163121b77434b68263e34787a675cbdcb34bb2f764c6b9c843a11b66 + languageName: node + linkType: hard + "undici-types@npm:~5.26.4": version: 5.26.5 resolution: "undici-types@npm:5.26.5" @@ -14964,7 +16006,27 @@ __metadata: languageName: node linkType: hard -"which-collection@npm:^1.0.1": +"which-builtin-type@npm:^1.1.3": + version: 1.1.4 + resolution: "which-builtin-type@npm:1.1.4" + dependencies: + function.prototype.name: "npm:^1.1.6" + has-tostringtag: "npm:^1.0.2" + is-async-function: "npm:^2.0.0" + is-date-object: "npm:^1.0.5" + is-finalizationregistry: "npm:^1.0.2" + is-generator-function: "npm:^1.0.10" + is-regex: "npm:^1.1.4" + is-weakref: "npm:^1.0.2" + isarray: "npm:^2.0.5" + which-boxed-primitive: "npm:^1.0.2" + which-collection: "npm:^1.0.2" + which-typed-array: "npm:^1.1.15" + checksum: 10c0/a4a76d20d869a81b1dbb4adea31edc7e6c1a4466d3ab7c2cd757c9219d48d3723b04076c85583257b0f0f8e3ebe5af337248b8ceed57b9051cb97bce5bd881d1 + languageName: node + linkType: hard + +"which-collection@npm:^1.0.1, which-collection@npm:^1.0.2": version: 1.0.2 resolution: "which-collection@npm:1.0.2" dependencies: @@ -14976,7 +16038,7 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.13, which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.2": +"which-typed-array@npm:^1.1.13, which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.15, which-typed-array@npm:^1.1.2": version: 1.1.15 resolution: "which-typed-array@npm:1.1.15" dependencies: @@ -15011,6 +16073,13 @@ __metadata: languageName: node linkType: hard +"word-wrap@npm:^1.2.5": + version: 1.2.5 + resolution: "word-wrap@npm:1.2.5" + checksum: 10c0/e0e4a1ca27599c92a6ca4c32260e8a92e8a44f4ef6ef93f803f8ed823f486e0889fc0b93be4db59c8d51b3064951d25e43d434e95dc8c960cc3a63d65d00ba20 + languageName: node + linkType: hard + "wordwrap@npm:^1.0.0": version: 1.0.0 resolution: "wordwrap@npm:1.0.0" From 9ad472f516318910005b8fb78d379585d5133377 Mon Sep 17 00:00:00 2001 From: Emmanuel-Develops Date: Thu, 5 Sep 2024 10:34:46 +0100 Subject: [PATCH 2/4] fix: eslint code changes --- src/components/carousel/Carousel.stories.tsx | 35 +++-- src/components/carousel/Carousel.tsx | 105 ++++++++----- .../carousel/CarouselComponents.tsx | 138 +++++++++++++----- src/components/footer/Footer.stories.tsx | 30 ++-- src/components/footer/Footer.tsx | 23 ++- src/icons/AppsIcon.tsx | 7 +- src/icons/ArrowLeft.tsx | 8 +- src/icons/ArrowLinkRight.tsx | 1 + src/icons/ArrowLinkUpRight.tsx | 1 + src/icons/ArrowRight.tsx | 8 +- src/icons/AuthorIcon.tsx | 7 +- src/icons/BitcoinIcon.tsx | 19 ++- src/icons/BookmarkIcon.tsx | 23 ++- src/icons/CalendarIcon.tsx | 2 + src/icons/CloseIconOutlined.tsx | 7 +- src/icons/DateIcon.tsx | 7 +- src/icons/DayIcon.tsx | 1 + src/icons/DiceIcon.tsx | 2 + src/icons/DiscordIcon.tsx | 2 + src/icons/FilterCloseIcon.tsx | 7 +- src/icons/FilterIcon.tsx | 7 +- src/icons/GithubIcon.tsx | 1 + src/icons/MicIcon.tsx | 1 + src/icons/NightIcon.tsx | 1 + src/icons/NostrIcon.tsx | 1 + src/icons/PlusIcon.tsx | 7 +- src/icons/SearchIcon.tsx | 7 +- src/icons/SortIcon.tsx | 7 +- src/icons/SourceIcon.tsx | 7 +- src/icons/TimeIcon.tsx | 7 +- src/icons/TwitterXIcon.tsx | 1 + src/stories/Page.tsx | 1 + src/utils/index.ts | 3 + 33 files changed, 360 insertions(+), 124 deletions(-) diff --git a/src/components/carousel/Carousel.stories.tsx b/src/components/carousel/Carousel.stories.tsx index 68cd741..9d15a18 100644 --- a/src/components/carousel/Carousel.stories.tsx +++ b/src/components/carousel/Carousel.stories.tsx @@ -7,30 +7,39 @@ import { ArrowLeft, ArrowRight } from "../../icons"; export default { title: "Components/Carousel", argTypes: { - colorMode: { control: { type: "radio" }, options: ["light", "dark"], defaultValue: "light" } - } + colorMode: { + control: { type: "radio" }, + options: ["light", "dark"], + defaultValue: "light", + }, + }, } as Meta; const PlaceholderCarouselItem = () => { return ( -
-

- Lorem ipsum dolor sit amet -

-

- Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dignissimos voluptatibus illum quae officia hic, provident aliquam? Quos nemo asperiores, consequuntur molestiae culpa rem ea corporis ratione voluptatibus pariatur tenetur perspiciatis. -

+
+

+ Lorem ipsum dolor sit amet +

+

+ Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dignissimos + voluptatibus illum quae officia hic, provident aliquam? Quos nemo + asperiores, consequuntur molestiae culpa rem ea corporis ratione + voluptatibus pariatur tenetur perspiciatis. +

- ) -} + ); +}; -export const CarouselSample = (args: any) => { +export const CarouselSample = (args: { colorMode: "light" | "dark" }) => { const { colorMode } = args; const isDark = colorMode === "dark"; return (
- + diff --git a/src/components/carousel/Carousel.tsx b/src/components/carousel/Carousel.tsx index c4e93c8..2451b3e 100644 --- a/src/components/carousel/Carousel.tsx +++ b/src/components/carousel/Carousel.tsx @@ -1,9 +1,19 @@ -'use client'; - -import React, { useCallback, useLayoutEffect, useMemo, useRef } from 'react' -import { CarouselConfig, DefaultCarouselConfig } from './defaults'; -import { throttledDebounce } from '../../utils'; -import { CarouselButtonProps, CarouselContainer, CarouselContainerProps, CarouselControlProps, CarouselControls, CarouselItem, CarouselItemProps, CarouselNextButton, CarouselPreviousButton } from './CarouselComponents'; +"use client"; + +import React, { useCallback, useLayoutEffect, useMemo, useRef } from "react"; +import { CarouselConfig, DefaultCarouselConfig } from "./defaults"; +import { throttledDebounce } from "../../utils"; +import { + CarouselButtonProps, + CarouselContainer, + CarouselContainerProps, + CarouselControlProps, + CarouselControls, + CarouselItem, + CarouselItemProps, + CarouselNextButton, + CarouselPreviousButton, +} from "./CarouselComponents"; export interface CarouselContextType { containerRef: React.RefObject; @@ -16,15 +26,15 @@ export interface CarouselContextType { }; } -const CarouselContext = React.createContext(null) +const CarouselContext = React.createContext(null); export const useCarousel = () => { - const context = React.useContext(CarouselContext) + const context = React.useContext(CarouselContext); if (!context) { - throw new Error('useCarousel must be used within a CarouselProvider') + throw new Error("useCarousel must be used within a CarouselProvider"); } - return context -} + return context; +}; export interface CarouselProviderProps { children: React.ReactNode; @@ -32,16 +42,20 @@ export interface CarouselProviderProps { config?: CarouselConfig; } -const CarouselProvider: React.FC = ({ children, containerRef, config = DefaultCarouselConfig }) => { - const {stepWidthInPercent} = config; +const CarouselProvider: React.FC = ({ + children, + containerRef, + config = DefaultCarouselConfig, +}) => { + const { stepWidthInPercent } = config; const [carouselWidth, setCarouselWidth] = React.useState(0); const [scrollableWidth, setScrollableWidth] = React.useState(0); const [scrollLeft, setScrollLeft] = React.useState(0); const possibleDirection = useMemo(() => { - console.log("I ran update direction") - if (!containerRef.current) return { canGoToNextSlide: false, canGoToPreviousSlide: false }; + if (!containerRef.current) + return { canGoToNextSlide: false, canGoToPreviousSlide: false }; const canGoToNextSlide = scrollLeft < scrollableWidth - carouselWidth; const canGoToPreviousSlide = scrollLeft > 0; return { canGoToNextSlide, canGoToPreviousSlide }; @@ -60,7 +74,6 @@ const CarouselProvider: React.FC = ({ children, container setCarouselWidth(containerRef.current?.clientWidth ?? 0); setScrollableWidth(containerRef.current?.scrollWidth ?? 0); setScrollLeft(containerRef.current?.scrollLeft ?? 0); - console.log("i updated size", "width", containerRef.current?.clientWidth, "scrollable", containerRef.current?.scrollWidth) }, 200); const resizeObserver = new ResizeObserver(updateSize); @@ -79,65 +92,83 @@ const CarouselProvider: React.FC = ({ children, container // update scroll position on scroll useLayoutEffect(() => { if (!containerRef.current) return; - - containerRef.current?.addEventListener('scroll', handleScroll); + + containerRef.current?.addEventListener("scroll", handleScroll); return () => { if (containerRef.current) { - containerRef.current.removeEventListener('scroll', handleScroll); + containerRef.current.removeEventListener("scroll", handleScroll); } }; }, []); const totalCarouselItems = useMemo(() => { - console.log(containerRef.current) - return containerRef.current?.children.length ?? 0 - }, [containerRef]) + return containerRef.current?.children.length ?? 0; + }, [containerRef]); const goToNextSlide = useCallback(() => { if (!containerRef.current) return; - const stepWidth = containerRef.current.clientWidth * stepWidthInPercent / 100 - const responsiveStepWidth = stepWidth < containerRef.current.children[0].clientWidth ? containerRef.current.clientWidth : stepWidth; + const stepWidth = + (containerRef.current.clientWidth * stepWidthInPercent) / 100; + const responsiveStepWidth = + stepWidth < containerRef.current.children[0].clientWidth + ? containerRef.current.clientWidth + : stepWidth; const scrollLeft = containerRef.current.scrollLeft + responsiveStepWidth; containerRef.current.scrollTo({ left: scrollLeft, - behavior: 'smooth', + behavior: "smooth", }); }, [containerRef, stepWidthInPercent]); const goToPreviousSlide = useCallback(() => { if (!containerRef.current) return; - const stepWidth = containerRef.current.clientWidth * stepWidthInPercent / 100 + const stepWidth = + (containerRef.current.clientWidth * stepWidthInPercent) / 100; // const responsiveStepWidth = Math.max(containerRef.current.clientWidth, containerRef.current.clientWidth * stepWidthInPercent / 100) ; - const responsiveStepWidth = stepWidth < containerRef.current.children[0].clientWidth ? containerRef.current.clientWidth : stepWidth; - const scrollLeft = Math.max(0, containerRef.current.scrollLeft - responsiveStepWidth); + const responsiveStepWidth = + stepWidth < containerRef.current.children[0].clientWidth + ? containerRef.current.clientWidth + : stepWidth; + const scrollLeft = Math.max( + 0, + containerRef.current.scrollLeft - responsiveStepWidth, + ); containerRef.current.scrollTo({ left: scrollLeft, - behavior: 'smooth', + behavior: "smooth", }); }, [containerRef, stepWidthInPercent]); return ( - + {children} - ) -} + ); +}; -export const Carousel: React.FC> & { +export const Carousel: React.FC> & { Container: React.FC; Item: React.FC; Controls: React.FC; PreviousButton: React.FC; NextButton: React.FC; -} = ({ children, config }) => { - const containerRef = useRef(null) +} = ({ children, config }: Omit) => { + const containerRef = useRef(null); return ( {children} - ) -} + ); +}; Carousel.Container = CarouselContainer; Carousel.Item = CarouselItem; diff --git a/src/components/carousel/CarouselComponents.tsx b/src/components/carousel/CarouselComponents.tsx index 0acf058..87bfcdb 100644 --- a/src/components/carousel/CarouselComponents.tsx +++ b/src/components/carousel/CarouselComponents.tsx @@ -1,89 +1,153 @@ -import React from 'react' -import { CarouselContextType, useCarousel } from './Carousel'; -import { ComponentStylePrimitiveProps } from '../../primitives/types'; -import { twMerge } from 'tailwind-merge'; -import clsx from 'clsx'; +import React from "react"; +import { CarouselContextType, useCarousel } from "./Carousel"; +import { ComponentStylePrimitiveProps } from "../../primitives/types"; +import { twMerge } from "tailwind-merge"; +import clsx from "clsx"; -export interface CarouselContainerProps extends ComponentStylePrimitiveProps { - children: React.ReactNode +export interface CarouselContainerProps + extends ComponentStylePrimitiveProps { + children: React.ReactNode; } -export const CarouselContainer: React.FC = ({ children, ...props }) => { - const { className, ...rest } = props +export const CarouselContainer: React.FC = ({ + children, + ...props +}) => { + const { className, ...rest } = props; const { containerRef } = useCarousel(); return ( -
+
{children}
- ) -} + ); +}; -export interface CarouselItemProps extends CarouselContainerProps { } +export type CarouselItemProps = CarouselContainerProps; -export const CarouselItem: React.FC = ({ children, ...props }) => { - const { className, ...rest } = props +export const CarouselItem: React.FC = ({ + children, + ...props +}) => { + const { className, ...rest } = props; return ( -
+
{children}
- ) -} + ); +}; -export interface CarouselControlProps extends ComponentStylePrimitiveProps { - children: React.ReactNode +export interface CarouselControlProps + extends ComponentStylePrimitiveProps { + children: React.ReactNode; } -export const CarouselControls: React.FC = ({ children, className, ...props }) => { +export const CarouselControls: React.FC = ({ + children, + className, + ...props +}) => { return ( -
+
{children}
- ) -} -export interface CarouselButtonProps extends Omit, 'children'> { - children?: React.ReactNode | ((goToPreviousSlide: () => void, possibleDirection: CarouselContextType['possibleDirection']) => React.ReactNode); + ); +}; +export interface CarouselButtonProps + extends Omit, "children"> { + children?: + | React.ReactNode + | (( + goToPreviousSlide: () => void, + possibleDirection: CarouselContextType["possibleDirection"], + ) => React.ReactNode); icon: React.ReactNode; } -export const CarouselPreviousButton: React.FC = ({ children, ...props }) => { +export const CarouselPreviousButton: React.FC = ({ + children, + ...props +}) => { const { goToPreviousSlide, possibleDirection } = useCarousel(); if (children) { - if (typeof children === 'function') { + if (typeof children === "function") { return <>{children(goToPreviousSlide, possibleDirection)}; } else { - console.warn('CarouselPreviousButton: Children prop is not a function (opts out of navigation logic). Rendering children as-is.'); + console.warn( + "CarouselPreviousButton: Children prop is not a function (opts out of navigation logic). Rendering children as-is.", + ); return <>{children}; } } - const { icon, className, ...rest } = props + const { icon, className, ...rest } = props; return ( - ); }; -export const CarouselNextButton: React.FC = ({ children, ...props }) => { +export const CarouselNextButton: React.FC = ({ + children, + ...props +}) => { const { goToNextSlide, possibleDirection } = useCarousel(); if (children) { - if (typeof children === 'function') { + if (typeof children === "function") { return <>{children(goToNextSlide, possibleDirection)}; } else { - console.warn('CarouselNextButton: Children prop is not a function (opts out of navigation logic). Rendering children as-is.'); + console.warn( + "CarouselNextButton: Children prop is not a function (opts out of navigation logic). Rendering children as-is.", + ); return <>{children}; } } - const { icon, className, ...rest } = props + const { icon, className, ...rest } = props; return ( - ); }; - diff --git a/src/components/footer/Footer.stories.tsx b/src/components/footer/Footer.stories.tsx index 65bf621..a1f6566 100644 --- a/src/components/footer/Footer.stories.tsx +++ b/src/components/footer/Footer.stories.tsx @@ -6,11 +6,17 @@ import { Footer } from "../footer"; export default { title: "Components/Footer", argTypes: { - colorMode: { control: { type: "radio" }, options: ["light", "dark"], defaultValue: "light" } - } + colorMode: { + control: { type: "radio" }, + options: ["light", "dark"], + defaultValue: "light", + }, + }, } as Meta; -export const UnModifiedFooter = (args: any) => { +export const UnModifiedFooter = (args: { + colorMode: "light" | "dark"; +}) => { const { colorMode } = args; const isDark = colorMode === "dark"; return ( @@ -22,33 +28,33 @@ export const UnModifiedFooter = (args: any) => { entity: "github", entityLink: "https://github.com/bitcoindevs", iconProps: { - className: "hover:text-orange-400" - } + className: "hover:text-orange-400", + }, }, { entity: "discord", entityLink: "https://discord.gg/bitcoindev", iconProps: { - className: "hover:text-orange-400" - } + className: "hover:text-orange-400", + }, }, { entity: "twitter", entityLink: "https://twitter.com/bitcoindevs", iconProps: { - className: "hover:text-orange-400" - } + className: "hover:text-orange-400", + }, }, { entity: "nostr", entityLink: "https://discord.gg/bitcoindevs", iconProps: { - className: "hover:text-orange-400" - } + className: "hover:text-orange-400", + }, }, ]} /> - + { +export interface FooterRootProps + extends FooterPartsPrimitiveProps { separator?: React.ReactElement; } @@ -20,18 +21,22 @@ const Footer: React.FC & { Feedback: React.FC; Socials: React.FC; Public: React.FC; -} = ({ children, className, separator, ...rest}) => { - +} = ({ children, className, separator, ...rest }: FooterRootProps) => { const viewSeparator = separator ?? ; const renderChildrenWithSeparator = () => { const newChildren: React.ReactNode[] = []; React.Children.forEach(children, (child, index) => { if (React.isValidElement(child)) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any const displayName = (child.type as any).displayName; newChildren.push(child); if (index < React.Children.count(children) - 1) { - newChildren.push(React.cloneElement(viewSeparator, { key: `${displayName}-separator-${index}` })); + newChildren.push( + React.cloneElement(viewSeparator, { + key: `${displayName}-separator-${index}`, + }), + ); } } }); @@ -39,7 +44,15 @@ const Footer: React.FC & { }; return ( -
+
{renderChildrenWithSeparator()}
); diff --git a/src/icons/AppsIcon.tsx b/src/icons/AppsIcon.tsx index d524956..eef301d 100644 --- a/src/icons/AppsIcon.tsx +++ b/src/icons/AppsIcon.tsx @@ -1,7 +1,12 @@ import * as React from "react"; import { SVGProps } from "react"; -const AppsIcon = ({ width = 24, height, ...props }: SVGProps) => ( +const AppsIcon = ({ + width = 24, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + height, + ...props +}: SVGProps) => ( // height is destructed and unused, scaling is defined by width & { pathProps?: SVGProps }) => { +const ArrowLeft = ({ + width = 7, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + height, + pathProps, + ...props +}: SVGProps & { pathProps?: SVGProps }) => { // height is destructed and unused, scaling is defined by width return ( & { pathProps?: SVGProps }) => { +const ArrowRight = ({ + width = 7, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + height, + pathProps, + ...props +}: SVGProps & { pathProps?: SVGProps }) => { // height is destructed and unused, scaling is defined by width return ( ) => ( +const AuthorIcon = ({ + width = 20, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + height, + ...props +}: SVGProps) => ( // height is destructed and unused, scaling is defined by width ) => ( +const BitcoinIcon = ({ + width = 18, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + height, + ...props +}: SVGProps) => ( // height is destructed and unused, scaling is defined by width - + diff --git a/src/icons/BookmarkIcon.tsx b/src/icons/BookmarkIcon.tsx index a4cc33d..e023e8f 100644 --- a/src/icons/BookmarkIcon.tsx +++ b/src/icons/BookmarkIcon.tsx @@ -1,7 +1,12 @@ import * as React from "react"; import { SVGProps } from "react"; -const BookmarkIcon = ({ width = 25, height, ...props }: SVGProps) => ( +const BookmarkIcon = ({ + width = 25, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + height, + ...props +}: SVGProps) => ( // height is destructed and unused, scaling is defined by width ) xmlns="http://www.w3.org/2000/svg" {...props} > - - + + ); diff --git a/src/icons/CalendarIcon.tsx b/src/icons/CalendarIcon.tsx index 36775f5..a851448 100644 --- a/src/icons/CalendarIcon.tsx +++ b/src/icons/CalendarIcon.tsx @@ -3,7 +3,9 @@ import { SVGProps } from "react"; const CalendarIcon = ({ width = 23, + // eslint-disable-next-line @typescript-eslint/no-unused-vars height, + // eslint-disable-next-line @typescript-eslint/no-unused-vars pathProps, ...props }: SVGProps & { pathProps?: SVGProps }) => ( diff --git a/src/icons/CloseIconOutlined.tsx b/src/icons/CloseIconOutlined.tsx index 147ba82..8c70215 100644 --- a/src/icons/CloseIconOutlined.tsx +++ b/src/icons/CloseIconOutlined.tsx @@ -1,6 +1,11 @@ import * as React from "react"; import { SVGProps } from "react"; -const CloseIconOutlined = ({ width = 14, height, ...props }: SVGProps) => ( +const CloseIconOutlined = ({ + width = 14, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + height, + ...props +}: SVGProps) => ( // height is destructed and unused, scaling is defined by width ) => ( +const DateIcon = ({ + width = 12, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + height, + ...props +}: SVGProps) => ( // height is destructed and unused, scaling is defined by width ) => ( // height is destructed and unused, scaling is defined by width diff --git a/src/icons/DiceIcon.tsx b/src/icons/DiceIcon.tsx index be70a53..a8d6c67 100644 --- a/src/icons/DiceIcon.tsx +++ b/src/icons/DiceIcon.tsx @@ -3,7 +3,9 @@ import { SVGProps } from "react"; const DiceIcon = ({ width = 23, + // eslint-disable-next-line @typescript-eslint/no-unused-vars height, + // eslint-disable-next-line @typescript-eslint/no-unused-vars pathProps, ...props }: SVGProps & { pathProps?: SVGProps }) => ( diff --git a/src/icons/DiscordIcon.tsx b/src/icons/DiscordIcon.tsx index 3bf9f12..987344d 100644 --- a/src/icons/DiscordIcon.tsx +++ b/src/icons/DiscordIcon.tsx @@ -3,7 +3,9 @@ import { SVGProps } from "react"; const DiscordIcon = ({ width = 45, + // eslint-disable-next-line @typescript-eslint/no-unused-vars height, + // eslint-disable-next-line @typescript-eslint/no-unused-vars pathProps, ...props }: SVGProps & { pathProps?: SVGProps }) => ( diff --git a/src/icons/FilterCloseIcon.tsx b/src/icons/FilterCloseIcon.tsx index 703ae47..5014e6e 100644 --- a/src/icons/FilterCloseIcon.tsx +++ b/src/icons/FilterCloseIcon.tsx @@ -1,6 +1,11 @@ import * as React from "react"; import { SVGProps } from "react"; -const FilterCloseIcon = ({ width = 20, height, ...props }: SVGProps) => ( +const FilterCloseIcon = ({ + width = 20, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + height, + ...props +}: SVGProps) => ( // height is destructed and unused, scaling is defined by width ) => ( +const FilterIcon = ({ + width = 13, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + height, + ...props +}: SVGProps) => ( // height is destructed and unused, scaling is defined by width ) => ( diff --git a/src/icons/MicIcon.tsx b/src/icons/MicIcon.tsx index f8143b5..395660d 100644 --- a/src/icons/MicIcon.tsx +++ b/src/icons/MicIcon.tsx @@ -3,6 +3,7 @@ import { SVGProps } from "react"; const MicIcon = ({ width = 27, + // eslint-disable-next-line @typescript-eslint/no-unused-vars height, pathProps, ...props diff --git a/src/icons/NightIcon.tsx b/src/icons/NightIcon.tsx index 0fadac8..1b31c83 100644 --- a/src/icons/NightIcon.tsx +++ b/src/icons/NightIcon.tsx @@ -3,6 +3,7 @@ import { SVGProps } from "react"; const NightIcon = ({ width = 12, + // eslint-disable-next-line @typescript-eslint/no-unused-vars height, pathProps, ...svgProps diff --git a/src/icons/NostrIcon.tsx b/src/icons/NostrIcon.tsx index 79f7cd2..8d848c3 100644 --- a/src/icons/NostrIcon.tsx +++ b/src/icons/NostrIcon.tsx @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ import * as React from "react"; import { SVGProps } from "react"; diff --git a/src/icons/PlusIcon.tsx b/src/icons/PlusIcon.tsx index 290f3df..3aa4586 100644 --- a/src/icons/PlusIcon.tsx +++ b/src/icons/PlusIcon.tsx @@ -1,7 +1,12 @@ import * as React from "react"; import { SVGProps } from "react"; -const PlusIcon = ({ width = 12, height, ...props }: SVGProps) => ( +const PlusIcon = ({ + width = 12, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + height, + ...props +}: SVGProps) => ( // height is destructed and unused, scaling is defined by width ) => ( +const SearchIcon = ({ + width = 20, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + height, + ...props +}: SVGProps) => ( // height is destructed and unused, scaling is defined by width ) => ( +const SortIcon = ({ + width = 20, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + height, + ...props +}: SVGProps) => ( // height is destructed and unused, scaling is defined by width ) => ( +const SourceIcon = ({ + width = 20, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + height, + ...props +}: SVGProps) => ( // height is destructed and unused, scaling is defined by width ) => ( +const TimeIcon = ({ + width = 14, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + height, + ...props +}: SVGProps) => ( // height is destructed and unused, scaling is defined by width void>( func: T, wait: number @@ -5,6 +6,7 @@ export function debounce void>( let timeout: ReturnType | null = null; return function(this: any, ...args: Parameters) { + // eslint-disable-next-line @typescript-eslint/no-this-alias const context = this; const later = () => { @@ -27,6 +29,7 @@ export function throttledDebounce void>( let lastArgs: Parameters | null = null; return function(this: any, ...args: Parameters) { + // eslint-disable-next-line @typescript-eslint/no-this-alias const context = this; if (!inThrottle) { From fc36a4065d921ffe6cb0c45a699979fd47bb7afc Mon Sep 17 00:00:00 2001 From: Emmanuel-Develops Date: Thu, 5 Sep 2024 10:36:57 +0100 Subject: [PATCH 3/4] format: prettier format code --- src/components/button/Button.stories.tsx | 22 ++++----- src/components/button/Button.tsx | 34 ++++++-------- src/components/button/index.tsx | 2 +- src/components/carousel/index.ts | 2 +- src/components/footer/Footer.stories.tsx | 4 +- src/components/footer/FooterAbout.tsx | 53 ++++++++++++--------- src/components/footer/FooterFeedback.tsx | 14 ++++-- src/components/footer/FooterPublic.tsx | 17 +++++-- src/components/footer/FooterSocials.tsx | 37 ++++++++++----- src/components/footer/index.tsx | 2 +- src/components/footer/types.ts | 3 +- src/icons.ts | 52 ++++++++++---------- src/icons/CalendarIcon.tsx | 2 +- src/icons/NostrIcon.tsx | 5 +- src/icons/stories/IconShowcase.tsx | 2 +- src/icons/stories/icon.stories.tsx | 20 ++++---- src/index.ts | 6 +-- src/stories/Button.stories.ts | 26 +++++----- src/stories/Button.tsx | 16 ++++--- src/stories/Header.stories.ts | 14 +++--- src/stories/Header.tsx | 27 ++++++++--- src/stories/Page.stories.ts | 14 +++--- src/stories/Page.tsx | 60 +++++++++++++++--------- src/stories/button.css | 2 +- src/stories/header.css | 2 +- src/stories/page.css | 2 +- src/styles/tailwind.css | 1 - src/utils/index.ts | 8 ++-- 28 files changed, 258 insertions(+), 191 deletions(-) diff --git a/src/components/button/Button.stories.tsx b/src/components/button/Button.stories.tsx index 1a899d9..af38568 100644 --- a/src/components/button/Button.stories.tsx +++ b/src/components/button/Button.stories.tsx @@ -1,20 +1,20 @@ // src/components/Button/Button.stories.tsx -import React from 'react'; -import { StoryFn, Meta } from '@storybook/react'; -import { Button, ButtonProps } from './Button'; +import React from "react"; +import { StoryFn, Meta } from "@storybook/react"; +import { Button, ButtonProps } from "./Button"; export default { - title: 'Components/Button', + title: "Components/Button", component: Button, argTypes: { variant: { - control: { type: 'select', options: ['primary', 'secondary'] } + control: { type: "select", options: ["primary", "secondary"] }, }, disabled: { - control: 'boolean' + control: "boolean", }, - onClick: { action: 'clicked' } + onClick: { action: "clicked" }, }, } as Meta; @@ -22,12 +22,12 @@ const Template: StoryFn = (args) => ; export const Primary = Template.bind({}); Primary.args = { - label: 'Primary Button', - variant: 'primary', + label: "Primary Button", + variant: "primary", }; export const Disabled = Template.bind({}); Disabled.args = { - label: 'Disabled Button', + label: "Disabled Button", disabled: true, -}; \ No newline at end of file +}; diff --git a/src/components/button/Button.tsx b/src/components/button/Button.tsx index d94e38a..c711d38 100644 --- a/src/components/button/Button.tsx +++ b/src/components/button/Button.tsx @@ -1,48 +1,44 @@ // src/components/Button/Button.tsx -import React from 'react'; -import '../../styles/tailwind.output.css'; +import React from "react"; +import "../../styles/tailwind.output.css"; export interface ButtonProps { label: string; onClick?: () => void; - variant?: 'primary' | 'secondary'; - size?: 'small' | 'medium' | 'large'; + variant?: "primary" | "secondary"; + size?: "small" | "medium" | "large"; disabled?: boolean; } export const Button: React.FC = ({ label, onClick, - variant = 'primary', - size = 'medium', + variant = "primary", + size = "medium", disabled = false, }) => { - const baseStyles = 'font-bold py-2 px-4 rounded'; + const baseStyles = "font-bold py-2 px-4 rounded"; const variantStyles = { - primary: 'bg-blue-500 hover:bg-blue-700 text-white', - secondary: 'bg-gray-300 hover:bg-gray-400 text-gray-800', + primary: "bg-blue-500 hover:bg-blue-700 text-white", + secondary: "bg-gray-300 hover:bg-gray-400 text-gray-800", }; const sizeStyles = { - small: 'text-sm', - medium: 'text-base', - large: 'text-lg', + small: "text-sm", + medium: "text-base", + large: "text-lg", }; const className = ` ${baseStyles} ${variantStyles[variant]} ${sizeStyles[size]} - ${disabled ? 'opacity-50 cursor-not-allowed' : ''} + ${disabled ? "opacity-50 cursor-not-allowed" : ""} `.trim(); return ( -
{props.children} -
+
; } return ( -
+ - ) -} + ); +}; -FooterAbout.displayName = "FooterAbout" -export default FooterAbout \ No newline at end of file +FooterAbout.displayName = "FooterAbout"; +export default FooterAbout; diff --git a/src/components/footer/FooterFeedback.tsx b/src/components/footer/FooterFeedback.tsx index de60c2f..9142a3e 100644 --- a/src/components/footer/FooterFeedback.tsx +++ b/src/components/footer/FooterFeedback.tsx @@ -3,12 +3,13 @@ import { FooterPartsPrimitiveProps } from "./types"; import { twMerge } from "tailwind-merge"; import clsx from "clsx"; -export interface FooterFeedbackProps extends FooterPartsPrimitiveProps { +export interface FooterFeedbackProps + extends FooterPartsPrimitiveProps { feedbackLink: string; } const FooterFeedback = ( - props: React.PropsWithChildren + props: React.PropsWithChildren, ) => { const { className, children, feedbackLink, ...rest } = props; if (children) { @@ -19,7 +20,12 @@ const FooterFeedback = ( return (
We'd love to hear your feedback on this project? + > Give Feedback
diff --git a/src/components/footer/FooterPublic.tsx b/src/components/footer/FooterPublic.tsx index f62f063..a224b4e 100644 --- a/src/components/footer/FooterPublic.tsx +++ b/src/components/footer/FooterPublic.tsx @@ -3,18 +3,27 @@ import { FooterPartsPrimitiveProps } from "./types"; import { twMerge } from "tailwind-merge"; import clsx from "clsx"; -export interface FooterPublicProps extends FooterPartsPrimitiveProps { +export interface FooterPublicProps + extends FooterPartsPrimitiveProps { dashboardLink: string; } - -const FooterPublic = ({ className, dashboardLink, ...rest }: FooterPublicProps) => { +const FooterPublic = ({ + className, + dashboardLink, + ...rest +}: FooterPublicProps) => { return ( View our public visitor count diff --git a/src/components/footer/FooterSocials.tsx b/src/components/footer/FooterSocials.tsx index b39bfa4..1b417b5 100644 --- a/src/components/footer/FooterSocials.tsx +++ b/src/components/footer/FooterSocials.tsx @@ -11,7 +11,6 @@ type ManadatorySocialMediaProps = { iconProps?: React.SVGProps; } & T; - type SocialMediaProps = | ManadatorySocialMediaProps<{ entity: SupportedSocialMedia; @@ -22,7 +21,8 @@ type SocialMediaProps = icon: React.ReactElement; }>; -export interface FooterSocialsProps extends FooterPartsPrimitiveProps { +export interface FooterSocialsProps + extends FooterPartsPrimitiveProps { platforms: SocialMediaProps[]; } @@ -34,16 +34,27 @@ const Platform = ({ platform }: { platform: SocialMediaProps }) => { return React.cloneElement(icon, { ...rest, className }); } if (entity === "twitter") { - return ; + return ( + + ); } if (entity === "github") { - return ; + return ( + + ); } if (entity === "discord") { - return ; + return ( + + ); } if (entity === "nostr") { - return ; + return ( + + ); } }; const iconElement = getIcon(entity); @@ -73,7 +84,7 @@ const Platform = ({ platform }: { platform: SocialMediaProps }) => { */ export const FooterSocials = ( - props: React.PropsWithChildren + props: React.PropsWithChildren, ) => { const { className: classname, children, platforms, ...rest } = props; if (children) { @@ -81,12 +92,14 @@ export const FooterSocials = ( {props.children}
; } - const resolvedClassName = twMerge(clsx('text-black mb-[6px] md:mb-0 dark:text-white flex w-fit max-w-full gap-[24px]', classname)); + const resolvedClassName = twMerge( + clsx( + "text-black mb-[6px] md:mb-0 dark:text-white flex w-fit max-w-full gap-[24px]", + classname, + ), + ); return ( -
+
{platforms.map((platform) => ( ))} diff --git a/src/components/footer/index.tsx b/src/components/footer/index.tsx index db4e675..5fca53f 100644 --- a/src/components/footer/index.tsx +++ b/src/components/footer/index.tsx @@ -1 +1 @@ -export * from './Footer'; \ No newline at end of file +export * from "./Footer"; diff --git a/src/components/footer/types.ts b/src/components/footer/types.ts index 8f872b7..708eb5c 100644 --- a/src/components/footer/types.ts +++ b/src/components/footer/types.ts @@ -1,4 +1,3 @@ -export interface FooterPartsPrimitiveProps - extends React.HTMLAttributes { +export interface FooterPartsPrimitiveProps extends React.HTMLAttributes { className?: string; } diff --git a/src/icons.ts b/src/icons.ts index f0a1529..a6a6c2b 100644 --- a/src/icons.ts +++ b/src/icons.ts @@ -1,26 +1,26 @@ -export { default as AppsIcon } from './icons/AppsIcon'; -export { default as ArrowLeft } from './icons/ArrowLeft'; -export { default as ArrowLinkRight } from './icons/ArrowLinkRight'; -export { default as ArrowLinkUpRight } from './icons/ArrowLinkUpRight'; -export { default as ArrowRight } from './icons/ArrowRight'; -export { default as AuthorIcon } from './icons/AuthorIcon'; -export { default as BitcoinIcon} from './icons/BitcoinIcon'; -export { default as BookmarkIcon} from './icons/BookmarkIcon'; -export { default as CalendarIcon} from './icons/CalendarIcon'; -export { default as CloseIconOutlined} from './icons/CloseIconOutlined'; -export { default as DateIcon} from './icons/DateIcon'; -export { default as DayIcon} from './icons/DayIcon'; -export { default as DiceIcon} from './icons/DiceIcon'; -export { default as DiscordIcon} from './icons/DiscordIcon'; -export { default as FilterIcon} from './icons/FilterIcon'; -export { default as FilterCloseIcon} from './icons/FilterCloseIcon'; -export { default as GithubIcon} from './icons/GithubIcon'; -export { default as MicIcon} from './icons/MicIcon'; -export { default as NightIcon} from './icons/NightIcon'; -export { default as NostrIcon} from './icons/NostrIcon'; -export { default as PlusIcon} from './icons/PlusIcon'; -export { default as SearchIcon} from './icons/SearchIcon'; -export { default as SortIcon} from './icons/SortIcon'; -export { default as SourceIcon} from './icons/SourceIcon'; -export { default as TimeIcon} from './icons/TimeIcon'; -export { default as TwitterXIcon} from './icons/TwitterXIcon'; +export { default as AppsIcon } from "./icons/AppsIcon"; +export { default as ArrowLeft } from "./icons/ArrowLeft"; +export { default as ArrowLinkRight } from "./icons/ArrowLinkRight"; +export { default as ArrowLinkUpRight } from "./icons/ArrowLinkUpRight"; +export { default as ArrowRight } from "./icons/ArrowRight"; +export { default as AuthorIcon } from "./icons/AuthorIcon"; +export { default as BitcoinIcon } from "./icons/BitcoinIcon"; +export { default as BookmarkIcon } from "./icons/BookmarkIcon"; +export { default as CalendarIcon } from "./icons/CalendarIcon"; +export { default as CloseIconOutlined } from "./icons/CloseIconOutlined"; +export { default as DateIcon } from "./icons/DateIcon"; +export { default as DayIcon } from "./icons/DayIcon"; +export { default as DiceIcon } from "./icons/DiceIcon"; +export { default as DiscordIcon } from "./icons/DiscordIcon"; +export { default as FilterIcon } from "./icons/FilterIcon"; +export { default as FilterCloseIcon } from "./icons/FilterCloseIcon"; +export { default as GithubIcon } from "./icons/GithubIcon"; +export { default as MicIcon } from "./icons/MicIcon"; +export { default as NightIcon } from "./icons/NightIcon"; +export { default as NostrIcon } from "./icons/NostrIcon"; +export { default as PlusIcon } from "./icons/PlusIcon"; +export { default as SearchIcon } from "./icons/SearchIcon"; +export { default as SortIcon } from "./icons/SortIcon"; +export { default as SourceIcon } from "./icons/SourceIcon"; +export { default as TimeIcon } from "./icons/TimeIcon"; +export { default as TwitterXIcon } from "./icons/TwitterXIcon"; diff --git a/src/icons/CalendarIcon.tsx b/src/icons/CalendarIcon.tsx index a851448..46b95c2 100644 --- a/src/icons/CalendarIcon.tsx +++ b/src/icons/CalendarIcon.tsx @@ -11,7 +11,7 @@ const CalendarIcon = ({ }: SVGProps & { pathProps?: SVGProps }) => ( // height is destructed and unused, scaling is defined by width // pathProps is destructured and unused - + - + ); diff --git a/src/icons/stories/IconShowcase.tsx b/src/icons/stories/IconShowcase.tsx index d6e33b0..87f56b1 100644 --- a/src/icons/stories/IconShowcase.tsx +++ b/src/icons/stories/IconShowcase.tsx @@ -1,6 +1,6 @@ import React from "react"; -export const IconShowcase = ({children}: {children: React.ReactNode}) => { +export const IconShowcase = ({ children }: { children: React.ReactNode }) => { return (
diff --git a/src/icons/stories/icon.stories.tsx b/src/icons/stories/icon.stories.tsx index 5e8bc21..446e119 100644 --- a/src/icons/stories/icon.stories.tsx +++ b/src/icons/stories/icon.stories.tsx @@ -20,25 +20,23 @@ const meta: Meta = { export default meta; -type SVGIcon = React.SVGProps & { pathProps?: React.SVGProps } +type SVGIcon = React.SVGProps & { + pathProps?: React.SVGProps; +}; type IconComponent = React.ComponentType; type Story = StoryObj; -const IconGrid = ({ - width, - color, - ...args -}: SVGIcon) => ( +const IconGrid = ({ width, color, ...args }: SVGIcon) => ( {Object.entries(Icons).map(([name, Icon]) => { const IconComponent = Icon as IconComponent; - IconComponent.defaultProps= { + IconComponent.defaultProps = { width, color, - ...args - } - return (); + ...args, + }; + return ; })} ); @@ -49,7 +47,7 @@ export const AllIcons: Story = { className: "text-orange-500", pathProps: { strokeWidth: 1.5, - } + }, }, render: (args) => , }; diff --git a/src/index.ts b/src/index.ts index 3ce237e..b04b71b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,3 @@ -export * from './components/button'; -export * from './components/footer'; -export * from './components/carousel'; \ No newline at end of file +export * from "./components/button"; +export * from "./components/footer"; +export * from "./components/carousel"; diff --git a/src/stories/Button.stories.ts b/src/stories/Button.stories.ts index 455a9d8..dff96cf 100644 --- a/src/stories/Button.stories.ts +++ b/src/stories/Button.stories.ts @@ -1,20 +1,20 @@ -import type { Meta, StoryObj } from '@storybook/react'; -import { fn } from '@storybook/test'; -import { Button } from './Button'; +import type { Meta, StoryObj } from "@storybook/react"; +import { fn } from "@storybook/test"; +import { Button } from "./Button"; // More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export const meta = { - title: 'Example/Button', + title: "Example/Button", component: Button, parameters: { // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout - layout: 'centered', + layout: "centered", }, // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs - tags: ['autodocs'], + tags: ["autodocs"], // More on argTypes: https://storybook.js.org/docs/api/argtypes argTypes: { - backgroundColor: { control: 'color' }, + backgroundColor: { control: "color" }, }, // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args args: { onClick: fn() }, @@ -27,26 +27,26 @@ type Story = StoryObj; export const Primary: Story = { args: { primary: true, - label: 'Button', + label: "Button", }, }; export const Secondary: Story = { args: { - label: 'Button', + label: "Button", }, }; export const Large: Story = { args: { - size: 'large', - label: 'Button', + size: "large", + label: "Button", }, }; export const Small: Story = { args: { - size: 'small', - label: 'Button', + size: "small", + label: "Button", }, }; diff --git a/src/stories/Button.tsx b/src/stories/Button.tsx index c33be6e..722d7a7 100644 --- a/src/stories/Button.tsx +++ b/src/stories/Button.tsx @@ -1,5 +1,5 @@ -import React from 'react'; -import './button.css'; +import React from "react"; +import "./button.css"; interface ButtonProps { /** @@ -13,7 +13,7 @@ interface ButtonProps { /** * How large should the button be? */ - size?: 'small' | 'medium' | 'large'; + size?: "small" | "medium" | "large"; /** * Button contents */ @@ -29,16 +29,20 @@ interface ButtonProps { */ export const Button = ({ primary = false, - size = 'medium', + size = "medium", backgroundColor, label, ...props }: ButtonProps) => { - const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary'; + const mode = primary + ? "storybook-button--primary" + : "storybook-button--secondary"; return (