Browse Source

upgrade babel-eslint version

pull/2715/head
afc163 8 years ago
committed by 偏右
parent
commit
cbf117ec66
  1. 2
      package.json
  2. 3
      src/components/Charts/Gauge/index.js
  3. 3
      src/components/Charts/MiniArea/index.js
  4. 3
      src/components/Charts/MiniBar/index.js
  5. 3
      src/components/Charts/Pie/index.js
  6. 3
      src/components/Charts/Radar/index.js
  7. 3
      src/components/Charts/TimelineChart/index.js
  8. 3
      src/components/Charts/WaterWave/index.js
  9. 3
      src/pages/Account/Center/Applications.js
  10. 3
      src/pages/Account/Center/Articles.js
  11. 3
      src/pages/Account/Center/Center.js
  12. 3
      src/pages/Account/Center/Projects.js
  13. 3
      src/pages/Account/Settings/GeographicView.js
  14. 3
      src/pages/Account/Settings/Info.js
  15. 4
      src/pages/Dashboard/Monitor.js
  16. 3
      src/pages/Dashboard/Workplace.js
  17. 3
      src/pages/Exception/triggerException.js
  18. 3
      src/pages/Forms/AdvancedForm.js
  19. 3
      src/pages/Forms/BasicForm.js
  20. 3
      src/pages/Forms/StepForm/Step1.js
  21. 3
      src/pages/Forms/StepForm/Step3.js
  22. 3
      src/pages/List/Applications.js
  23. 3
      src/pages/List/Articles.js
  24. 3
      src/pages/List/BasicList.js
  25. 3
      src/pages/List/CardList.js
  26. 3
      src/pages/List/List.js
  27. 3
      src/pages/List/Projects.js
  28. 3
      src/pages/List/TableList.js
  29. 3
      src/pages/Profile/AdvancedProfile.js
  30. 3
      src/pages/Profile/BasicProfile.js
  31. 3
      src/pages/User/Login.js
  32. 3
      src/pages/User/Register.js

2
package.json

@ -57,7 +57,7 @@
"@types/react-dom": "^16.0.6", "@types/react-dom": "^16.0.6",
"antd-pro-merge-less": "^0.0.9", "antd-pro-merge-less": "^0.0.9",
"antd-pro-theme-webpack-plugin": "^1.1.8", "antd-pro-theme-webpack-plugin": "^1.1.8",
"babel-eslint": "^8.2.6", "babel-eslint": "^9.0.0",
"cross-env": "^5.1.1", "cross-env": "^5.1.1",
"cross-port-killer": "^1.0.1", "cross-port-killer": "^1.0.1",
"enzyme": "^3.4.4", "enzyme": "^3.4.4",

3
src/components/Charts/Gauge/index.js

