Skip to content

Commit 98cef50

Browse files
Feature/devcontv2 (Mintplex-Labs#1622)
* Updated apt-packages source for devcontainer Switched the devcontainer's package source to a different repository to align with updated dependencies and package availability. The previous source from 'rocker-org' is replaced with 'devcontainers-contrib', which may offer more recent or relevant development tools. * Subject: Centralize prettier ignores and refine config Body: Centralized all prettier ignore rules by removing individual `.prettierignore` files in subprojects and updating the root `.prettierignore` to include previously ignored patterns, ensuring consistency across the workspace. Additionally, the prettier configuration was refined by making the file pattern for `.config.js` files consistent and adjusting quote styles for better readability. All lint scripts across the project were updated to respect the centralized ignore path, enhancing maintainability. The consolidation simplifies the process of managing ignore rules as the project scales, ensuring developers can focus on writing code without worrying about divergent formatting standards. These changes also align with introducing comprehensive linting across multiple environments to keep the codebase clean and consistent. This adjustment is a foundational step towards a more streamlined and unified code base, making it easier for new contributors to adhere to established coding standards and reducing the cognitive load associated with managing multiple configuration files across the project. * unset package json changes --------- Co-authored-by: Francisco Bischoff <[email protected]> Co-authored-by: Francisco Bischoff <[email protected]>
1 parent d29292e commit 98cef50

File tree

12 files changed

+21
-29
lines changed

12 files changed

+21
-29
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
// Terraform support
2323
"ghcr.io/devcontainers/features/terraform:1": {},
2424
// Just a wrap to install needed packages
25-
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": {
25+
"ghcr.io/devcontainers-contrib/features/apt-packages:1": {
2626
// Dependencies copied from ../docker/Dockerfile plus some dev stuff
2727
"packages": [
2828
"build-essential",

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ frontend/bundleinspector.html
1010

1111
#server
1212
server/swagger/openapi.json
13+
14+
#embed
15+
**/static/**
16+
embed/src/utils/chat/hljs.js

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
}
1818
},
1919
{
20-
"files": "*.config.js",
20+
"files": ["*.config.js"],
2121
"options": {
2222
"semi": false,
2323
"parser": "flow",

collector/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"scripts": {
1313
"dev": "NODE_ENV=development nodemon --ignore hotdir --ignore storage --trace-warnings index.js",
1414
"start": "NODE_ENV=production node index.js",
15-
"lint": "yarn prettier --write ./processSingleFile ./processLink ./utils index.js"
15+
"lint": "yarn prettier --ignore-path ../.prettierignore --write ./processSingleFile ./processLink ./utils index.js"
1616
},
1717
"dependencies": {
1818
"@googleapis/youtube": "^9.0.0",

embed/.prettierignore

Lines changed: 0 additions & 9 deletions
This file was deleted.

embed/jsconfig.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
"target": "esnext",
55
"jsx": "react",
66
"paths": {
7-
"@/*": [
8-
"./src/*"
9-
],
10-
}
11-
}
12-
}
7+
"@/*": ["./src/*"],
8+
},
9+
},
10+
}

embed/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
22
"name": "anythingllm-embedded-chat",
33
"private": false,
4+
"license": "MIT",
45
"type": "module",
56
"scripts": {
67
"dev": "nodemon -e js,jsx,css --watch src --exec \"yarn run dev:preview\"",
78
"dev:preview": "yarn run dev:build && yarn serve . -p 3080 --no-clipboard",
89
"dev:build": "vite build && cat src/static/[email protected] >> dist/anythingllm-chat-widget.js",
910
"build": "vite build && cat src/static/[email protected] >> dist/anythingllm-chat-widget.js && npx terser --compress -o dist/anythingllm-chat-widget.min.js -- dist/anythingllm-chat-widget.js",
1011
"build:publish": "yarn build && mkdir -p ../frontend/public/embed && cp -r dist/anythingllm-chat-widget.min.js ../frontend/public/embed/anythingllm-chat-widget.min.js",
11-
"lint": "yarn prettier --write ./src"
12+
"lint": "yarn prettier --ignore-path ../.prettierignore --write ./src"
1213
},
1314
"dependencies": {
1415
"@microsoft/fetch-event-source": "^2.0.1",

embed/vite.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default defineConfig({
3838
rollupOptions: {
3939
external: [
4040
// Reduces transformation time by 50% and we don't even use this variant, so we can ignore.
41-
/@phosphor-icons\/react\/dist\/ssr/,
41+
/@phosphor-icons\/react\/dist\/ssr/
4242
]
4343
},
4444
commonjsOptions: {
@@ -51,7 +51,7 @@ export default defineConfig({
5151
emptyOutDir: true,
5252
inlineDynamicImports: true,
5353
assetsDir: "",
54-
sourcemap: 'inline',
54+
sourcemap: "inline"
5555
},
5656
optimizeDeps: {
5757
esbuildOptions: {
@@ -60,5 +60,5 @@ export default defineConfig({
6060
},
6161
plugins: []
6262
}
63-
},
63+
}
6464
})

frontend/jsconfig.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
"target": "esnext",
55
"jsx": "react",
66
"paths": {
7-
"@/*": [
8-
"./src/*"
9-
],
7+
"@/*": ["./src/*"]
108
}
119
}
12-
}
10+
}

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"start": "vite --open",
88
"dev": "NODE_ENV=development vite --debug --host=0.0.0.0",
99
"build": "vite build",
10-
"lint": "yarn prettier --write ./src",
10+
"lint": "yarn prettier --ignore-path ../.prettierignore --write ./src",
1111
"preview": "vite preview"
1212
},
1313
"dependencies": {

0 commit comments

Comments
 (0)