Skip to content

Commit 6afadf5

Browse files
AdminJS Dev workspaces (#33)
* chore: moved submodules to packages * chore: reinit submodules * chore: introduced bootstrap script * chore: added adminjs-bundler submodule * chore: fixed building doc * chore: fixed building doc * chore: improved dev environment, updated readme * chore: updated readme * chore: updated readme * chore: updated readme * chore: add npm-run-all * chore: updated settings * chore: fixed cr issues * chore: fixed cr issues * chore: removed depracated extension * chore: added global lint todo * chore: sync submodules * chore: fixed bootstrap build order * chore: fixed bootstrap build order * chore: sync submodules * chore: improved example app
1 parent 533b5f2 commit 6afadf5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+17592
-18920
lines changed

.adminbro/.entry.js

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

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
**/node_modules/**
2+
# TODO create separete repo for global linting
3+
packages/**

.eslintrc

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"extends": ["eslint:recommended", "plugin:react/recommended", "plugin:prettier/recommended"],
3+
"plugins": ["react", "react-hooks"],
4+
"env": {
5+
"browser": true,
6+
"commonjs": true,
7+
"es6": true,
8+
"jest": true,
9+
"node": true
10+
},
11+
"parserOptions": {
12+
"ecmaVersion": 2018,
13+
"sourceType": "module",
14+
"ecmaFeatures": {
15+
"classes": true,
16+
"impliedStrict": true,
17+
"jsx": true
18+
}
19+
},
20+
"rules": {
21+
"no-console": "off",
22+
"react/no-deprecated": "warn",
23+
"react/prop-types": "off",
24+
"react-hooks/rules-of-hooks": "error",
25+
"react-hooks/exhaustive-deps": "warn",
26+
"prettier/prettier": "error"
27+
},
28+
"settings": {
29+
"react": {
30+
"version": "16.13"
31+
}
32+
},
33+
"overrides": [
34+
{
35+
"files": ["**/*.ts", "**/*.tsx"],
36+
"parser": "@typescript-eslint/parser",
37+
"parserOptions": {
38+
"ecmaVersion": 2018,
39+
"sourceType": "module",
40+
"ecmaFeatures": {
41+
"jsx": true
42+
},
43+
"warnOnUnsupportedTypeScriptVersion": true
44+
},
45+
"plugins": ["@typescript-eslint"],
46+
"rules": {
47+
"no-undef": "off", // this is required for optional chaining
48+
"@typescript-eslint/consistent-type-assertions": "warn",
49+
"@typescript-eslint/no-array-constructor": "warn",
50+
"@typescript-eslint/no-namespace": "error",
51+
"@typescript-eslint/no-var-requires": true,
52+
"@typescript-eslint/no-unused-vars": [
53+
"warn",
54+
{
55+
"args": "none",
56+
"ignoreRestSiblings": true
57+
}
58+
],
59+
"@typescript-eslint/prefer-optional-chain": "warn"
60+
}
61+
}
62+
],
63+
"globals": {
64+
"branch": "readonly",
65+
"globalThis": "readonly"
66+
}
67+
}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,6 @@ Temporary Items
5656
# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)
5757
.cache
5858
.parcel-cache
59+
60+
# Submodules
61+
packages

.gitmodules

Lines changed: 42 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,76 @@
1-
[submodule "adminjs"]
2-
path = adminjs
1+
[submodule "packages/adminjs"]
2+
path = packages/adminjs
33
url = [email protected]:SoftwareBrothers/adminjs.git
44
branch = master
5-
[submodule "adminjs-hapijs"]
6-
path = adminjs-hapijs
5+
[submodule "packages/adminjs-hapijs"]
6+
path = packages/adminjs-hapijs
77
url = [email protected]:SoftwareBrothers/adminjs-hapijs.git
88
branch = master
9-
[submodule "adminjs-mongoose"]
10-
path = adminjs-mongoose
9+
[submodule "packages/adminjs-mongoose"]
10+
path = packages/adminjs-mongoose
1111
url = [email protected]:SoftwareBrothers/adminjs-mongoose.git
1212
branch = master
13-
[submodule "adminjs-sequelizejs"]
14-
path = adminjs-sequelizejs
13+
[submodule "packages/adminjs-sequelizejs"]
14+
path = packages/adminjs-sequelizejs
1515
url = [email protected]:SoftwareBrothers/adminjs-sequelizejs.git
1616
branch = master
17-
[submodule "adminjs-example-app"]
18-
path = adminjs-example-app
17+
[submodule "packages/adminjs-example-app"]
18+
path = packages/adminjs-example-app
1919
url = [email protected]:SoftwareBrothers/adminjs-example-app.git
2020
branch = master
21-
[submodule "adminjs-expressjs"]
22-
path = adminjs-expressjs
21+
[submodule "packages/adminjs-expressjs"]
22+
path = packages/adminjs-expressjs
2323
url = [email protected]:SoftwareBrothers/adminjs-expressjs.git
2424
branch = master
25-
[submodule "adminjs-typeorm"]
26-
path = adminjs-typeorm
25+
[submodule "packages/adminjs-typeorm"]
26+
path = packages/adminjs-typeorm
2727
url = [email protected]:SoftwareBrothers/adminjs-typeorm.git
2828
branch = master
29-
[submodule "adminjs-firebase-functions"]
30-
path = adminjs-firebase-functions
29+
[submodule "packages/adminjs-firebase-functions"]
30+
path = packages/adminjs-firebase-functions
3131
url = [email protected]:SoftwareBrothers/adminjs-firebase-functions.git
3232
branch = master
33-
[submodule "adminjs-design-system"]
34-
path = adminjs-design-system
33+
[submodule "packages/adminjs-design-system"]
34+
path = packages/adminjs-design-system
3535
url = [email protected]:SoftwareBrothers/adminjs-design-system.git
3636
branch = master
37-
[submodule "adminjs-upload"]
38-
path = adminjs-upload
37+
[submodule "packages/adminjs-upload"]
38+
path = packages/adminjs-upload
3939
url = [email protected]:SoftwareBrothers/adminjs-upload.git
4040
branch = master
41-
[submodule "adminjs-passwords"]
42-
path = adminjs-passwords
41+
[submodule "packages/adminjs-passwords"]
42+
path = packages/adminjs-passwords
4343
url = [email protected]:SoftwareBrothers/adminjs-passwords.git
4444
branch = master
45-
[submodule "adminjs-nestjs"]
46-
path = adminjs-nestjs
45+
[submodule "packages/adminjs-nestjs"]
46+
path = packages/adminjs-nestjs
4747
url = [email protected]:SoftwareBrothers/adminjs-nestjs.git
4848
branch = master
49-
[submodule "better-docs"]
50-
path = better-docs
51-
url = [email protected]:SoftwareBrothers/better-docs.git
52-
branch = master
53-
[submodule "adminjs-prisma"]
54-
path = adminjs-prisma
49+
[submodule "packages/adminjs-prisma"]
50+
path = packages/adminjs-prisma
5551
url = [email protected]:SoftwareBrothers/adminjs-prisma.git
5652
branch = main
57-
[submodule "adminjs-logger"]
58-
path = adminjs-logger
53+
[submodule "packages/adminjs-logger"]
54+
path = packages/adminjs-logger
5955
url = [email protected]:SoftwareBrothers/adminjs-logger.git
6056
branch = master
61-
[submodule "adminjs-import-export"]
62-
path = adminjs-import-export
57+
[submodule "packages/adminjs-import-export"]
58+
path = packages/adminjs-import-export
6359
url = [email protected]:SoftwareBrothers/adminjs-import-export.git
6460
branch = main
65-
[submodule "adminjs-mikroorm"]
66-
path = adminjs-mikroorm
61+
[submodule "packages/adminjs-mikroorm"]
62+
path = packages/adminjs-mikroorm
6763
url = [email protected]:SoftwareBrothers/adminjs-mikroorm.git
6864
branch = master
69-
[submodule "adminjs-fastify"]
70-
path = adminjs-fastify
65+
[submodule "packages/adminjs-fastify"]
66+
path = packages/adminjs-fastify
7167
url = [email protected]:SoftwareBrothers/adminjs-fastify.git
7268
branch = main
69+
[submodule "better-docs"]
70+
path = better-docs
71+
url = [email protected]:SoftwareBrothers/better-docs.git
72+
branch = master
73+
[submodule "packages/adminjs-bundler"]
74+
path = packages/adminjs-bundler
75+
url = [email protected]:SoftwareBrothers/adminjs-bundler.git
76+
branch = main

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package.json

.prettierrc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"printWidth": 120,
3+
"singleQuote": true,
4+
"trailingComma": "es5",
5+
"overrides": [
6+
{
7+
"files": ["*.ts", "*.tsx"],
8+
"options": {
9+
"parser": "typescript"
10+
}
11+
},
12+
{
13+
"files": "*.css",
14+
"options": {
15+
"singleQuote": false,
16+
"tabWidth": 2
17+
}
18+
}
19+
]
20+
}

.vscode/extensions.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"recommendations": [
3+
"coenraads.bracket-pair-colorizer",
4+
"dbaeumer.vscode-eslint",
5+
"eamodio.gitlens",
6+
"esbenp.prettier-vscode",
7+
"quicktype.quicktype",
8+
]
9+
}

.vscode/settings.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"[html]": {
3+
"editor.defaultFormatter": "vscode.html-language-features"
4+
},
5+
"[javascript]": {
6+
"editor.defaultFormatter": "esbenp.prettier-vscode"
7+
},
8+
"[typescript]": {
9+
"editor.defaultFormatter": "esbenp.prettier-vscode"
10+
},
11+
"[typescriptreact]": {
12+
"editor.defaultFormatter": "esbenp.prettier-vscode"
13+
},
14+
"[json]": {
15+
"editor.defaultFormatter": "esbenp.prettier-vscode"
16+
},
17+
"[jsonc]": {
18+
"editor.defaultFormatter": "esbenp.prettier-vscode"
19+
},
20+
"editor.codeActionsOnSave": {
21+
"source.fixAll": true
22+
},
23+
"editor.detectIndentation": false,
24+
"editor.insertSpaces": true,
25+
"editor.linkedEditing": true,
26+
"editor.multiCursorModifier": "alt",
27+
"editor.renderWhitespace": "trailing",
28+
"editor.rulers": [120],
29+
"editor.snippetSuggestions": "inline",
30+
"editor.tabCompletion": "on",
31+
"editor.tabSize": 2,
32+
"files.trimTrailingWhitespace": true,
33+
"javascript.updateImportsOnFileMove.enabled": "always",
34+
"prettier.arrowParens": "avoid",
35+
"typescript.preferences.importModuleSpecifier": "non-relative",
36+
"typescript.preferences.importModuleSpecifierEnding": "minimal",
37+
"typescript.suggest.autoImports": true,
38+
"typescript.suggest.completeFunctionCalls": true,
39+
"typescript.suggest.paths": true,
40+
"typescript.updateImportsOnFileMove.enabled": "always"
41+
}

.vscode/tasks.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,20 @@
88
"script": "cover",
99
"path": "adminjs/",
1010
"problemMatcher": []
11+
},
12+
{
13+
"type": "shell",
14+
"command": "${workspaceFolder}/scripts/bootstrap.sh",
15+
"problemMatcher": [],
16+
"label": "Bootstrap monorepo",
17+
"detail": "Run script for bootstrap all project for development"
18+
},
19+
{
20+
"type": "npm",
21+
"script": "dev",
22+
"problemMatcher": [],
23+
"label": "Run dev",
24+
"detail": "Run project in development mode"
1125
}
1226
]
1327
}

0 commit comments

Comments
 (0)