Skip to content

Commit 156bc35

Browse files
committed
feat: 🎉 basic functions ready
Signed-off-by: Krysl <krysl@qq.com>
0 parents  commit 156bc35

File tree

11 files changed

+2840
-0
lines changed

11 files changed

+2840
-0
lines changed

.eslintrc.json

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{
2+
"root": true,
3+
"extends": [
4+
"eslint:recommended",
5+
"plugin:@typescript-eslint/recommended",
6+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
7+
"plugin:@typescript-eslint/strict",
8+
"plugin:unicorn/recommended",
9+
"plugin:prettier/recommended",
10+
"prettier"
11+
],
12+
"parser": "@typescript-eslint/parser",
13+
"parserOptions": {
14+
"ecmaVersion": 6,
15+
"project": ["tsconfig.json"],
16+
"tsconfigRootDir": ".",
17+
"sourceType": "module"
18+
},
19+
"plugins": ["@typescript-eslint", "prettier"],
20+
"rules": {
21+
"@typescript-eslint/naming-convention": "warn",
22+
"curly": "warn",
23+
"eqeqeq": "warn",
24+
"no-throw-literal": "warn",
25+
"semi": "off",
26+
"no-unused-vars": "off",
27+
"@typescript-eslint/no-unused-vars": [
28+
"warn",
29+
{
30+
"argsIgnorePattern": "^_",
31+
"varsIgnorePattern": "^_",
32+
"caughtErrorsIgnorePattern": "^_"
33+
}
34+
],
35+
"@typescript-eslint/strict-boolean-expressions": [
36+
"error",
37+
{
38+
"allowNullableString": true,
39+
"allowNullableBoolean": true
40+
}
41+
],
42+
"sort-imports": [
43+
"error",
44+
{
45+
"ignoreCase": false,
46+
"ignoreDeclarationSort": false,
47+
"ignoreMemberSort": false,
48+
"memberSyntaxSortOrder": ["none", "all", "multiple", "single"],
49+
"allowSeparatedGroups": false
50+
}
51+
],
52+
"unicorn/no-negated-condition": "off",
53+
"unicorn/prevent-abbreviations": [
54+
"error",
55+
{
56+
"allowList": {
57+
"thisArgs": true,
58+
"args": true,
59+
"arg": true
60+
}
61+
}
62+
],
63+
"unicorn/no-useless-undefined": [
64+
"error",
65+
{
66+
"checkArguments": false
67+
}
68+
],
69+
"prettier/prettier": "warn"
70+
},
71+
"ignorePatterns": [
72+
"test/**/*.js",
73+
"node_modules",
74+
"out",
75+
"dist"
76+
]
77+
}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
out/
3+
src/custom.css

.prettierrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# yaml-language-server: $schema=http://json.schemastore.org/prettierrc
2+
# https://prettier.io/docs/en/options.html
3+
4+
printWidth: 80
5+
tabWidth: 2
6+
semi: true
7+
singleQuote: true
8+
trailingComma: 'es5'
9+
endOfLine: lf

.vscode/launch.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
// 使用 IntelliSense 了解相关属性。
3+
// 悬停以查看现有属性的描述。
4+
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "debug test",
11+
"skipFiles": ["<node_internals>/**"],
12+
"program": "${workspaceFolder}\\test\\test.js"
13+
},
14+
{
15+
"type": "node",
16+
"request": "launch",
17+
"name": "debug test 2",
18+
"skipFiles": ["<node_internals>/**"],
19+
"program": "${workspaceFolder}\\test\\test.js"
20+
}
21+
]
22+
}

.vscode/tasks.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "npm",
6+
"script": "watch",
7+
"problemMatcher": "$tsc-watch",
8+
"isBackground": true,
9+
"presentation": {
10+
"reveal": "always",
11+
"clear": true
12+
},
13+
"group": {
14+
"kind": "build",
15+
"isDefault": true
16+
}
17+
},
18+
{
19+
"type": "npm",
20+
"label": "lint all",
21+
"script": "lint",
22+
"problemMatcher": ["$eslint-stylish"],
23+
"presentation": {
24+
"echo": true,
25+
"revealProblems": "onProblem",
26+
"focus": false,
27+
"panel": "shared",
28+
"showReuseMessage": true,
29+
"clear": true
30+
}
31+
}
32+
]
33+
}

0 commit comments

Comments
 (0)