Skip to content

Commit a7ffa35

Browse files
committed
feat: 1.0.0
1 parent d79ebf5 commit a7ffa35

File tree

161 files changed

+8095
-167
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+8095
-167
lines changed

.babelrc

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"presets": ["@babel/preset-env", "@babel/preset-typescript", "@babel/preset-react"],
3+
"plugins": [
4+
"@babel/plugin-transform-runtime",
5+
"@babel/plugin-proposal-object-rest-spread",
6+
"@babel/plugin-syntax-dynamic-import",
7+
[
8+
"@babel/plugin-proposal-decorators",
9+
{
10+
"legacy": true
11+
}
12+
],
13+
"@babel/plugin-proposal-class-properties",
14+
"@babel/plugin-proposal-optional-chaining",
15+
"@babel/plugin-proposal-nullish-coalescing-operator",
16+
[
17+
"import",
18+
{
19+
"libraryName": "antd",
20+
"libraryDirectory": "es",
21+
"style": "css"
22+
}
23+
]
24+
]
25+
}
26+

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ end_of_line = lf
88
indent_style = space
99
indent_size = 2
1010
trim_trailing_whitespace = true
11-
insert_final_newline = true
11+
insert_final_newline = true

.env

Lines changed: 0 additions & 7 deletions
This file was deleted.

.env.development

Lines changed: 0 additions & 3 deletions
This file was deleted.

.eslintignore

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
!**/.eslintrc*
1+
.eslintrc
22
node_modules*
33
dist
44
*.svg
@@ -7,4 +7,17 @@ dist
77
.gitignore
88
*.md
99
*.log
10-
*.lock
10+
*.lock
11+
!.eslintrc*
12+
!.package*
13+
/logs
14+
/server/mockData
15+
/node_modules
16+
/dist
17+
/onlinedist
18+
/src/assets/js
19+
/src/lib/achieve/KSWebBridge.js
20+
/package-lock.json
21+
.DS_Store
22+
fis-conf.js
23+
/.eslintrc

.eslintrc

Lines changed: 59 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,62 @@
11
{
2-
"extends": [
3-
"react-app",
4-
"react-app/jest",
5-
"plugin:prettier/recommended",
6-
"prettier/@typescript-eslint"
7-
],
2+
"extends": ["plugin:prettier/recommended"],
3+
"plugins": ["eslint-plugin-simple-import-sort"],
84
"rules": {
9-
"prettier/prettier": "warn",
10-
"react-hooks/rules-of-hooks": "error",
11-
"react-hooks/exhaustive-deps": "warn",
12-
"@typescript-eslint/no-use-before-define": "off",
13-
"@typescript-eslint/explicit-function-return-type": "off",
14-
"@typescript-eslint/camelcase": "off",
15-
"@typescript-eslint/explicit-member-accessibility": "off",
16-
"@typescript-eslint/ban-ts-ignore": "off",
17-
"@typescript-eslint/no-non-null-assertion": "off",
18-
"@typescript-eslint/no-explicit-any": "off",
19-
"@typescript-eslint/no-empty-interface": "off",
20-
"react/prop-types": "off",
21-
"react/display-name": "off"
5+
"no-unused-vars": "warn", //把该条提示信息转换成警告信息
6+
"semi": 2, //在代码尾部添加分号
7+
"semi-spacing": 0, // 强制分号之前和之后使用一致的空格
8+
"trailingComma": 2, //在代码尾部添加逗号
9+
"quotes": [2, "double", "avoid-escape"],
10+
"no-const-assign": 2, // 禁止修改 const 声明的变量
11+
"no-var": 0, // 要求使用 let 或 const 而不是 var
12+
"sort-imports": 1, // 强制模块内的 import 排序
13+
"no-trailing-spaces": 2, // 禁用行尾空格
14+
"no-mixed-spaces-and-tabs": 2, // 不允许空格和 tab 混合缩进
15+
"max-len": "error",
16+
"jsx-quotes": 0, // 强制在 JSX 属性中一致地使用双引号或单引号
17+
"max-nested-callbacks": [1, 5], // 强制回调函数最大嵌套深度 5层
18+
"eol-last": 2, // 文件末尾强制换行
19+
"no-magic-numbers": [
20+
1,
21+
{
22+
"ignore": [0, -1, 1]
23+
}
24+
], // 禁用魔术数字(3.14什么的用常量代替)
25+
"eqeqeq": [2, "allow-null"], // 使用 === 替代 == allow-null允许null和undefined==
26+
"prettier/prettier": [
27+
// eslint校验不成功后,error或2则报错,warn或1则警告,off或0则无提示
28+
"error",
29+
{
30+
// 不要分号
31+
"semi": 2,
32+
// 设置单引号
33+
"singleQuote": 2,
34+
// 设置换行长度
35+
"printWidth": 150
36+
}
37+
],
38+
"simple-import-sort/imports": [
39+
"error",
40+
{
41+
"groups": [
42+
// react放在首行
43+
["^react", "^@?\\w"],
44+
// 内部导入
45+
["^(@|components)(/.*|$)"],
46+
// 父级导入. 把 `..` 放在最后.
47+
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
48+
// 同级导入. 把同一个文件夹.放在最后
49+
["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
50+
// 样式导入.
51+
["^.+\\.?(css)$"],
52+
// 带有副作用导入,比如import 'a.css'这种.
53+
["^\\u0000"]
54+
]
55+
}
56+
],
57+
"simple-import-sort/exports": "error", // 导出
58+
"import/no-duplicates": "error", // 合并同一个导入。ide自动导入,会导致impoprt {a} from 'A'和impoprt {a1} from 'A'导入2次
59+
"import/first": "error", // 确保所有导入位于文件的顶部
60+
"import/newline-after-import": "error" // 确保在导入后有换行符
2261
}
23-
}
62+
}

.gitignore

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,32 @@
11
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2-
3-
# dependencies
4-
/node_modules
5-
/.pnp
6-
.pnp.js
7-
8-
# testing
9-
/coverage
2+
# mac .DS_Store
3+
.DS_Store
104

115
# production
126
/build
13-
14-
# misc
15-
.DS_Store
16-
.env.local
17-
.env.development.local
18-
.env.test.local
19-
.env.production.local
20-
217
npm-debug.log*
228
yarn-debug.log*
239
yarn-error.log*
2410
dist/
11+
dist/*
12+
!dist/.gitkeep
13+
14+
# dependencies
15+
/node_modules
16+
.npm
17+
node_modules
18+
jspm_packages
19+
build
20+
.happypack
21+
yarn.lock
22+
.vscode/*
23+
dll
24+
.idea
25+
26+
# Logs
27+
logs
28+
*.log
29+
npm-debug.log*
30+
31+
# testing
32+
/coverage

.prettierrc

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
{
2-
"printWidth": 120,
2+
"printWidth": 150,
33
"tabWidth": 2,
44
"useTabs": false,
5-
"singleQuote": true,
65
"semi": true,
6+
"singleQuote": false,
7+
"quoteProps": "as-needed",
8+
"jsxSingleQuote": false,
79
"trailingComma": "none",
810
"bracketSpacing": true,
911
"jsxBracketSameLine": false,
1012
"arrowParens": "avoid",
11-
"endOfLine": "auto"
13+
"requirePragma": false,
14+
"insertPragma": false,
15+
"proseWrap": "preserve",
16+
"htmlWhitespaceSensitivity": "ignore",
17+
"endOfLine": "auto",
18+
"singleAttributePerLine": false
1219
}

0 commit comments

Comments
 (0)