@ -51,8 +51,9 @@ Shape.registerShape('point', 'pointer', {
}, },
}); });
export default
@autoHeight() @autoHeight()
export default class Gauge extends React.Component { class Gauge extends React.Component {
render() { render() {
const { const {
title, title,

3
src/components/Charts/MiniArea/index.js

@ -3,8 +3,9 @@ import { Chart, Axis, Tooltip, Geom } from 'bizcharts';
import autoHeight from '../autoHeight'; import autoHeight from '../autoHeight';
import styles from '../index.less'; import styles from '../index.less';
export default
@autoHeight() @autoHeight()
export default class MiniArea extends React.PureComponent { class MiniArea extends React.PureComponent {
render() { render() {
const { const {
height, height,

3
src/components/Charts/MiniBar/index.js

@ -3,8 +3,9 @@ import { Chart, Tooltip, Geom } from 'bizcharts';
import autoHeight from '../autoHeight'; import autoHeight from '../autoHeight';
import styles from '../index.less'; import styles from '../index.less';
export default
@autoHeight() @autoHeight()
export default class MiniBar extends React.Component { class MiniBar extends React.Component {
render() { render() {
const { height, forceFit = true, color = '#1890FF', data = [] } = this.props; const { height, forceFit = true, color = '#1890FF', data = [] } = this.props;

3
src/components/Charts/Pie/index.js

@ -11,8 +11,9 @@ import autoHeight from '../autoHeight';
import styles from './index.less'; import styles from './index.less';
/* eslint react/no-danger:0 */ /* eslint react/no-danger:0 */
export default
@autoHeight() @autoHeight()
export default class Pie extends Component { class Pie extends Component {
state = { state = {
legendData: [], legendData: [],
legendBlock: false, legendBlock: false,

3
src/components/Charts/Radar/index.js

@ -5,8 +5,9 @@ import autoHeight from '../autoHeight';
import styles from './index.less'; import styles from './index.less';
/* eslint react/no-danger:0 */ /* eslint react/no-danger:0 */
export default
@autoHeight() @autoHeight()
export default class Radar extends Component { class Radar extends Component {
state = { state = {
legendData: [], legendData: [],
}; };

3
src/components/Charts/TimelineChart/index.js

@ -5,8 +5,9 @@ import Slider from 'bizcharts-plugin-slider';
import autoHeight from '../autoHeight'; import autoHeight from '../autoHeight';
import styles from './index.less'; import styles from './index.less';
export default
@autoHeight() @autoHeight()
export default class TimelineChart extends React.Component { class TimelineChart extends React.Component {
render() { render() {
const { const {
title, title,

3
src/components/Charts/WaterWave/index.js

@ -6,8 +6,9 @@ import styles from './index.less';
/* eslint no-mixed-operators: 0 */ /* eslint no-mixed-operators: 0 */
// riddle: https://riddle.alibaba-inc.com/riddles/2d9a4b90 // riddle: https://riddle.alibaba-inc.com/riddles/2d9a4b90
export default
@autoHeight() @autoHeight()
export default class WaterWave extends PureComponent { class WaterWave extends PureComponent {
state = { state = {
radio: 1, radio: 1,
}; };

3
src/pages/Account/Center/Applications.js

@ -5,10 +5,11 @@ import { connect } from 'dva';
import { formatWan } from '@/utils/utils'; import { formatWan } from '@/utils/utils';
import stylesApplications from '../../List/Applications.less'; import stylesApplications from '../../List/Applications.less';
export default
@connect(({ list }) => ({ @connect(({ list }) => ({
list, list,
})) }))
export default class Center extends PureComponent { class Center extends PureComponent {
render() { render() {
const { const {
list: { list }, list: { list },

3
src/pages/Account/Center/Articles.js

@ -5,10 +5,11 @@ import { connect } from 'dva';
import stylesArticles from '../../List/Articles.less'; import stylesArticles from '../../List/Articles.less';
import styles from './Articles.less'; import styles from './Articles.less';
export default
@connect(({ list }) => ({ @connect(({ list }) => ({
list, list,
})) }))
export default class Center extends PureComponent { class Center extends PureComponent {
render() { render() {
const { const {
list: { list }, list: { list },

3
src/pages/Account/Center/Center.js

@ -6,6 +6,7 @@ import { Card, Row, Col, Icon, Avatar, Tag, Divider, Spin, Input } from 'antd';
import GridContent from '@/components/PageHeaderWrapper/GridContent'; import GridContent from '@/components/PageHeaderWrapper/GridContent';
import styles from './Center.less'; import styles from './Center.less';
export default
@connect(({ loading, user, project }) => ({ @connect(({ loading, user, project }) => ({
listLoading: loading.effects['list/fetch'], listLoading: loading.effects['list/fetch'],
currentUser: user.currentUser, currentUser: user.currentUser,
@ -13,7 +14,7 @@ import styles from './Center.less';
project, project,
projectLoading: loading.effects['project/fetchNotice'], projectLoading: loading.effects['project/fetchNotice'],
})) }))
export default class Center extends PureComponent { class Center extends PureComponent {
state = { state = {
newTags: [], newTags: [],
inputVisible: false, inputVisible: false,

3
src/pages/Account/Center/Projects.js

@ -5,10 +5,11 @@ import { connect } from 'dva';
import AvatarList from '@/components/AvatarList'; import AvatarList from '@/components/AvatarList';
import stylesProjects from '../../List/Projects.less'; import stylesProjects from '../../List/Projects.less';
export default
@connect(({ list }) => ({ @connect(({ list }) => ({
list, list,
})) }))
export default class Center extends PureComponent { class Center extends PureComponent {
render() { render() {
const { const {
list: { list }, list: { list },

3
src/pages/Account/Settings/GeographicView.js

@ -10,6 +10,7 @@ const nullSlectItem = {
key: '', key: '',
}; };
export default
@connect(({ geographic }) => { @connect(({ geographic }) => {
const { province, isLoading, city } = geographic; const { province, isLoading, city } = geographic;
return { return {
@ -18,7 +19,7 @@ const nullSlectItem = {
isLoading, isLoading,
}; };
}) })
export default class GeographicView extends PureComponent { class GeographicView extends PureComponent {
componentDidMount = () => { componentDidMount = () => {
const { dispatch } = this.props; const { dispatch } = this.props;
dispatch({ dispatch({

3
src/pages/Account/Settings/Info.js

@ -8,10 +8,11 @@ import styles from './Info.less';
const { Item } = Menu; const { Item } = Menu;
export default
@connect(({ user }) => ({ @connect(({ user }) => ({
currentUser: user.currentUser, currentUser: user.currentUser,
})) }))
export default class Info extends Component { class Info extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
const { match, location } = props; const { match, location } = props;

4
src/pages/Dashboard/Monitor.js

@ -20,12 +20,14 @@ const havePermissionAsync = new Promise(resolve => {
// Call resolve on behalf of passed // Call resolve on behalf of passed
setTimeout(() => resolve(), 300); setTimeout(() => resolve(), 300);
}); });
export default
@Secured(havePermissionAsync) @Secured(havePermissionAsync)
@connect(({ monitor, loading }) => ({ @connect(({ monitor, loading }) => ({
monitor, monitor,
loading: loading.models.monitor, loading: loading.models.monitor,
})) }))
export default class Monitor extends PureComponent { class Monitor extends PureComponent {
componentDidMount() { componentDidMount() {
const { dispatch } = this.props; const { dispatch } = this.props;
dispatch({ dispatch({

3
src/pages/Dashboard/Workplace.js

@ -37,6 +37,7 @@ const links = [
}, },
]; ];
export default
@connect(({ user, project, activities, chart, loading }) => ({ @connect(({ user, project, activities, chart, loading }) => ({
currentUser: user.currentUser, currentUser: user.currentUser,
project, project,
@ -46,7 +47,7 @@ const links = [
projectLoading: loading.effects['project/fetchNotice'], projectLoading: loading.effects['project/fetchNotice'],
activitiesLoading: loading.effects['activities/fetchList'], activitiesLoading: loading.effects['activities/fetchList'],
})) }))
export default class Workplace extends PureComponent { class Workplace extends PureComponent {
componentDidMount() { componentDidMount() {
const { dispatch } = this.props; const { dispatch } = this.props;
dispatch({ dispatch({

3
src/pages/Exception/triggerException.js

@ -3,10 +3,11 @@ import { Button, Spin, Card } from 'antd';
import { connect } from 'dva'; import { connect } from 'dva';
import styles from './style.less'; import styles from './style.less';
export default
@connect(state => ({ @connect(state => ({
isloading: state.error.isloading, isloading: state.error.isloading,
})) }))
export default class TriggerException extends PureComponent { class TriggerException extends PureComponent {
state = { state = {
isloading: false, isloading: false,
}; };

3
src/pages/Forms/AdvancedForm.js

@ -57,11 +57,12 @@ const tableData = [
}, },
]; ];
export default
@connect(({ loading }) => ({ @connect(({ loading }) => ({
submitting: loading.effects['form/submitAdvancedForm'], submitting: loading.effects['form/submitAdvancedForm'],
})) }))
@Form.create() @Form.create()
export default class AdvancedForm extends PureComponent { class AdvancedForm extends PureComponent {
state = { state = {
width: '100%', width: '100%',
}; };

3
src/pages/Forms/BasicForm.js

@ -20,11 +20,12 @@ const { Option } = Select;
const { RangePicker } = DatePicker; const { RangePicker } = DatePicker;
const { TextArea } = Input; const { TextArea } = Input;
export default
@connect(({ loading }) => ({ @connect(({ loading }) => ({
submitting: loading.effects['form/submitRegularForm'], submitting: loading.effects['form/submitRegularForm'],
})) }))
@Form.create() @Form.create()
export default class BasicForms extends PureComponent { class BasicForms extends PureComponent {
handleSubmit = e => { handleSubmit = e => {
const { dispatch, form } = this.props; const { dispatch, form } = this.props;
e.preventDefault(); e.preventDefault();

3
src/pages/Forms/StepForm/Step1.js

@ -15,11 +15,12 @@ const formItemLayout = {
}, },
}; };
export default
@connect(({ form }) => ({ @connect(({ form }) => ({
data: form.step, data: form.step,
})) }))
@Form.create() @Form.create()
export default class Step1 extends React.PureComponent { class Step1 extends React.PureComponent {
render() { render() {
const { form, dispatch, data } = this.props; const { form, dispatch, data } = this.props;
const { getFieldDecorator, validateFields } = form; const { getFieldDecorator, validateFields } = form;

3
src/pages/Forms/StepForm/Step3.js

@ -5,10 +5,11 @@ import router from 'umi/router';
import Result from '@/components/Result'; import Result from '@/components/Result';
import styles from './style.less'; import styles from './style.less';
export default
@connect(({ form }) => ({ @connect(({ form }) => ({
data: form.step, data: form.step,
})) }))
export default class Step3 extends React.PureComponent { class Step3 extends React.PureComponent {
render() { render() {
const { data } = this.props; const { data } = this.props;
const onFinish = () => { const onFinish = () => {

3
src/pages/List/Applications.js

@ -12,12 +12,13 @@ import styles from './Applications.less';
const { Option } = Select; const { Option } = Select;
const FormItem = Form.Item; const FormItem = Form.Item;
export default
@Form.create() @Form.create()
@connect(({ list, loading }) => ({ @connect(({ list, loading }) => ({
list, list,
loading: loading.models.list, loading: loading.models.list,
})) }))
export default class FilterCardList extends PureComponent { class FilterCardList extends PureComponent {
componentDidMount() { componentDidMount() {
const { dispatch } = this.props; const { dispatch } = this.props;
dispatch({ dispatch({

3
src/pages/List/Articles.js

@ -12,12 +12,13 @@ const FormItem = Form.Item;
const pageSize = 5; const pageSize = 5;
export default
@Form.create() @Form.create()
@connect(({ list, loading }) => ({ @connect(({ list, loading }) => ({
list, list,
loading: loading.models.list, loading: loading.models.list,
})) }))
export default class SearchList extends Component { class SearchList extends Component {
componentDidMount() { componentDidMount() {
this.fetchMore(); this.fetchMore();
} }

3
src/pages/List/BasicList.js

@ -32,12 +32,13 @@ const RadioGroup = Radio.Group;
const SelectOption = Select.Option; const SelectOption = Select.Option;
const { Search, TextArea } = Input; const { Search, TextArea } = Input;
export default
@connect(({ list, loading }) => ({ @connect(({ list, loading }) => ({
list, list,
loading: loading.models.list, loading: loading.models.list,
})) }))
@Form.create() @Form.create()
export default class BasicList extends PureComponent { class BasicList extends PureComponent {
state = { visible: false, done: false }; state = { visible: false, done: false };
formLayout = { formLayout = {

3
src/pages/List/CardList.js

@ -7,11 +7,12 @@ import PageHeaderWrapper from '@/components/PageHeaderWrapper';
import styles from './CardList.less'; import styles from './CardList.less';
export default
@connect(({ list, loading }) => ({ @connect(({ list, loading }) => ({
list, list,
loading: loading.models.list, loading: loading.models.list,
})) }))
export default class CardList extends PureComponent { class CardList extends PureComponent {
componentDidMount() { componentDidMount() {
const { dispatch } = this.props; const { dispatch } = this.props;
dispatch({ dispatch({

3
src/pages/List/List.js

@ -4,8 +4,9 @@ import { connect } from 'dva';
import { Input } from 'antd'; import { Input } from 'antd';
import PageHeaderWrapper from '@/components/PageHeaderWrapper'; import PageHeaderWrapper from '@/components/PageHeaderWrapper';
export default
@connect() @connect()
export default class SearchList extends Component { class SearchList extends Component {
handleTabChange = key => { handleTabChange = key => {
const { match } = this.props; const { match } = this.props;
switch (key) { switch (key) {

3
src/pages/List/Projects.js

@ -14,12 +14,13 @@ const { Option } = Select;
const FormItem = Form.Item; const FormItem = Form.Item;
/* eslint react/no-array-index-key: 0 */ /* eslint react/no-array-index-key: 0 */
export default
@Form.create() @Form.create()
@connect(({ list, loading }) => ({ @connect(({ list, loading }) => ({
list, list,
loading: loading.models.list, loading: loading.models.list,
})) }))
export default class CoverCardList extends PureComponent { class CoverCardList extends PureComponent {
componentDidMount() { componentDidMount() {
const { dispatch } = this.props; const { dispatch } = this.props;
dispatch({ dispatch({

3
src/pages/List/TableList.js

@ -266,12 +266,13 @@ class UpdateForm extends PureComponent {
} }
/* eslint react/no-multi-comp:0 */ /* eslint react/no-multi-comp:0 */
export default
@connect(({ rule, loading }) => ({ @connect(({ rule, loading }) => ({
rule, rule,
loading: loading.models.rule, loading: loading.models.rule,
})) }))
@Form.create() @Form.create()
export default class TableList extends PureComponent { class TableList extends PureComponent {
state = { state = {
modalVisible: false, modalVisible: false,
updateModalVisible: false, updateModalVisible: false,

3
src/pages/Profile/AdvancedProfile.js

@ -180,11 +180,12 @@ const columns = [
}, },
]; ];
export default
@connect(({ profile, loading }) => ({ @connect(({ profile, loading }) => ({
profile, profile,
loading: loading.effects['profile/fetchAdvanced'], loading: loading.effects['profile/fetchAdvanced'],
})) }))
export default class AdvancedProfile extends Component { class AdvancedProfile extends Component {
state = { state = {
operationkey: 'tab1', operationkey: 'tab1',
stepDirection: 'horizontal', stepDirection: 'horizontal',

3
src/pages/Profile/BasicProfile.js

@ -41,11 +41,12 @@ const progressColumns = [
}, },
]; ];
export default
@connect(({ profile, loading }) => ({ @connect(({ profile, loading }) => ({
profile, profile,
loading: loading.effects['profile/fetchBasic'], loading: loading.effects['profile/fetchBasic'],
})) }))
export default class BasicProfile extends Component { class BasicProfile extends Component {
componentDidMount() { componentDidMount() {
const { dispatch } = this.props; const { dispatch } = this.props;
dispatch({ dispatch({

3
src/pages/User/Login.js

@ -7,11 +7,12 @@ import styles from './Login.less';
const { Tab, UserName, Password, Mobile, Captcha, Submit } = Login; const { Tab, UserName, Password, Mobile, Captcha, Submit } = Login;
export default
@connect(({ login, loading }) => ({ @connect(({ login, loading }) => ({
login, login,
submitting: loading.effects['login/login'], submitting: loading.effects['login/login'],
})) }))
export default class LoginPage extends Component { class LoginPage extends Component {
state = { state = {
type: 'account', type: 'account',
autoLogin: true, autoLogin: true,

3
src/pages/User/Register.js

@ -21,12 +21,13 @@ const passwordProgressMap = {
poor: 'exception', poor: 'exception',
}; };
export default
@connect(({ register, loading }) => ({ @connect(({ register, loading }) => ({
register, register,
submitting: loading.effects['register/submit'], submitting: loading.effects['register/submit'],
})) }))
@Form.create() @Form.create()
export default class Register extends Component { class Register extends Component {
state = { state = {
count: 0, count: 0,
confirmDirty: false, confirmDirty: false,

Loading…
Cancel
Save