Skip to content

Commit 1283e13

Browse files
committed
chore: init project
0 parents  commit 1283e13

33 files changed

+7202
-0
lines changed

.eslintignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
snapshot*
2+
dist
3+
lib
4+
es
5+
esm
6+
node_modules
7+
src/_common
8+
static
9+
cypress
10+
script/test/cypress
11+
_site
12+
temp*
13+
static/

.eslintrc

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"extends": [
3+
"plugin:@typescript-eslint/recommended",
4+
"eslint-config-airbnb-base",
5+
"plugin:vue/vue3-recommended",
6+
"plugin:prettier/recommended"
7+
],
8+
"env": {
9+
"browser": true,
10+
"node": true,
11+
"jest": true,
12+
"es6": true
13+
},
14+
"globals": {
15+
"defineProps": "readonly",
16+
"defineEmits": "readonly"
17+
},
18+
"plugins": [
19+
"vue",
20+
"@typescript-eslint"
21+
],
22+
"parserOptions": {
23+
"parser": "@typescript-eslint/parser",
24+
"sourceType": "module",
25+
"allowImportExportEverywhere": true,
26+
"ecmaFeatures": {
27+
"jsx": true
28+
}
29+
},
30+
"settings": {
31+
"import/extensions": [
32+
".js",
33+
".jsx",
34+
".ts",
35+
".tsx"
36+
]
37+
},
38+
"rules": {
39+
"radix": "off",
40+
"no-console": "off",
41+
"no-continue": "off",
42+
"no-restricted-syntax": "off",
43+
"no-plusplus": "off",
44+
"no-param-reassign": "off",
45+
"no-shadow": "off",
46+
"guard-for-in": "off",
47+
48+
"import/extensions": "off",
49+
"import/no-unresolved": "off",
50+
"import/no-extraneous-dependencies": "off",
51+
"import/prefer-default-export": "off",
52+
53+
"@typescript-eslint/no-explicit-any": "off",
54+
"@typescript-eslint/explicit-module-boundary-types": "off",
55+
"vue/first-attribute-linebreak": 0,
56+
"no-return-assign": 0,
57+
},
58+
"overrides": [
59+
{
60+
"files": ["*.vue"],
61+
"rules": {
62+
"vue/component-name-in-template-casing": [2, "kebab-case"],
63+
"vue/require-default-prop": 0,
64+
"vue/multi-word-component-names": 0,
65+
"vue/no-reserved-props": 0,
66+
"vue/no-v-html": 0,
67+
68+
}
69+
}
70+
]
71+
}

.github/workflows/action.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: deploy to gh-pages
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
build-and-deploy:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout 🛎️
11+
uses: actions/[email protected]
12+
13+
- name: Install and Build 🔧
14+
run: |
15+
npx pnpm install
16+
npm run build
17+
- name: Deploy 🚀
18+
uses: JamesIves/[email protected]
19+
with:
20+
branch: gh-pages
21+
folder: ./dist

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
node_modules
2+
.DS_Store
3+
dist
4+
dist-ssr
5+
*.local
6+
coverage
7+
yarn.lock
8+
package.lock
9+
.vercel

.husky/commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint -e $GIT_PARAMS

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx lint-staged

.husky/prepare-commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
exec < /dev/tty && npx git-cz --hook || true

.prettierrc.js

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
module.exports = {
2+
// 一行最多 120 字符
3+
printWidth: 120,
4+
// 使用 2 个空格缩进
5+
tabWidth: 2,
6+
// 不使用缩进符,而使用空格
7+
useTabs: false,
8+
// 行尾需要有分号
9+
semi: true,
10+
// 使用单引号
11+
singleQuote: true,
12+
// 对象的 key 仅在必要时用引号
13+
quoteProps: 'as-needed',
14+
// jsx 不使用单引号,而使用双引号
15+
jsxSingleQuote: false,
16+
// 末尾需要有逗号
17+
trailingComma: 'all',
18+
// 大括号内的首尾需要空格
19+
bracketSpacing: true,
20+
// 箭头函数,只有一个参数的时候,也需要括号
21+
arrowParens: 'always',
22+
// 每个文件格式化的范围是文件的全部内容
23+
rangeStart: 0,
24+
rangeEnd: Infinity,
25+
// 不需要写文件开头的 @prettier
26+
requirePragma: false,
27+
// 不需要自动在文件开头插入 @prettier
28+
insertPragma: false,
29+
// 使用默认的折行标准
30+
proseWrap: 'preserve',
31+
// 根据显示样式决定 html 要不要折行
32+
htmlWhitespaceSensitivity: 'css',
33+
// vue 文件中的 script 和 style 内不用缩进
34+
vueIndentScriptAndStyle: false,
35+
// 换行符使用 lf
36+
endOfLine: 'lf',
37+
};

.stylelintignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# .stylelintignore
2+
# 旧的不需打包的样式库
3+
*.min.css
4+
5+
# 其他类型文件
6+
*.js
7+
*.jpg
8+
*.woff

.vscode/extensions.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["dbaeumer.vscode-eslint"]
3+
}

.vscode/settings.json

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"eslint.format.enable": true,
3+
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact", "vue"],
4+
"[vue]": {
5+
"editor.formatOnSave": true,
6+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
7+
},
8+
"[typescriptreact]": {
9+
"editor.formatOnSave": true,
10+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
11+
},
12+
"[javascriptreact]": {
13+
"editor.formatOnSave": true,
14+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
15+
},
16+
"[typescript]": {
17+
"editor.formatOnSave": true,
18+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
19+
},
20+
"[javascript]": {
21+
"editor.formatOnSave": true,
22+
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
23+
}
24+
}

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Figma API Live
2+
3+
🚀 A Figma API data structure live preview.
4+
5+
- OAuth token process
6+
- Personal access token
7+
- and more ... 👩‍🚀
8+
9+
## Link
10+
11+
[Figma API Docs](https://www.figma.com/developers/api#access-tokens)
12+

commitlint.config.js

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// commit-lint config
2+
module.exports = { extends: ['@commitlint/config-conventional'] };

globals.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// 通用声明
2+
declare type ClassName = { [className: string]: any } | ClassName[] | string;
3+
4+
declare module '*.svg' {}

index.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" href="./favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Figma Api Live</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/main.ts"></script>
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)