mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-28 00:49:46 +03:00
Fix lint errors
This commit is contained in:
parent
5df216fc61
commit
e81ee2cf5d
|
@ -16,18 +16,16 @@ export default class Footer extends Component {
|
|||
filter: PropTypes.string.isRequired,
|
||||
onClearMarked: PropTypes.func.isRequired,
|
||||
onShow: PropTypes.func.isRequired
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
<footer className='footer'>
|
||||
{this.renderTodoCount()}
|
||||
<ul className='filters'>
|
||||
{[SHOW_ALL, SHOW_UNMARKED, SHOW_MARKED].map(filter =>
|
||||
<li key={filter}>
|
||||
{this.renderFilterLink(filter)}
|
||||
</li>
|
||||
)}
|
||||
{[SHOW_ALL, SHOW_UNMARKED, SHOW_MARKED].map(filter => (
|
||||
<li key={filter}>{this.renderFilterLink(filter)}</li>
|
||||
))}
|
||||
</ul>
|
||||
{this.renderClearButton()}
|
||||
</footer>
|
||||
|
@ -64,10 +62,7 @@ export default class Footer extends Component {
|
|||
const { markedCount, onClearMarked } = this.props;
|
||||
if (markedCount > 0) {
|
||||
return (
|
||||
<button
|
||||
className='clear-completed'
|
||||
onClick={onClearMarked}
|
||||
>
|
||||
<button className='clear-completed' onClick={onClearMarked}>
|
||||
Clear completed
|
||||
</button>
|
||||
);
|
||||
|
|
|
@ -39,18 +39,15 @@ export default class MainSection extends Component {
|
|||
const { filter } = this.state;
|
||||
|
||||
const filteredTodos = todos.filter(TODO_FILTERS[filter]);
|
||||
const markedCount = todos.reduce((count, todo) =>
|
||||
(todo.marked ? count + 1 : count),
|
||||
0
|
||||
);
|
||||
const markedCount = todos.reduce((count, todo) => (todo.marked ? count + 1 : count), 0);
|
||||
|
||||
return (
|
||||
<section className='main'>
|
||||
{this.renderToggleAll(markedCount)}
|
||||
<ul className='todo-list'>
|
||||
{filteredTodos.map(todo =>
|
||||
{filteredTodos.map(todo => (
|
||||
<TodoItem key={todo.id} todo={todo} {...actions} />
|
||||
)}
|
||||
))}
|
||||
</ul>
|
||||
{this.renderFooter(markedCount)}
|
||||
</section>
|
||||
|
|
|
@ -4,32 +4,12 @@
|
|||
"description": "TodoMVC example for redux",
|
||||
"main": "server.js",
|
||||
"scripts": {
|
||||
"start": "webpack-dev-server",
|
||||
"build": "webpack --config webpack.config.prod.js"
|
||||
"start": "../../node_modules/.bin/webpack-dev-server",
|
||||
"build": "../../node_modules/.bin/webpack --config webpack.config.prod.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/calesce/redux-slider-monitor.git"
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"classnames": "^2.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.24.1",
|
||||
"babel-core": "^6.24.1",
|
||||
"babel-loader": "^6.4.1",
|
||||
"babel-preset-es2015": "^6.24.1",
|
||||
"babel-preset-react": "^6.24.1",
|
||||
"babel-preset-stage-0": "^6.24.1",
|
||||
"node-libs-browser": "^0.5.2",
|
||||
"raw-loader": "^0.5.1",
|
||||
"react-hot-loader": "^3.0.0-beta.6",
|
||||
"redux-devtools-dock-monitor": "^1.0.1",
|
||||
"redux-devtools-log-monitor": "^1.0.1",
|
||||
"style-loader": "^0.16.1",
|
||||
"todomvc-app-css": "^2.0.1",
|
||||
"webpack": "^2.2.1",
|
||||
"webpack-dev-server": "^2.4.1"
|
||||
}
|
||||
"license": "MIT"
|
||||
}
|
||||
|
|
|
@ -23,10 +23,7 @@ module.exports = {
|
|||
plugins: [new webpack.HotModuleReplacementPlugin(), new webpack.NoEmitOnErrorsPlugin()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'redux-slider-monitor': path.join(__dirname, '..', '..', 'src/SliderMonitor'),
|
||||
react: path.join(__dirname, '../../../../node_modules', 'react'),
|
||||
'react-dom': path.join(__dirname, '../../../../node_modules', 'react-dom'),
|
||||
'redux-devtools': path.join(__dirname, '../../..', 'redux-devtools')
|
||||
'redux-slider-monitor': path.join(__dirname, '..', '..', 'src/SliderMonitor')
|
||||
},
|
||||
extensions: ['.js']
|
||||
},
|
||||
|
@ -36,12 +33,15 @@ module.exports = {
|
|||
test: /\.js$/,
|
||||
use: ['babel-loader'],
|
||||
exclude: /node_modules/,
|
||||
include: [__dirname, path.join(__dirname, '..', '..', 'src')]
|
||||
include: [__dirname, path.join(__dirname, '../../src')]
|
||||
},
|
||||
{
|
||||
test: /\.css?$/,
|
||||
use: ['style-loader', 'raw-loader'],
|
||||
include: __dirname
|
||||
include: [
|
||||
__dirname,
|
||||
path.join(__dirname, '../../../../node_modules/todomvc-app-css')
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -26,16 +26,26 @@
|
|||
"babel-preset-es2015": "^6.24.1",
|
||||
"babel-preset-react": "^6.24.1",
|
||||
"babel-preset-stage-0": "^6.24.1",
|
||||
"eslint": "^3.19.0",
|
||||
"classnames": "^2.1.2",
|
||||
"eslint": "^5.0.0",
|
||||
"eslint-config-airbnb": "^14.1.0",
|
||||
"eslint-plugin-import": "^2.2.0",
|
||||
"eslint-plugin-jsx-a11y": "^4.0.0",
|
||||
"eslint-plugin-react": "^6.10.3",
|
||||
"eslint-plugin-react": "^7.4.0",
|
||||
"raw-loader": "^0.5.1",
|
||||
"react": "^16.7.0",
|
||||
"react-dom": "^16.7.0",
|
||||
"react-redux": "^6.0.0",
|
||||
"react-hot-loader": "^3.0.0-beta.6",
|
||||
"redux": "^4.0.0",
|
||||
"rimraf": "^2.3.4"
|
||||
"redux-devtools-dock-monitor": "^1.0.1",
|
||||
"redux-devtools-log-monitor": "^1.0.1",
|
||||
"redux-devtools": "^3.5.0",
|
||||
"rimraf": "^2.3.4",
|
||||
"style-loader": "^0.16.1",
|
||||
"todomvc-app-css": "^2.0.1",
|
||||
"webpack": "^2.2.1",
|
||||
"webpack-dev-server": "^2.4.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^0.14.0 || ^15.0.0 || ^16.0.0-0",
|
||||
|
|
|
@ -8,7 +8,7 @@ export default class SliderButton extends (PureComponent || Component) {
|
|||
type: PropTypes.string,
|
||||
disabled: PropTypes.bool,
|
||||
onClick: PropTypes.func
|
||||
}
|
||||
};
|
||||
|
||||
iconStyle() {
|
||||
return {
|
||||
|
@ -28,11 +28,10 @@ export default class SliderButton extends (PureComponent || Component) {
|
|||
disabled={this.props.disabled}
|
||||
theme={this.props.theme}
|
||||
>
|
||||
<svg
|
||||
viewBox='0 0 24 24' preserveAspectRatio='xMidYMid meet'
|
||||
style={this.iconStyle()}
|
||||
>
|
||||
<g><path d='M8 5v14l11-7z' /></g>
|
||||
<svg viewBox='0 0 24 24' preserveAspectRatio='xMidYMid meet' style={this.iconStyle()}>
|
||||
<g>
|
||||
<path d='M8 5v14l11-7z' />
|
||||
</g>
|
||||
</svg>
|
||||
</Button>
|
||||
);
|
||||
|
@ -46,20 +45,19 @@ export default class SliderButton extends (PureComponent || Component) {
|
|||
disabled={this.props.disabled}
|
||||
theme={this.props.theme}
|
||||
>
|
||||
<svg
|
||||
viewBox='0 0 24 24' preserveAspectRatio='xMidYMid meet'
|
||||
style={this.iconStyle()}
|
||||
>
|
||||
<g><path d='M6 19h4V5H6v14zm8-14v14h4V5h-4z' /></g>
|
||||
<svg viewBox='0 0 24 24' preserveAspectRatio='xMidYMid meet' style={this.iconStyle()}>
|
||||
<g>
|
||||
<path d='M6 19h4V5H6v14zm8-14v14h4V5h-4z' />
|
||||
</g>
|
||||
</svg>
|
||||
</Button>
|
||||
)
|
||||
);
|
||||
|
||||
renderStepButton = (direction) => {
|
||||
const isLeft = direction === 'left';
|
||||
const d = isLeft ?
|
||||
'M15.41 16.09l-4.58-4.59 4.58-4.59-1.41-1.41-6 6 6 6z' :
|
||||
'M8.59 16.34l4.58-4.59-4.58-4.59 1.41-1.41 6 6-6 6z';
|
||||
const d = isLeft
|
||||
? 'M15.41 16.09l-4.58-4.59 4.58-4.59-1.41-1.41-6 6 6 6z'
|
||||
: 'M8.59 16.34l4.58-4.59-4.58-4.59 1.41-1.41 6 6-6 6z';
|
||||
|
||||
return (
|
||||
<Button
|
||||
|
@ -69,15 +67,14 @@ export default class SliderButton extends (PureComponent || Component) {
|
|||
disabled={this.props.disabled}
|
||||
theme={this.props.theme}
|
||||
>
|
||||
<svg
|
||||
viewBox='0 0 24 24' preserveAspectRatio='xMidYMid meet'
|
||||
style={this.iconStyle()}
|
||||
>
|
||||
<g><path d={d} /></g>
|
||||
<svg viewBox='0 0 24 24' preserveAspectRatio='xMidYMid meet' style={this.iconStyle()}>
|
||||
<g>
|
||||
<path d={d} />
|
||||
</g>
|
||||
</svg>
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
switch (this.props.type) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user