Skip to content

Commit 6dd2c04

Browse files
committed
Modularized contexts and added lint tooling
1 parent 336e440 commit 6dd2c04

20 files changed

Lines changed: 4349 additions & 2556 deletions

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dist
2+
node_modules
3+
services/private-link-proxy/build
4+
services/private-link-proxy/node_modules
5+

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"singleQuote": true,
3+
"semi": true,
4+
"trailingComma": "all",
5+
"printWidth": 100,
6+
"arrowParens": "avoid"
7+
}
8+

dist/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
<meta name="twitter:image" content="https://raw.githubusercontent.com/Letdown2491/bloom/main/public/og-image.png">
2222

2323
<meta name="keywords" content="Bloom, Blossom, NIP-96, NIP-94, Nostr, file manager, distributed storage, metadata, media playback, open source">
24-
<script type="module" crossorigin src="/assets/index-Dv0pdI6c.js"></script>
24+
<script type="module" crossorigin src="/assets/index-dNOANNGD.js"></script>
2525
<link rel="modulepreload" crossorigin href="/assets/vendor-DhynQjd6.js">
2626
<link rel="modulepreload" crossorigin href="/assets/qrcode-Dz3BF1n8.js">
2727
<link rel="modulepreload" crossorigin href="/assets/react-B5NV7uPC.js">
2828
<link rel="modulepreload" crossorigin href="/assets/react-query-D8im5Lt0.js">
2929
<link rel="modulepreload" crossorigin href="/assets/music-metadata-C2reaobX.js">
3030
<link rel="modulepreload" crossorigin href="/assets/axios-ngrFHoWO.js">
31-
<link rel="stylesheet" crossorigin href="/assets/index-BDMAM-rc.css">
31+
<link rel="stylesheet" crossorigin href="/assets/index--IEX9Vxs.css">
3232
</head>
3333
<body class="bg-slate-950 text-slate-100">
3434
<div id="root"></div>

eslint.config.js

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import js from "@eslint/js";
2+
import tseslint from "typescript-eslint";
3+
import react from "eslint-plugin-react";
4+
import reactHooks from "eslint-plugin-react-hooks";
5+
import jsxA11y from "eslint-plugin-jsx-a11y";
6+
import prettier from "eslint-plugin-prettier";
7+
import globals from "globals";
8+
9+
export default tseslint.config(
10+
{
11+
ignores: [
12+
"dist/**",
13+
"node_modules/**",
14+
"services/private-link-proxy/build/**",
15+
"services/private-link-proxy/node_modules/**",
16+
],
17+
},
18+
js.configs.recommended,
19+
...tseslint.configs.recommended,
20+
{
21+
files: ["**/*.{ts,tsx,js,jsx}"],
22+
languageOptions: {
23+
parserOptions: {
24+
ecmaVersion: "latest",
25+
sourceType: "module",
26+
ecmaFeatures: {
27+
jsx: true,
28+
},
29+
},
30+
globals: {
31+
...globals.browser,
32+
...globals.es2021,
33+
},
34+
},
35+
plugins: {
36+
"@typescript-eslint": tseslint.plugin,
37+
react,
38+
"react-hooks": reactHooks,
39+
"jsx-a11y": jsxA11y,
40+
prettier,
41+
},
42+
settings: {
43+
react: { version: "detect" },
44+
},
45+
rules: {
46+
"prettier/prettier": "error",
47+
"react/react-in-jsx-scope": "off",
48+
"@typescript-eslint/no-explicit-any": "warn",
49+
"@typescript-eslint/consistent-type-imports": "warn",
50+
},
51+
}
52+
);

package.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99
"preview": "vite preview",
1010
"analyze": "ANALYZE=true pnpm build",
1111
"test": "vitest",
12-
"both": "concurrently \"pnpm run preview\" \"cd services/private-link-proxy && pnpm start\""
12+
"both": "concurrently \"pnpm run preview\" \"cd services/private-link-proxy && pnpm start\"",
13+
"lint": "eslint \"{src,services}/**/*.{ts,tsx}\"",
14+
"lint:fix": "pnpm lint -- --fix",
15+
"format": "prettier --check \"**/*.{ts,tsx,js,jsx,json,css,md}\"",
16+
"format:write": "prettier --write \"**/*.{ts,tsx,js,jsx,json,css,md}\""
1317
},
1418
"dependencies": {
1519
"@nostr-dev-kit/ndk": "^2.9.1",
@@ -26,18 +30,30 @@
2630
"react-window": "^1.8.9"
2731
},
2832
"devDependencies": {
33+
"@eslint/js": "^9.38.0",
2934
"@testing-library/jest-dom": "^6.4.6",
3035
"@testing-library/react": "^14.2.1",
3136
"@testing-library/user-event": "^14.5.2",
3237
"@types/react": "^18.2.0",
3338
"@types/react-dom": "^18.2.0",
39+
"@typescript-eslint/eslint-plugin": "^8.46.2",
40+
"@typescript-eslint/parser": "^8.46.2",
3441
"@vitejs/plugin-react": "^5.0.2",
3542
"autoprefixer": "^10.4.19",
3643
"concurrently": "^9.2.1",
44+
"eslint": "^9.38.0",
45+
"eslint-config-prettier": "^10.1.8",
46+
"eslint-plugin-jsx-a11y": "^6.10.2",
47+
"eslint-plugin-prettier": "^5.5.4",
48+
"eslint-plugin-react": "^7.37.5",
49+
"eslint-plugin-react-hooks": "^7.0.0",
50+
"globals": "^16.4.0",
3751
"postcss": "^8.4.39",
52+
"prettier": "^3.6.2",
3853
"rollup-plugin-visualizer": "^5.12.0",
3954
"tailwindcss": "^3.4.10",
4055
"typescript": "^5.5.4",
56+
"typescript-eslint": "^8.46.2",
4157
"vite": "^5.4.0",
4258
"vitest": "^1.6.0"
4359
},

0 commit comments

Comments
 (0)