Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit c9b2bc7

Browse files
committed
chore: Merge branch 'dev'
2 parents 16618d0 + bd292db commit c9b2bc7

File tree

321 files changed

+3940
-4328
lines changed

Some content is hidden

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

321 files changed

+3940
-4328
lines changed

.babelrc

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
{
2-
"presets": [
3-
["next/babel"]
4-
],
2+
"presets": [["next/babel"]],
53
"env": {
6-
"development": {
7-
"plugins": ["inline-dotenv"]
4+
"development": {
5+
"plugins": ["inline-dotenv"]
86
},
97
"production": {
108
"presets": [
11-
["next/babel", {
12-
"preset-env": {
13-
"targets": {
14-
"ie": "11"
15-
},
16-
"debug": false
9+
[
10+
"next/babel",
11+
{
12+
"preset-env": {
13+
"targets": {
14+
"ie": "11"
15+
},
16+
"debug": false
17+
}
1718
}
18-
}]
19+
]
1920
]
2021
},
2122
"test": {
@@ -47,20 +48,25 @@
4748
}
4849
],
4950
"ramda",
50-
["module-resolver", {
51-
"root": ["./"],
52-
"alias": {
53-
"@containers":"./containers",
54-
"@components":"./components",
55-
"@hooks":"./components/Hooks",
56-
"@config":"./config",
57-
"@stores":"./stores",
58-
"@model":"./stores/SharedModel",
59-
"@utils":"./utils",
60-
"@schemas":"./containers/schemas",
61-
"@Img": "./components/Img",
62-
"@SvgIcons": "./components/SvgIcons"
51+
[
52+
"module-resolver",
53+
{
54+
"root": ["./"],
55+
"alias": {
56+
"@containers": "./containers",
57+
"@components": "./components",
58+
"@services": "./services",
59+
"@constant": "./utils/constant/",
60+
"@hooks": "./components/Hooks",
61+
"@config": "./config",
62+
"@stores": "./stores",
63+
"@model": "./stores/SharedModel",
64+
"@utils": "./utils",
65+
"@schemas": "./containers/schemas",
66+
"@Img": "./components/Img",
67+
"@SvgIcons": "./components/SvgIcons"
68+
}
6369
}
64-
}]
70+
]
6571
]
6672
}

.eslintrc.js

Lines changed: 3 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,5 @@
1+
// see details:
2+
// https://github.com/groupher/eslint-config-web/blob/master/index.js
13
module.exports = {
2-
extends: ['airbnb', 'plugin:react/recommended', 'prettier', 'prettier/react'],
3-
plugins: ['prettier', 'react', 'cypress', 'react-hooks'],
4-
parser: 'babel-eslint',
5-
parserOptions: {
6-
ecmaVersion: 2016,
7-
sourceType: 'module',
8-
ecmaFeatures: {
9-
jsx: true,
10-
},
11-
},
12-
env: {
13-
es6: true,
14-
node: true,
15-
jest: true,
16-
'cypress/globals': true,
17-
},
18-
settings: {
19-
'import/resolver': {
20-
'babel-module': {},
21-
},
22-
},
23-
rules: {
24-
// import/resolver 暂时识别不了 @xxx, 暂时关闭该检测
25-
'import/no-extraneous-dependencies': 0,
26-
'arrow-body-style': 0,
27-
// need for _store init
28-
'no-underscore-dangle': 0,
29-
// heavilly used in store.actions
30-
'no-param-reassign': 0,
31-
// heavilly used in store.views
32-
'no-use-before-define': 0,
33-
// force-return is unneeded
34-
'consistent-return': 0,
35-
'no-shadow': 0,
36-
// error could be object for parse by upfloor
37-
'prefer-promise-reject-errors': 0,
38-
'react/jsx-no-bind': 0,
39-
// allow JSX in js files
40-
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
41-
'react/forbid-prop-types': 0,
42-
// no need sort
43-
'react/sort-comp': 0,
44-
'react/prop-types': [1, { skipUndeclared: true }],
45-
'jsx-a11y/href-no-hash': 'off',
46-
'jsx-a11y/no-static-element-interactions': 0,
47-
'jsx-a11y/click-events-have-key-events': 0,
48-
49-
// for cypress test usage
50-
'no-unused-expressions': 0,
51-
52-
'prettier/prettier': [
53-
'error',
54-
{
55-
singleQuote: true,
56-
semi: false,
57-
tabWidth: 2,
58-
bracketSpacing: true,
59-
trailingComma: 'es5',
60-
},
61-
],
62-
'react-hooks/rules-of-hooks': 'error',
63-
'react-hooks/exhaustive-deps': 'warn',
64-
},
4+
extends: ['@groupher/eslint-config-web'],
655
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ yarn-error.log
1212
schema.graphql
1313
cypress//integration/examples
1414
cypress/videos/
15+
.vscode/

components/ArticleActionsPanel/EditOption.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import React from 'react'
22
import T from 'prop-types'
33

44
import { ICON_CMD } from '@config'
5-
import { THREAD } from '@utils'
6-
import withGuardian from '@components/HOC/withGuardian'
5+
import { THREAD } from '@constant'
76

7+
import withGuardian from '@components/HOC/withGuardian'
88
import { Option, OptionIcon, OptionTitle } from './styles'
99

1010
const EditOption = ({ thread, onEdit }) => (

components/ArticleActionsPanel/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import T from 'prop-types'
99
import R from 'ramda'
1010

1111
import { ICON_CMD } from '@config'
12-
import { buildLog, THREAD } from '@utils'
12+
import { THREAD } from '@constant'
13+
import { buildLog } from '@utils'
1314

1415
import Informer from '@containers/Informer'
1516
import PinOption from './PinOption'

components/ArticleEditToolbar/CopyrightSelector.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import R from 'ramda'
33
// import T from 'prop-types'
44

55
import { ICON_CMD } from '@config'
6-
import { THREAD } from '@utils'
6+
import { THREAD } from '@constant'
7+
78
import Popover from '@components/Popover'
89

910
import {

components/ArticleEditToolbar/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import T from 'prop-types'
99
import { Button } from 'antd'
1010

1111
import { SITE_URL } from '@config'
12+
import { THREAD } from '@constant'
13+
import { buildLog } from '@utils'
1214

13-
import { buildLog, THREAD } from '@utils'
1415
import Maybe from '@components/Maybe'
15-
1616
import CopyrightSelector from './CopyrightSelector'
1717

1818
import {

components/CommunityFaceLogo/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import T from 'prop-types'
99
import R from 'ramda'
1010

1111
import { buildLog } from '@utils'
12-
import HomeLogo from './HomeLogo'
1312

13+
import HomeLogo from './HomeLogo'
1414
import { Logo } from './styles'
1515

1616
/* eslint-disable-next-line */

components/ContentFilter/FilterPanel.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from 'react'
22

3-
import { THREAD } from '@utils'
4-
import { FiltrPanelWrapper } from './styles'
3+
import { THREAD } from '@constant'
54

65
import TimeFilter from './TimeFilter'
76
import SortFilter from './SortFilter'
@@ -18,6 +17,8 @@ import JobScaleFilter from './JobScaleFilter'
1817
// video
1918
import VideoSourceFilter from './VideoSourceFilter'
2019

20+
import { FiltrPanelWrapper } from './styles'
21+
2122
const FilterPanel = ({ thread, activeFilter, onSelect, isLogin }) => {
2223
switch (thread) {
2324
case THREAD.POST:

components/ContentFilter/LengthFilter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from 'react'
22

33
import { ICON_CMD } from '@config'
4+
import { FILTER } from '@constant'
45

5-
import { FILTER } from '@utils'
66
import {
77
ColumnWrapper,
88
SelectLable,

0 commit comments

Comments
 (0)