Skip to content

Commit

Permalink
chore: customize based nexim
Browse files Browse the repository at this point in the history
  • Loading branch information
njfamirm committed Dec 4, 2024
1 parent ace873a commit c389d8c
Show file tree
Hide file tree
Showing 17 changed files with 388 additions and 66 deletions.
20 changes: 19 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
{
"root": true,
"extends": "@alwatr/eslint-config"
"extends": "@alwatr/eslint-config",
"rules": {
"require-await": "error"
},
"overrides": [
{
"files": ["*.js", "*.mjs", "*.cjs"],
"parserOptions": {
"project": null
},
"rules": {
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/explicit-module-boundary-types": "off"
},
"env": {
"node": true
}
}
]
}
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @AliMD
* @njfamirm
44 changes: 44 additions & 0 deletions .github/copilot-instruction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Instruction

As an advanced web developer, prioritize code maintainability, readability, and performance. Write clean, efficient, and well-documented code. Adhere to instructions without adding extra code or features. Identify and report bugs and mistakes for correction. Carefully review prompts and provide detailed feedback if something is incorrect.

## General Rules

- Follow JAMstack architecture principles.
- Write minimal and clear descriptions and if possible don't write anything and just send code.
- Fully optimize JavaScript code for best performance.
- Ensure clear separation of concerns.
- Do not use extra packages unless explicitly required; prefer vanilla JavaScript.
- Use modern TypeScript; avoid outdated versions and polyfills. Add TODO comments if polyfills are needed.

## Technologies

- Use Lit for web components with light DOM.
- Use Tailwind CSS for styling; avoid additional CSS.
- Use the latest TypeScript features for type safety and improved code quality.
- Use Nunjucks templating engine in the 11ty static site generator.
- Utilize in-ecosystem packages developed by our team.
- Use the NoSQL database developed by our team.
- Alpine Store for state management.
- Use FSM for state machines by our team for many part of client-side logics.
- Use logger for logging by our team for each function.

## Commenting

1. Comments should not duplicate the code, if duplicate, don't write it.
2. Rewrite unclear code instead of adding comments to explain it.
3. If a comment is unclear, there may be an issue with the code itself.
4. Comments should clarify, not confuse. Remove comments that cause confusion.
5. Explain non-standard code with comments.
6. Provide links to the original source of copied code.
7. Include links to external references where helpful.
8. Add comments when fixing bugs.
9. Use comments to mark incomplete implementations.
10. minimize usage of jsdoc comments.

## Other

1. call me `bro`.
2. Please consider the logic and if my opinion is against your opinion, please don't accept it immediately and just check it again and give reasons.
3. Do not speak too formally and sloppily, Feel like you're talking to your friend.
4. Explain with simple english.
96 changes: 83 additions & 13 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ updates:
directory: /
open-pull-requests-limit: 20
commit-message:
prefix: 'deps'
prefix: deps
include: scope
reviewers:
- AliMD
- njfamirm
schedule:
interval: weekly
time: '00:30'
day: 'thursday'
time: '10:30'
day: thursday
labels:
- ci
- priority-low
Expand All @@ -27,13 +28,14 @@ updates:
versioning-strategy: increase
open-pull-requests-limit: 20
commit-message:
prefix: 'deps'
prefix: deps
include: scope
reviewers:
- AliMD
- njfamirm
schedule:
interval: weekly
time: '00:30'
day: 'thursday'
time: '10:30'
day: thursday
labels:
- dependencies
- ci
Expand All @@ -44,13 +46,81 @@ updates:
dependency-type: 'production'
exclude-patterns:
- '@alwatr/*'
- 'fract'
- '@nexim/*'
- 'alwatr'
development-dependencies:
dependency-type: 'development'
exclude-patterns:
- '@alwatr/*'
- 'fract'
alwatr-dependencies:
- '@nexim/*'
- 'alwatr'
alwatr:
patterns:
- '@alwatr/*'
- 'fract'
- 'alwatr'
nexim:
patterns:
- '@nexim/*'
ignore:
- dependency-name: 'eslint'
update-types:
- version-update:semver-major
- dependency-name: '@typescript-eslint/eslint-plugin'
update-types:
- version-update:semver-major
- dependency-name: '@typescript-eslint/parser'
update-types:
- version-update:semver-major
- dependency-name: 'conventional-changelog-conventionalcommits'
update-types:
- version-update:semver-major

