Skip to content

Commit

Permalink
revert pnpm
Browse files Browse the repository at this point in the history
  • Loading branch information
ugcodrr committed Jun 4, 2023
1 parent 8aeaaf2 commit 2ccbe07
Show file tree
Hide file tree
Showing 45 changed files with 13,387 additions and 10,089 deletions.
16 changes: 12 additions & 4 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-16
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.231.5/containers/typescript-node/.devcontainer/base.Dockerfile

# Install additional OS packages
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 16, 14, 12, 16-bullseye, 14-bullseye, 12-bullseye, 16-buster, 14-buster, 12-buster
ARG VARIANT="16"
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends fontconfig redis-server

# Install NPM packages
RUN su node -c "npm install -g pm2 git-cz pnpm"
# [Optional] Uncomment if you want to install an additional version of node using nvm
# ARG EXTRA_NODE_VERSION=16
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"

# [Optional] Uncomment if you want to install more global node packages
RUN su node -c "npm install -g pm2 git-cz"
74 changes: 52 additions & 22 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,62 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.231.5/containers/typescript-node
{
"name": "Statsify",
"build": {
"dockerfile": "Dockerfile"
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version: 16, 14, 12.
// Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local on arm64/Apple Silicon.
"args": {
"VARIANT": "16"
}
},
"customizations": {
"vscode": {
"extensions": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"vivaxy.vscode-conventional-commits",
"mikestead.dotenv",
"ms-azuretools.vscode-docker",
"lokalise.i18n-ally",
"gruntfuggly.todo-tree"
]

// Set *default* container specific settings.json values on container create.
"settings": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": ["source.organizeImports", "source.fixAll.eslint"],
"typescript.tsdk": "node_modules/typescript/lib",
"[handlebars]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"explorer.experimental.fileNesting.patterns": {
"package.json": "package-lock.json, .npmrc, yarn.lock, .yarnrc, pnpm-lock.yaml, tsconfig.*.json, tsconfig.json, jest.config.js, turbo.json, README.md, LICENSE, cliff.toml, .prettierrc, .eslintrc, .yarnrc.yml, .swcrc, .gitignore, .eslintignore, .env, .env.schema, renovate.json, .gitmodules"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
},
"runArgs": [
"--privileged"
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"christian-kohler.path-intellisense",
"vivaxy.vscode-conventional-commits",
"mikestead.dotenv",
"ms-azuretools.vscode-docker",
"eg2.vscode-npm-script",
"christian-kohler.npm-intellisense"
],
"containerEnv": {
"USE_POLLING": "true"
},

"runArgs": ["--privileged"],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "/workspaces/statsify/.devcontainer/install.sh",

"postStartCommand": "sudo /etc/init.d/redis-server start && yarn scripts apikey --nonInteractiveKeyCreation",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node",
"postCreateCommand": "git submodule update --init && pnpm install && pnpm run build",
"postStartCommand": "sudo /etc/init.d/redis-server start && git config core.autocrlf true && pnpm scripts api-key --nonInteractiveKeyCreation",
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {}
"git": "latest",
"github-cli": "latest"
}
}
}
2 changes: 2 additions & 0 deletions .devcontainer/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo 'alias c=clear' >> ~/.zshrc
yarn install
186 changes: 45 additions & 141 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,8 @@
"ts-nocheck": true
}
],
"@typescript-eslint/default-param-last": [
"error"
],
"@typescript-eslint/explicit-member-accessibility": [
"error"
],
"@typescript-eslint/default-param-last": ["error"],
"@typescript-eslint/explicit-member-accessibility": ["error"],
"@typescript-eslint/member-ordering": [
"error",
{
Expand Down Expand Up @@ -79,18 +75,10 @@
]
}
],
"@typescript-eslint/ban-types": [
"off"
],
"@typescript-eslint/no-explicit-any": [
"off"
],
"@typescript-eslint/no-non-null-assertion": [
"off"
],
"@typescript-eslint/no-unused-vars": [
"off"
],
"@typescript-eslint/ban-types": ["off"],
"@typescript-eslint/no-explicit-any": ["off"],
"@typescript-eslint/no-non-null-assertion": ["off"],
"@typescript-eslint/no-unused-vars": ["off"],
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"error",
Expand All @@ -101,62 +89,27 @@
"argsIgnorePattern": "^_"
}
],
"arrow-body-style": [
"error",
"as-needed"
],
"no-constant-binary-expression": [
"error"
],
"no-constructor-return": [
"error"
],
"no-duplicate-imports": [
"error"
],
"no-extra-semi": [
"error"
],
"no-floating-decimal": [
"error"
],
"no-lonely-if": [
"error"
],
"object-shorthand": [
"error",
"always"
],
"one-var": [
"error",
"never"
],
"prefer-template": [
"error"
],
"arrow-body-style": ["error", "as-needed"],
"no-constant-binary-expression": ["error"],
"no-constructor-return": ["error"],
"no-duplicate-imports": ["error"],
"no-extra-semi": ["error"],
"no-floating-decimal": ["error"],
"no-lonely-if": ["error"],
"object-shorthand": ["error", "always"],
"one-var": ["error", "never"],
"prefer-template": ["error"],
"sort-imports-es6-autofix/sort-imports-es6": [
"error",
{
"ignoreCase": false,
"ignoreMemberSort": false,
"memberSyntaxSortOrder": [
"all",
"single",
"multiple",
"none"
]
"memberSyntaxSortOrder": ["all", "single", "multiple", "none"]
}
],
"unicorn/no-unsafe-regex": [
"warn"
],
"unicorn/prefer-at": [
"error"
],
"unicorn/relative-url-style": [
"error",
"always"
],
"unicorn/no-unsafe-regex": ["warn"],
"unicorn/prefer-at": ["error"],
"unicorn/relative-url-style": ["error", "always"],
"unicorn/import-style": [
"error",
{
Expand All @@ -168,72 +121,28 @@
}
}
],
"unicorn/prefer-string-replace-all": [
"off"
],
"unicorn/filename-case": [
"off"
],
"unicorn/no-static-only-class": [
"off"
],
"unicorn/no-process-exit": [
"off"
],
"unicorn/no-object-as-default": [
"off"
],
"unicorn/no-null": [
"off"
],
"unicorn/no-array-reduce": [
"off"
],
"unicorn/prevent-abbreviations": [
"off"
],
"unicorn/no-array-callback-reference": [
"off"
],
"unicorn/explicit-length-check": [
"off"
],
"unicorn/escape-case": [
"off"
],
"unicorn/no-useless-undefined": [
"off"
],
"unicorn/catch-error-name": [
"off"
],
"unicorn/no-nested-ternary": [
"off"
],
"unicorn/no-array-for-each": [
"off"
],
"unicorn/no-await-expression-member": [
"off"
],
"unicorn/no-array-push-push": [
"off"
],
"unicorn/number-literal-case": [
"off"
],
"unicorn/consistent-destructuring": [
"off"
],
"unicorn/no-useless-switch-case": [
"off"
],
"unicorn/better-regex": [
"off"
],
"unicorn/prefer-module": [
"off"
],
"unicorn/prefer-string-replace-all": ["off"],
"unicorn/filename-case": ["off"],
"unicorn/no-static-only-class": ["off"],
"unicorn/no-process-exit": ["off"],
"unicorn/no-object-as-default": ["off"],
"unicorn/no-null": ["off"],
"unicorn/no-array-reduce": ["off"],
"unicorn/prevent-abbreviations": ["off"],
"unicorn/no-array-callback-reference": ["off"],
"unicorn/explicit-length-check": ["off"],
"unicorn/escape-case": ["off"],
"unicorn/no-useless-undefined": ["off"],
"unicorn/catch-error-name": ["off"],
"unicorn/no-nested-ternary": ["off"],
"unicorn/no-array-for-each": ["off"],
"unicorn/no-await-expression-member": ["off"],
"unicorn/no-array-push-push": ["off"],
"unicorn/number-literal-case": ["off"],
"unicorn/consistent-destructuring": ["off"],
"unicorn/no-useless-switch-case": ["off"],
"unicorn/better-regex": ["off"],
"unicorn/prefer-module": ["off"],
"unicorn/numeric-separators-style": [
"error",
{
Expand All @@ -245,12 +154,7 @@
}
}
],
"unicorn/prefer-top-level-await": [
"off"
],
"unicorn/switch-case-braces": [
"error",
"avoid"
]
"unicorn/prefer-top-level-await": ["off"],
"unicorn/switch-case-braces": ["error", "avoid"]
}
}
}
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
## Guidelines

### General Concepts
* Code should follow our ESLint rules as closely as possible (`pnpm lint`)
* Code should follow our ESLint rules as closely as possible (`yarn lint`)
* Code should attempt to be TypeScript type safe
* Code should attempt to be consistent, fast, scalable, and efficient

Expand All @@ -19,7 +19,7 @@
### Apps
* Apps should be runnable
* Apps should be in the apps folder and should simply be called by the app name
* Apps should have a pnpm workspace script in the root `package.json`
* Apps should have a yarn workspace script in the root `package.json`
* Apps can use import paths to simplify imports in the project

## Running
Expand Down
Loading

0 comments on commit 2ccbe07

Please sign in to comment.