Skip to content

Commit 3a07dee

Browse files
authored
Merge pull request #5 from coderiver-org/common
Common
2 parents 047983f + 3538b06 commit 3a07dee

Some content is hidden

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

52 files changed

+436
-71
lines changed

.eslintrc.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ module.exports = {
231231
*/
232232

233233
// 'typescript/no-constant-condition': 2,
234-
'typescript/quotemark': [true,"single","avoid-escape","jsx-double"],
234+
'typescript/quotemark': [true, 'single', 'avoid-escape', 'jsx-double'],
235235
'typescript/no-console': 0,
236236
'typescript/ordered-imports': 0,
237237
'typescript/no-namespace': 0,
@@ -259,8 +259,8 @@ module.exports = {
259259
// "public-instence-method"
260260
// ]
261261
// }],
262-
'typescript/object-literal-key-quotes': [true,"as-needed"],
263-
'typescript/no-trailing-whitespace': [false,"ignore-comments"],
262+
'typescript/object-literal-key-quotes': [true, 'as-needed'],
263+
'typescript/no-trailing-whitespace': [false, 'ignore-comments'],
264264
'typescript/class-name-casing': 2,
265265

266266
/**
@@ -274,6 +274,8 @@ module.exports = {
274274
'react/jsx-sort-prop-types': 0, // 是否排序 prop types
275275
'react/jsx-uses-react': 2, // 组件中中是否用了 react
276276
'react/jsx-uses-vars': 2, // 定义了 jsx component 没有使用
277+
'react/jsx-pascal-case': 1, // 使用jsx作为组件扩展名,采用pascal命名法 引用名采用驼峰命名
278+
'react/jsx-closing-bracket-location': 1, // 组件prop的的对齐风格
277279
'react/no-did-mount-set-state': 0, // 不要在 componentDidMount 里面设置 state
278280
'react/no-did-update-set-state': 0, // 同上
279281
'react/no-multi-comp': 0, // 一个文件里面禁止声明多个 component
@@ -282,6 +284,7 @@ module.exports = {
282284
'react/react-in-jsx-scope': 1, // 查看 jsx 是否引入 react
283285
'react/self-closing-comp': 2, // 检查是否有没有 children 的非子闭合标签
284286
'react/jsx-wrap-multilines': 1, // 不强制 return 的时候,结构的格式
287+
'react/prefer-es6-class': 1, // 使用组件类继承React.Component
285288
'react/sort-comp': [
286289
0,
287290
{
@@ -298,8 +301,6 @@ module.exports = {
298301
],
299302
'react/jsx-indent-props': 0,
300303

301-
302-
'no-var':0
304+
'no-var': 0,
303305
},
304-
305306
};

.umirc.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22

33
import path from 'path';
44

5-
65
export default {
76
plugins: [
87
// ref: https://umijs.org/plugin/umi-plugin-react.html
98
[
109
'umi-plugin-react',
1110
{
12-
antd: false,
11+
antd: true,
1312
dva: true,
1413
dynamicImport: true,
1514
title: 'umi-ts',
@@ -23,6 +22,9 @@ export default {
2322
],
2423
history: 'hash',
2524
cssLoaderOptions: {},
25+
alias: {
26+
component: path.resolve(__dirname, './src/component'),
27+
},
2628
chainWebpack(config, { webpack }) {
2729
// config.plugin('analyzer').use(
2830
// new BundleAnalyzerPlugin({
@@ -57,6 +59,8 @@ export default {
5759
// })
5860
// );
5961
config.resolve.alias.set('src', path.resolve(__dirname, './src'));
62+
config.resolve.alias.set('component', path.resolve(__dirname, './src/component'));
63+
config.resolve.alias.set('assets', path.resolve(__dirname, './src/assets'));
6064
// config.module
6165
// .rule('save')
6266
// .test(/\.less$/)

src/assets/css/common/index.less

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@header-nav-color: #40aea8;
2+
@footer-border-color: #40aea8;
3.49 KB
Loading
10.3 KB
Loading
504 KB
Loading

src/assets/images/home/ios@2x.png

6.62 KB
Loading

src/assets/images/home/logo.png

8.56 KB
Loading

src/assets/images/home/logo@2x.png

22.4 KB
Loading
2.36 KB
Loading

0 commit comments

Comments
 (0)