-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,218 changed files
with
20,455 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dist | ||
site/public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
"use strict"; | ||
// "use strict"; | ||
|
||
// module.exports = { | ||
// root: true, | ||
// extends: [ | ||
// "eslint:recommended", | ||
// ], | ||
// env: { | ||
// node: true, | ||
// }, | ||
// }; | ||
|
||
module.exports = { | ||
root: true, | ||
extends: [ | ||
"eslint:recommended", | ||
], | ||
env: { | ||
node: true, | ||
extends: ['./index.js', './react.js', './typescript.js'], | ||
globals: { | ||
Prism: false, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: ci | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
|
||
- name: Use Node.js 16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Run tests | ||
run: pnpm test | ||
|
||
- name: Build gh-pages | ||
run: pnpm build | ||
|
||
- name: Deploy gh-pages | ||
if: | | ||
github.event_name == 'push' && | ||
github.ref == 'refs/heads/master' | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: rulesCoverage | ||
|
||
on: | ||
schedule: | ||
# Runs on every Monday 18:00 | ||
- cron: '0 18 * * 1' | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
|
||
- name: Use Node.js 16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Run tests | ||
run: | | ||
pnpm test && | ||
pnpm rulesCoverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
## OS | ||
.DS_Store | ||
.idea | ||
.editorconfig | ||
pnpm-lock.yaml | ||
.npmrc | ||
|
||
# Ignored suffix | ||
*.log | ||
*.md | ||
*.svg | ||
*.png | ||
*.ico | ||
*ignore | ||
|
||
## Local | ||
site/public | ||
test/base/no-cond-assign/bad.js | ||
test/base/no-irregular-whitespace/bad.js | ||
test/base/no-labels/bad.js | ||
test/base/no-sequences/bad.js | ||
test/base/no-useless-rename/bad.js | ||
test/react/jsx-fragments/bad.js | ||
test/react/self-closing-comp/bad.js | ||
test/vue/no-irregular-whitespace/bad.vue | ||
test/vue/no-irregular-whitespace/good.vue | ||
.husky | ||
|
||
## Built-files | ||
.cache | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// .prettierrc.js | ||
module.exports = { | ||
// 一行最多 120 字符 | ||
printWidth: 120, | ||
// 使用 2 个空格缩进 | ||
tabWidth: 2, | ||
// 不使用缩进符,而使用空格 | ||
useTabs: false, | ||
// 行尾需要有分号 | ||
semi: true, | ||
// 使用单引号 | ||
singleQuote: true, | ||
// 对象的 key 仅在必要时用引号 | ||
quoteProps: 'as-needed', | ||
// jsx 不使用单引号,而使用双引号 | ||
jsxSingleQuote: false, | ||
// 末尾需要有逗号 | ||
trailingComma: 'all', | ||
// 大括号内的首尾需要空格 | ||
bracketSpacing: true, | ||
// jsx 标签的反尖括号需要换行 | ||
bracketSameLine: false, | ||
// 箭头函数,只有一个参数的时候,也需要括号 | ||
arrowParens: 'always', | ||
// 每个文件格式化的范围是文件的全部内容 | ||
rangeStart: 0, | ||
rangeEnd: Infinity, | ||
// 不需要写文件开头的 @prettier | ||
requirePragma: false, | ||
// 不需要自动在文件开头插入 @prettier | ||
insertPragma: false, | ||
// 使用默认的折行标准 | ||
proseWrap: 'preserve', | ||
// 根据显示样式决定 html 要不要折行 | ||
htmlWhitespaceSensitivity: 'css', | ||
// vue 文件中的 script 和 style 内不用缩进 | ||
vueIndentScriptAndStyle: false, | ||
// 换行符使用 lf | ||
endOfLine: 'lf', | ||
// 格式化嵌入的内容 | ||
embeddedLanguageFormatting: 'auto', | ||
// html, vue, jsx 中每个属性占一行 | ||
singleAttributePerLine: false, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.