Skip to content

Commit

Permalink
chore: Update ESLint and Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
sapegin committed Oct 20, 2020
1 parent e0e7043 commit 804e314
Show file tree
Hide file tree
Showing 49 changed files with 1,471 additions and 978 deletions.
8 changes: 4 additions & 4 deletions docs/Configuration.md
Expand Up @@ -181,7 +181,7 @@ Function that returns functions used to process the discovered components and ge
```javascript
module.exports = {
handlers: componentPath =>
handlers: (componentPath) =>
require('react-docgen').defaultHandlers.concat(
(documentation, path) => {
// Calculate a display name for components based upon the declared class name.
Expand Down Expand Up @@ -235,7 +235,7 @@ module.exports = {
// Suppress messages
info: () => {},
// Override display function
warn: message => console.warn(`NOOOOOO: ${message}`)
warn: (message) => console.warn(`NOOOOOO: ${message}`)
}
}
```
Expand Down Expand Up @@ -513,7 +513,7 @@ To disable sorting, use the identity function:

```javascript
module.exports = {
sortProps: props => props
sortProps: (props) => props
}
```

Expand Down Expand Up @@ -559,7 +559,7 @@ See examples in the [cookbook](Cookbook.md#how-to-change-styles-of-a-style-guide
```javascript
module.exports = {
styles: function(theme) {
styles: function (theme) {
return {
Logo: {
logo: {
Expand Down
6 changes: 3 additions & 3 deletions docs/Cookbook.md
Expand Up @@ -13,8 +13,8 @@ let textarea
</Button>
<Textarea
value={value}
onChange={e => setValue(e.target.value)}
ref={ref => (textarea = ref)}
onChange={(e) => setValue(e.target.value)}
ref={(ref) => (textarea = ref)}
/>
</div>
```
Expand Down Expand Up @@ -286,7 +286,7 @@ Check out the [themed example](https://github.com/styleguidist/react-styleguidis

```javascript
module.exports = {
styles: function(theme) {
styles: function (theme) {
return {
Logo: {
logo: {
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/src/components/Button/Button.js
Expand Up @@ -33,7 +33,7 @@ Button.propTypes = {
Button.defaultProps = {
color: '#333',
size: 'normal',
onClick: event => {
onClick: (event) => {
// eslint-disable-next-line no-console
console.log('You have clicked me!', event.target);
},
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/src/components/CounterButton/Readme.md
Expand Up @@ -2,7 +2,7 @@
import Button from '../Button'
let ref
;<div>
<CounterButton ref={r => (ref = r)} />
<CounterButton ref={(r) => (ref = r)} />
<Button size="small" onClick={() => ref.set(0)}>
Reset
</Button>
Expand Down
Expand Up @@ -66,7 +66,7 @@ WrappedButton.sizes = {
large: '18px',
};

const Decorator = Composed =>
const Decorator = (Composed) =>
class MyHOC extends Component {
render() {
return <Composed {...this.props} />;
Expand Down
Expand Up @@ -7,7 +7,7 @@ export default class CustomEndpoint extends Component {

handleInvokeEndpoint = () => {
fetch('http://localhost:6060/custom', { method: 'GET' })
.then(responseObj => responseObj.json())
.then((responseObj) => responseObj.json())
.then(({ response } = {}) => this.setState({ response, error: null }))
.catch(() =>
this.setState({
Expand Down
Expand Up @@ -34,7 +34,7 @@ WrappedButton.sizes = {
large: '18px',
};

const Decorator = Composed =>
const Decorator = (Composed) =>
class MyHOC extends Component {
render() {
return <Composed {...this.props} />;
Expand Down
2 changes: 1 addition & 1 deletion examples/react-native/babel.config.js
@@ -1,4 +1,4 @@
module.exports = function(api) {
module.exports = function (api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
Expand Down
2 changes: 1 addition & 1 deletion examples/sections/docs/One.md
Expand Up @@ -58,7 +58,7 @@ function eatFood(food) {
return ['No food']
}

return food.map(dish => `No ${dish.toLowerCase()}`)
return food.map((dish) => `No ${dish.toLowerCase()}`)
}

const food = ['Pizza', 'Buger', 'Coffee']
Expand Down
@@ -1,7 +1,7 @@
import React from 'react';
import Button from '../Button';

const dummyWrapper = WrappedComponent => props => <WrappedComponent {...props} />;
const dummyWrapper = (WrappedComponent) => (props) => <WrappedComponent {...props} />;

/**
* A button wrapped by a Decorator/Enhancer
Expand Down
2 changes: 1 addition & 1 deletion examples/sections/styleguide.config.js
Expand Up @@ -70,7 +70,7 @@ module.exports = {
},
],
require: [path.join(__dirname, 'src/styles.css')],
webpackConfig: env => ({
webpackConfig: (env) => ({
module: {
rules: [
{
Expand Down
2 changes: 1 addition & 1 deletion examples/themed/src/Components/Button/Button.js
Expand Up @@ -33,7 +33,7 @@ Button.propTypes = {
Button.defaultProps = {
color: '#333',
size: 'normal',
onClick: event => {
onClick: (event) => {
// eslint-disable-next-line no-console
console.log('You have clicked me!', event.target);
},
Expand Down
2 changes: 1 addition & 1 deletion examples/themed/src/Components/CounterButton/Readme.md
Expand Up @@ -2,7 +2,7 @@
import Button from '../Button'
let ref
;<div>
<CounterButton ref={r => (ref = r)} />
<CounterButton ref={(r) => (ref = r)} />
<Button size="small" onClick={() => ref.set(0)}>
Reset
</Button>
Expand Down

0 comments on commit 804e314

Please sign in to comment.