- package-ecosystem: docker
directory: /packages/app
reviewers:
- njfamirm
schedule:
interval: weekly
time: '10:30'
day: thursday
labels:
- ci
- priority-low
- maintenance
ignore:
- dependency-name: 'alwatr/node'
update-types:
- version-update:semver-major

- package-ecosystem: docker
directory: /packages/admin
reviewers:
- njfamirm
schedule:
interval: weekly
time: '10:30'
day: thursday
labels:
- ci
- priority-low
- maintenance
ignore:
- dependency-name: 'alwatr/node'
update-types:
- version-update:semver-major

- package-ecosystem: docker
directory: /packages/api
reviewers:
- njfamirm
schedule:
interval: weekly
time: '10:30'
day: thursday
labels:
- ci
- priority-low
- maintenance
ignore:
- dependency-name: 'alwatr/node'
update-types:
- version-update:semver-major
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json

name: Build & Lint
name: Build & Lint & Test

on:
workflow_dispatch:
Expand Down Expand Up @@ -57,5 +57,5 @@ jobs:
- name: 🚀 Run ESLint
run: yarn lint

- name: 🚀 Run Jest
- name: 🚀 Run Test
run: yarn test
18 changes: 9 additions & 9 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ on:

schedule:
- cron: '0 7 * */2 *'
# │ │ │ │ │
# │ │ │ │ └─── day of the week (0 - 6 or SUN-SAT)
# │ │ │ └────── month (1 - 12 or JAN-DEC)
# │ │ └───────── day of the month (1 - 31)
# │ └─────────── hour (0 - 23)
# └───────────── minute (0 - 59)
# │ │ │ │ │
# │ │ │ │ └─── day of the week (0 - 6 or SUN-SAT)
# │ │ │ └────── month (1 - 12 or JAN-DEC)
# │ │ └───────── day of the month (1 - 31)
# │ └─────────── hour (0 - 23)
# └───────────── minute (0 - 59)

jobs:
analyze-code-ql:
Expand All @@ -35,14 +35,14 @@ jobs:
uses: actions/checkout@v4.2.2

- name: 🏗 Initialize CodeQL
uses: github/codeql-action/init@v3.27.0
uses: github/codeql-action/init@v3.27.5
with:
languages: ${{ matrix.language }}
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

- name: 🏗 Auto build
uses: github/codeql-action/autobuild@v3.27.0
uses: github/codeql-action/autobuild@v3.27.5

- name: 🚀 Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3.27.0
uses: github/codeql-action/analyze@v3.27.5
3 changes: 2 additions & 1 deletion .github/workflows/dependency-review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ name: Dependency Review
on:
workflow_dispatch:

# disable on private repository
pull_request:

jobs:
Expand All @@ -20,4 +21,4 @@ jobs:
uses: actions/checkout@v4.2.2

- name: 🚀 Dependency Review
uses: actions/dependency-review-action@v4.4.0
uses: actions/dependency-review-action@v4.5.0
2 changes: 1 addition & 1 deletion .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:

jobs:
publish-npm:
if: github.repository_owner == 'Alwatr'
if: github.repository_owner == 'the-nexim'

name: Publish NPM
runs-on: ubuntu-latest
Expand Down
23 changes: 21 additions & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
{
"recommendations": [
"ahmadalli.vscode-nginx-conf",
"arcanis.vscode-zipfs",
"bbugh.change-color-format",
"bradlc.vscode-tailwindcss",
"cardinal90.multi-cursor-case-preserve",
"christian-kohler.path-intellisense",
"csstools.postcss",
"davidanson.vscode-markdownlint",
"dbaeumer.vscode-eslint",
"dotjoshjohnson.xml",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"jgclark.vscode-todo-highlight",
"fabiospampinato.vscode-monokai-night",
"foxundermoon.shell-format",
"ginfuru.better-nunjucks",
"github.copilot-chat",
"github.vscode-github-actions",
"github.vscode-pull-request-github",
"guapibai.nunjucks-prettier",
"henoc.svgeditor",
"humao.rest-client",
"irongeek.vscode-env",
"streetsidesoftware.code-spell-checker-persian",
"streetsidesoftware.code-spell-checker",
"arcanis.vscode-zipfs"
"stylelint.vscode-stylelint",
"yzhang.markdown-all-in-one",
"runem.lit-plugin",
"gruntfuggly.todo-tree"
]
}
Loading

0 comments on commit c389d8c

Please sign in to comment.