Skip to content

Commit

Permalink
Merge pull request #1 from weimobGroup/transfer
Browse files Browse the repository at this point in the history
Transfer
  • Loading branch information
imingyu authored Jul 14, 2021
2 parents 863520d + 6ff895a commit 1bc2455
Show file tree
Hide file tree
Showing 154 changed files with 18,126 additions and 3 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
41 changes: 41 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
module.exports = {
parser: '@typescript-eslint/parser',
extends: ['alloy', 'alloy/typescript', 'standard'],
plugins: ['@typescript-eslint', 'standard'],
globals: {
global: 'readonly',
wx: 'writable',
getApp: 'writable',
getCurrentPages: 'writable',
Page: 'writable',
App: 'writable',
Component: 'writable'
},
rules: {
indent: ['error', 4],
quotes: ['error', 'single'],
semi: 0,
radix: ['error', 'as-needed'],
'func-name-matching': [0, 'always'],
'no-param-reassign': [0],
'max-params': ['error', 6],
'space-before-function-paren': ['warn', 'never'],
'max-nested-callbacks': ['error', 5]
},
overrides: [
{
files: ['**/*.ts'],
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error'],
'@typescript-eslint/explicit-member-accessibility': 'off'
}
},
{
files: ['**/*.js'],
rules: {
'@typescript-eslint/no-require-imports': 'off'
}
}
]
};
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@ dist

# TernJS port file
.tern-port


.DS_Store
15 changes: 15 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
// 一行最多 120 字符
printWidth: 120,
// 使用 4 个空格缩进
tabWidth: 4,
// 不使用缩进符,而使用空格
useTabs: false,
// 行尾需要有分号
semi: true,
// 使用单引号
singleQuote: true,
// 对象的 key 仅在必要时用引号
quoteProps: 'as-needed',
trailingComma: 'none'
};
19 changes: 19 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
extends: ['stylelint-config-standard', 'stylelint-config-recess-order'],
rules: {
'at-rule-no-unknown': [
true,
{
ignoreAtRules: ['mixin', 'extend', 'content', 'include']
}
],
indentation: 4,
'unit-no-unknown': [
true,
{
ignoreUnits: ['rpx']
}
],
'no-descending-specificity': null
}
};
21 changes: 21 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"editor.formatOnSave": true,
"eslint.validate": ["javascript", "typescript"],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.stylelint": true
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
22 changes: 22 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# WeConsole 贡献指南

我们非常欢迎社区的开发者向 WeConsole 做出贡献。在提交贡献之前,请花一些时间阅读以下内容,保证贡献是符合规范并且能帮助到社区。

## 提交 commit

整个 WeConsole 仓库遵从 [Angular Style Commit Message Conventions](https://gist.github.com/stephenparish/9941e89d80e2bc58a153),在输入 commit message 的时候请务必遵从此规范。

## 代码风格

- `JavaScript`:JavaScript 风格遵从 [JavaScript Standard Style](https://github.com/standard/standard)
- `TypeScript`:TypeScript 风格也是 [JavaScript Standard Style](https://github.com/standard/standard) 的变种,详情请看相关包目录下的 `.eslintrc.js``tsconfig.json`
- 样式:遵循相关包目录下的 `.stylelintrc` 风格。

## Pull Request 指南

1. 务必保证 `npm run build` 能够编译成功;
2. 务必保证提交的代码遵循相关包中的 `.eslintrc`, `.stylelintrc` 所规定的规范;
3. 当相关包的 `package.json` 含有 `npm test` 命令时,必须保证所有测试用例都需要通过;
4. 当相关包有测试用例时,请给你提交的代码也添加相应的测试用例;
5. 提交代码 commit 时,commit 信息需要遵循 [Angular Style Commit Message Conventions](https://gist.github.com/stephenparish/9941e89d80e2bc58a153)
6. 如果提交的代码非常多或功能复杂,可以把 PR 分成几个 commit 一起提交。我们在合并时会根据情况 squash。
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 weimobGroup
Copyright (c) 2021 weimob

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit 1bc2455

Please sign in to comment.