Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd61bacd

Browse files
authored
Merge pull request#9 from lsentkiewicz/nfzManagement
fix eslint
2 parents7dbee71 +c2237c8 commitd61bacd

File tree

252 files changed

+1282
-1239
lines changed

Some content is hidden

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

252 files changed

+1282
-1239
lines changed

‎.eslintrc‎

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
{
2-
"parser": "babel-eslint",
3-
"extends": [
4-
"airbnb"
5-
],
6-
"plugins": [
7-
"babel"
8-
],
2+
"extends": "eslint-config-topcoder/react",
93
"env": {
104
"browser": true,
115
"mocha": true
@@ -17,27 +11,20 @@
1711
"google": true,
1812
},
1913
"rules": {
20-
"global-require": 0,
21-
"no-script-url": 0,
14+
"import/no-unresolved": [2, { ignore: ['^components/', '^containers/', '^services/', '^layouts/', '^store/', '^api/', '^routes/'] }],
15+
16+
// temporary for in-progress features
17+
"no-alert": 0,
18+
19+
// disable for unit tests
20+
"no-unused-expressions": 0,
21+
22+
// relax rules
23+
"no-magic-numbers": 0,
2224
"max-len": 0,
23-
"new-cap": 0,
24-
"object-curly-spacing": ["error", "always"],
2525
"react/jsx-no-bind": 0,
26-
"no-mixed-operators": 0,
27-
"arrow-parens": [
28-
2,
29-
"always"
30-
],
31-
"import/extensions": 0,
32-
"import/no-unresolved": 0,
33-
"import/no-named-as-default": 0,
34-
"import/no-extraneous-dependencies": 0,
35-
"no-underscore-dangle": 0,
36-
"react/forbid-prop-types": 0,
37-
"no-unused-expressions": 0,
38-
"jsx-a11y/anchor-has-content": 0,
39-
"no-plusplus": 0,
40-
"jsx-a11y/no-static-element-interactions": 0,
41-
"no-use-before-define": ["error", { "functions": false, "classes": true }],
26+
"import/order": 0,
27+
"import/imports-first": 0,
28+
"no-restricted-syntax": 0,
4229
}
4330
}

