Skip to content

Commit dbe2c2f

Browse files
committed
window格式下的vscode兼容
1 parent dbad1d2 commit dbe2c2f

File tree

34 files changed

+1271
-1160
lines changed

34 files changed

+1271
-1160
lines changed

.editorconfig

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
#缩进风格
6+
indent_style = tab
7+
#缩进大小2
8+
indent_size = 2
9+
#换行符lf
10+
end_of_line = lf
11+
#字符集utf-8
12+
charset = utf-8
13+
#是否删除行尾的空格
14+
trim_trailing_whitespace = true
15+
#是否在文件的最后插入一个空行
16+
insert_final_newline = true
17+
18+
[*.md]
19+
trim_trailing_whitespace = false
20+
21+
[Makefile]
22+
indent_style = tab
23+
tab_width = 2

.eslintrc.js

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,32 @@
11
module.exports = {
2-
extends: ["airbnb", "plugin:prettier/recommended"],
3-
rules: {
4-
"react/jsx-filename-extension": "off",
5-
"react/forbid-prop-types": "off",
6-
"jsx-a11y/anchor-is-valid": "off",
7-
"jsx-a11y/click-events-have-key-events": "off",
8-
"jsx-a11y/no-static-element-interactions": "off",
9-
"jsx-a11y/interactive-supports-focus": "off",
10-
"jsx-a11y/anchor-is-valid": "off",
11-
"react/no-array-index-key": "off",
12-
"no-console": "off",
13-
"prettier/prettier": "error",
14-
"react/jsx-one-expression-per-line": "off",
15-
"no-unused-vars": "off"
16-
},
17-
env: {
18-
browser: true
19-
}
2+
extends: ["airbnb", "plugin:prettier/recommended"],
3+
rules: {
4+
"react/jsx-filename-extension": "off",
5+
"react/forbid-prop-types": "off",
6+
"jsx-a11y/anchor-is-valid": "off",
7+
"jsx-a11y/click-events-have-key-events": "off",
8+
"jsx-a11y/no-static-element-interactions": "off",
9+
"jsx-a11y/interactive-supports-focus": "off",
10+
"jsx-a11y/anchor-is-valid": "off",
11+
"react/no-array-index-key": "off",
12+
"no-console": "off",
13+
"prettier/prettier": "error",
14+
"react/jsx-one-expression-per-line": "off",
15+
"no-unused-vars": "off",
16+
//window的兼容性问题
17+
"linebreak-style": 0,
18+
"react/jsx-indent": [
19+
// 解决react里面的缩进问题
20+
"error",
21+
"tab",
22+
],
23+
"react/jsx-indent-props": [
24+
// 解决react里面的缩进问题
25+
"error",
26+
"tab",
27+
],
28+
},
29+
env: {
30+
browser: true,
31+
},
2032
};

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ node_modules
1212

1313
npm-debug.log*
1414
yarn-debug.log*
15-
yarn-error.log*
15+
yarn-error.log*

.prettierrc.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
printWidth: 120, //一行的字符数,如果超过会进行换行,默认为80
3-
tabWidth: 2, //一个tab代表几个空格数,默认为2
4-
trailingComma: "es5", // 对象属性最后有 ","
2+
printWidth: 120, //一行的字符数,如果超过会进行换行,默认为80
3+
tabWidth: 2, //一个tab代表几个空格数,默认为2
4+
trailingComma: "es5", // 对象属性最后有 ","
55
};

0 commit comments

Comments
 (0)