Skip to content

Commit 8a8fd6c

Browse files
committed
add: "husky": "4.3.8",
1 parent a563fd4 commit 8a8fd6c

File tree

5 files changed

+1214
-20
lines changed

5 files changed

+1214
-20
lines changed

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Editor configuration, see http://editorconfig.org
2+
3+
# 表示是最顶层的 EditorConfig 配置文件
4+
root = true
5+
6+
[*]     # 表示所有文件适用
7+
charset = utf-8     # 设置文件字符集为 utf-8
8+
indent_style = space   # 缩进风格(tab | space)
9+
indent_size = 4   # 缩进大小
10+
end_of_line = lf   # 控制换行类型(lf | cr | crlf)(lf是\n, cr是\r, crlf是\r\n)
11+
trim_trailing_whitespace = true     # 去除行首的任意空白字符
12+
insert_final_newline = true     # 始终在文件末尾插入一个新行
13+
14+
[*.md] # 表示仅 md 文件适用以下规则
15+
max_line_length = off
16+
trim_trailing_whitespace = false
17+

.eslintrc.js

Whitespace-only changes.

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,19 @@ yarn add eslint @typescript-eslint/parser @typescript/eslint-plugin eslint-plugi
7474

7575
TypeScirpt 官方决定全面采用 ESLint 作为代码检查的工具,并创建了一个新项目 typescript-eslint,提供了 TypeScript 文件的解析器 @typescript-eslint/parser 和相关的配置选项 @typescript-eslint/eslint-plugin
7676

77+
## 使用 scss 来增强 css 的语法能力
7778

79+
```js
80+
yarn add sass
81+
yarn add stylelint
82+
yarn add stylelint-scss
83+
```
7884

85+
## git hooks
7986

80-
81-
82-
87+
```js
88+
npm install --save-dev husky@4.3.8 lint-staged
89+
```
8390

8491

8592

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
"@typescript-eslint/parser": "^5.12.1",
1313
"eslint": "^8.10.0",
1414
"eslint-plugin-vue": "^8.5.0",
15+
"husky": "4.3.8",
16+
"lint-staged": "^12.3.4",
17+
"sass": "^1.49.9",
18+
"stylelint": "^14.5.3",
19+
"stylelint-scss": "^4.1.0",
1520
"vue": "^3.2.25"
1621
},
1722
"devDependencies": {

0 commit comments

Comments
 (0)