‎package.json‎

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,7 @@
6666
"react-dropdown":"^1.2.0",
6767
"react-icheck":"^0.3.6",
6868
"react-input-range":"^0.9.3",
69-
"react-modal":"^1.6.2",
70-
"react-flexbox-grid":"^0.10.2",
7169
"react-highcharts":"^11.0.0",
72-
"react-modal":"^1.5.2",
7370
"react-redux":"^4.0.0",
7471
"react-redux-toastr":"^4.2.2",
7572
"react-router":"^2.8.1",
@@ -100,15 +97,13 @@
10097
"yargs":"^4.0.0"
10198
},
10299
"devDependencies": {
100+
"babel-eslint":"^7.1.1",
103101
"chai":"^3.5.0",
104102
"css-modules-require-hook":"^4.0.5",
105103
"enzyme":"^2.6.0",
106-
"eslint":"^3.7.1",
107-
"eslint-config-airbnb":"^12.0.0",
108-
"eslint-plugin-babel":"^3.3.0",
109-
"eslint-plugin-import":"^1.16.0",
110-
"eslint-plugin-jsx-a11y":"^2.2.2",
111-
"eslint-plugin-react":"^6.3.0",
104+
"eslint-config-topcoder":"^1.8.0",
105+
"eslint-plugin-babel":"^4.0.0",
106+
"eslint-plugin-react":"^6.8.0",
112107
"jsdom":"^9.8.3",
113108
"mocha":"^3.2.0",
114109
"mocha-webpack":"^0.7.0",

‎server.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
/* eslint import/no-commonjs: 0 */
2+
13
/**
24
* Http server for serving the frontend files
35
*/
46

7+
constpath=require('path');
58
constexpress=require('express');
69
constwebpack=require('webpack');
7-
constpath=require('path');
810
constconfig=require('config');
911
constwebpackConfig=require('./webpack.config');
1012

‎setup-test.js‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint import/no-commonjs: 0 */
2+
13
consthook=require('css-modules-require-hook');
24
constsass=require('node-sass');
35

@@ -7,7 +9,7 @@ const sass = require('node-sass');
79
hook({
810
extensions:['.scss','.css'],
911
generateScopedName:'[local]___[hash:base64:5]',
10-
preprocessCss:(data,file)=>sass.renderSync({file}).css,
12+
preprocessCss:(data,file)=>sass.renderSync({file}).css,
1113
});
1214

1315
/*
@@ -20,7 +22,7 @@ const exposedProperties = ['window', 'navigator', 'document'];
2022
global.document=jsdom('');
2123
global.window=document.defaultView;
2224
Object.keys(document.defaultView).forEach((property)=>{
23-
if(typeofglobal[property]==='undefined'){
25+
if(!global[property]){
2426
exposedProperties.push(property);
2527
global[property]=document.defaultView[property];
2628
}

‎src/components/Accordion/Accordion.jsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
importReact,{PropTypes}from'react';
1+
importReact,{PropTypes}from'react';
22
importuncontrollablefrom'uncontrollable';
33
importCSSModulesfrom'react-css-modules';
44
importcnfrom'classnames';
55
importstylesfrom'./Accordion.scss';
66

7-
exportconstAccordion=({onToggleExpand, isExpanded, children, title})=>(
8-
<divstyleName={cn('accordion',{expanded:isExpanded})}>
7+
exportconstAccordion=({onToggleExpand, isExpanded, children, title})=>(
8+
<divstyleName={cn('accordion',{expanded:isExpanded})}>
99
<divstyleName="title"onClick={()=>onToggleExpand(!isExpanded)}>
1010
{title}
1111
</div>
@@ -20,6 +20,6 @@ Accordion.propTypes = {
2020
title:PropTypes.any,
2121
};
2222

23-
exportdefaultuncontrollable(CSSModules(Accordion,styles,{allowMultiple:true}),{
23+
exportdefaultuncontrollable(CSSModules(Accordion,styles,{allowMultiple:true}),{
2424
isExpanded:'onToggleExpand',
2525
});

‎src/components/Breadcrumb/Breadcrumb.jsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
importReact,{PropTypes}from'react';
1+
importReact,{PropTypes}from'react';
22
importCSSModulesfrom'react-css-modules';
3-
import{Link}from'react-router';
3+
import{Link}from'react-router';
44
importstylesfrom'./Breadcrumb.scss';
55

6-
exportconstBreadcrumb=({items})=>(
6+
exportconstBreadcrumb=({items})=>(
77
<ulstyleName="breadcrumb">
88
{items.map((item,index)=>(
99
<listyleName="item"key={index}>

‎src/components/Button/Button.jsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
importReact,{PropTypes}from'react';
1+
importReact,{PropTypes}from'react';
22
importCSSModulesfrom'react-css-modules';
33
import_from'lodash';
44
importcnfrom'classnames';
@@ -21,4 +21,4 @@ Button.defaultProps = {
2121
size:'normal',
2222
};
2323

24-
exportdefaultCSSModules(Button,styles,{allowMultiple:true});
24+
exportdefaultCSSModules(Button,styles,{allowMultiple:true});

‎src/components/Checkbox/Checkbox.jsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
importReact,{PropTypes}from'react';
1+
importReact,{PropTypes}from'react';
22
importCSSModulesfrom'react-css-modules';
33
import_from'lodash';
44
importstylesfrom'./Checkbox.scss';
55

6-
constCheckbox=({children, className, id, ...props})=>(
6+
constCheckbox=({children, className, id, ...props})=>(
77
<divstyleName="checkbox"className={className}>
88
<inputid={id}type="checkbox"{..._.pick(props,'checked','onChange','defaultChecked')}/>
99
<labelhtmlFor={id}>

‎src/components/CountdownTimer/Countdown.jsx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
importReact,{Component,PropTypes}from'react';
1+
importReact,{Component,PropTypes}from'react';
22
importDateBetweenfrom'./DateBetween';
33

44
/**
@@ -9,7 +9,7 @@ export default class Countdown extends Component {
99

1010
constructor(props){
1111
super(props);
12-
this.state={remaining:null};
12+
this.state={remaining:null};
1313
}
1414

1515
componentDidMount(){
@@ -25,7 +25,7 @@ export default class Countdown extends Component {
2525
conststartDate=newDate();
2626
constendDate=newDate(this.props.options.endDate);
2727
constremaining=DateBetween(startDate,endDate);
28-
this.setState({remaining});
28+
this.setState({remaining});
2929
}
3030

3131
render(){
Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,17 @@
1-
2-
importReact,{Component}from'react';
1+
importReactfrom'react';
32
importCSSModulesfrom'react-css-modules';
43
importCountdownfrom'./Countdown';
54

65
importstylesfrom'./CountdownTimer.scss';
76

8-
classCountdownTimerextendsComponent{
9-
componentDidMount(){
7+
constCountdownTimer=()=>{
8+
constOPTIONS={endDate:'12/20/2016 12:12 AM',prefix:''};
109

11-
}
12-
render(){
13-
constOPTIONS={endDate:'12/20/2016 12:12 AM',prefix:''};
10+
return(
11+
<div>
12+
<Countdownoptions={OPTIONS}/>
13+
</div>
14+
);
15+
};
1416

15-
return(
16-
<div>
17-
<Countdownoptions={OPTIONS}/>
18-
</div>
19-
);
20-
}
21-
}
2217
exportdefaultCSSModules(CountdownTimer,styles);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp