Skip to content

Commit 37dd32f

Browse files
authored
feat: add alwatr package (#1666)
2 parents 43e5aa6 + e5dfff8 commit 37dd32f

File tree

2,372 files changed

+9050
-65203
lines changed

Some content is hidden

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

2,372 files changed

+9050
-65203
lines changed

.editorconfig

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ end_of_line = lf
99
charset = utf-8
1010
trim_trailing_whitespace = true
1111
insert_final_newline = true
12-
max_line_length = 120
12+
max_line_length = 140
1313

1414
[*.{js,ts}]
1515
block_comment_start = /**

.eslintignore

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
*.js
22
*.d.ts
3-
/demo/es-bench/
4-
/uniquely/flight-finder-pwa
53
node_modules
64
_data

.eslintrc.json

+1-66
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,4 @@
11
{
22
"root": true,
3-
"extends": [
4-
"eslint:recommended",
5-
"google",
6-
"plugin:@typescript-eslint/strict",
7-
"plugin:@typescript-eslint/stylistic",
8-
// "plugin:@typescript-eslint/strict-type-checked",
9-
// "plugin:@typescript-eslint/stylistic-type-checked",
10-
"plugin:import/recommended",
11-
"plugin:import/typescript",
12-
"plugin:wc/best-practice",
13-
"plugin:lit/recommended"
14-
],
15-
"env": {
16-
"shared-node-browser": true,
17-
"es2022": true
18-
},
19-
"parser": "@typescript-eslint/parser",
20-
"parserOptions": {
21-
"project": true,
22-
"ecmaVersion": 2021,
23-
"sourceType": "module"
24-
},
25-
"plugins": ["@typescript-eslint", "import", "wc"],
26-
"settings": {
27-
"import/resolver": {
28-
"typescript": {
29-
"alwaysTryTypes": true,
30-
"project": ["**/tsconfig.json"],
31-
"projectFolderIgnoreList": ["**/node_modules/**"]
32-
},
33-
"node": true
34-
},
35-
"wc": {
36-
"elementBaseClasses": ["LitElement"]
37-
}
38-
},
39-
"rules": {
40-
"max-len": ["error", {"code": 300}],
41-
"no-eval": ["error", {"allowIndirect": true}],
42-
"no-floating-decimal": "error",
43-
"space-infix-ops": "error",
44-
"new-cap": ["error", {"capIsNewExceptionPattern": "Mixin$"}],
45-
"brace-style": ["error", "stroustrup", {"allowSingleLine": true}],
46-
"operator-linebreak": ["error", "after", {"overrides": {"?": "before", ":": "before"}}],
47-
"import/order": [
48-
"error",
49-
{
50-
"groups": ["builtin", "external", "internal", ["parent", "sibling", "index"], "object", "unknown", "type"],
51-
"newlines-between": "always",
52-
"warnOnUnassignedImports": true,
53-
"alphabetize": {
54-
"order": "asc",
55-
"caseInsensitive": true
56-
}
57-
}
58-
],
59-
"@typescript-eslint/prefer-string-starts-ends-with": "off",
60-
"lit/attribute-value-entities": "off",
61-
"@typescript-eslint/no-dynamic-delete": "off",
62-
"import/no-unresolved": "off",
63-
"wc/guard-super-call": "off",
64-
"@typescript-eslint/no-non-null-assertion": "off",
65-
"no-throw-literal": "off",
66-
"require-jsdoc": "off",
67-
"valid-jsdoc": "off"
68-
}
3+
"extends": "@alwatr/eslint-config"
694
}

.gitattributes

-5
This file was deleted.

.gitconfig

-101
This file was deleted.

.github/copilot-instruction.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Instruction
2+
3+
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.
4+
5+
## General Rules
6+
7+
- Follow JAMstack architecture principles.
8+
- Write minimal and clear descriptions and if possible don't write anything and just send code.
9+
- Fully optimize JavaScript code for best performance.
10+
- Ensure clear separation of concerns.
11+
- Do not use extra packages unless explicitly required; prefer vanilla JavaScript.
12+
- Use modern TypeScript; avoid outdated versions and polyfills. Add TODO comments if polyfills are needed.
13+
14+
## Technologies
15+
16+
- Use Lit for web components with light DOM.
17+
- Use Tailwind CSS for styling; avoid additional CSS.
18+
- Use the latest TypeScript features for type safety and improved code quality.
19+
- Use Nunjucks templating engine in the 11ty static site generator.
20+
- Utilize in-ecosystem packages developed by our team.
21+
- Use the NoSQL database developed by our team.
22+
- Alpine Store for state management.
23+
- Use FSM for state machines by our team for many part of client-side logics.
24+
- Use logger for logging by our team for each function.
25+
26+
## Commenting
27+
28+
1. Comments should not duplicate the code, if duplicate, don't write it.
29+
2. Rewrite unclear code instead of adding comments to explain it.
30+
3. If a comment is unclear, there may be an issue with the code itself.
31+
4. Comments should clarify, not confuse. Remove comments that cause confusion.
32+
5. Explain non-standard code with comments.
33+
6. Provide links to the original source of copied code.
34+
7. Include links to external references where helpful.
35+
8. Add comments when fixing bugs.
36+
9. Use comments to mark incomplete implementations.
37+
10. minimize usage of jsdoc comments.
38+
39+
## Other
40+
41+
1. call me `bro`.
42+
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.
43+
3. Do not speak too formally and sloppily, Feel like you're talking to your friend.
44+
4. Explain with simple english.

.github/dependabot.yml

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2+
3+
version: 2
4+
updates:
5+
- package-ecosystem: github-actions
6+
directory: /
7+
open-pull-requests-limit: 20
8+
commit-message:
9+
prefix: deps
10+
include: scope
11+
reviewers:
12+
- AliMD
13+
schedule:
14+
interval: weekly
15+
time: '10:30'
16+
day: thursday
17+
labels:
18+
- ci
19+
- priority-low
20+
- maintenance
21+
groups:
22+
github-actions:
23+
patterns:
24+
- '*'
25+
26+
- package-ecosystem: npm
27+
directory: /
28+
versioning-strategy: increase
29+
open-pull-requests-limit: 20
30+
commit-message:
31+
prefix: deps
32+
include: scope
33+
reviewers:
34+
- AliMD
35+
schedule:
36+
interval: weekly
37+
time: '10:30'
38+
day: thursday
39+
labels:
40+
- dependencies
41+
- ci
42+
- priority-low
43+
- maintenance
44+
groups:
45+
production-dependencies:
46+
dependency-type: 'production'
47+
exclude-patterns:
48+
- '@alwatr/*'
49+
- 'fract'
50+
development-dependencies:
51+
dependency-type: 'development'
52+
exclude-patterns:
53+
- '@alwatr/*'
54+
- 'fract'
55+
alwatr-dependencies:
56+
patterns:
57+
- '@alwatr/*'
58+
- 'fract'
59+
60+
- package-ecosystem: docker
61+
directory: /packages/alwatr
62+
reviewers:
63+
- AliMD
64+
schedule:
65+
interval: weekly
66+
time: '10:30'
67+
day: thursday
68+
labels:
69+
- ci
70+
- priority-low
71+
- maintenance

.github/dependabot.yml.disabled

-54
This file was deleted.

.github/labels.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
description: 'Enhancement of the code, not introducing new features.'
2020
- name: 'refactor'
2121
color: 1d76db
22-
description: 'Updating the code with simpler, easier to understand or more efficient syntax or methods, but not introducing new features.'
22+
description: 'Updating the code with simpler, easier to understand or more efficient syntax or methods.'
2323
- name: 'performance'
2424
color: 1d76db
2525
description: 'Improving performance of the project, not introducing new features.'

0 commit comments

Comments
 (0)