Skip to content

Commit

Permalink
Update eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
usulpro committed Mar 21, 2021
1 parent 4a09750 commit be46997
Show file tree
Hide file tree
Showing 10 changed files with 549 additions and 374 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module.exports = {
sourceType: 'module',
},
env: {
browser: true,
es6: true,
node: true,
'jest/globals': true,
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,21 @@
"@usulpro/package-prepare": "^1.3.1",
"babel-eslint": "^10.0.2",
"babel-loader": "^8.2.2",
"eslint": "^6.8.0",
"eslint": "^7.22.0",
"eslint-config-airbnb": "^18.1.0",
"eslint-config-prettier": "^6.10.1",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-import": "^2.7.0",
"eslint-plugin-jest": "^23.8.2",
"eslint-plugin-jest": "^24.3.2",
"eslint-plugin-json": "^2.1.1",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.1.0",
"nodemon": "^1.18.9",
"nodemon": "^2.0.7",
"prettier": "^2.0.2",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-scripts": "3.0.1",
"relative-deps": "^1.0.1",
"relative-deps": "^1.0.7",
"storybook-dark-mode": "^1.0.7"
},
"peerDependencies": {
Expand Down
10 changes: 4 additions & 6 deletions src/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ export const setCurrent = (store, ind) => ({
currentTheme: ind,
});

export const selectValue = (store, { name, namespace, type }) => {
return {
...store,
selectedValue: { name, namespace, type },
};
};
export const selectValue = (store, { name, namespace, type }) => ({
...store,
selectedValue: { name, namespace, type },
});

export const updateTheme = (store, ind, newTheme) => {
const { themesList } = store;
Expand Down
4 changes: 1 addition & 3 deletions src/manager/UI/Caption.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import React from 'react';
import * as styled from './Caption.styled';

const Caption = ({ children }) => {
return <styled.Heading>{children}</styled.Heading>;
};
const Caption = ({ children }) => <styled.Heading>{children}</styled.Heading>;

export default Caption;
4 changes: 1 addition & 3 deletions src/manager/UI/Text.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ const Span = styled.span`
margin-left: 10px;
`;

const Text = ({ children }) => {
return <Span>{children}</Span>;
};
const Text = ({ children }) => <Span>{children}</Span>;

export default Text;
6 changes: 3 additions & 3 deletions src/manager/UI/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React from 'react';

import * as styled from './Toolbar.styled';

const Toolbar = ({ children, footer }) => {
return <styled.Container footer={footer}>{children}</styled.Container>;
};
const Toolbar = ({ children, footer }) => (
<styled.Container footer={footer}>{children}</styled.Container>
);

export default Toolbar;
5 changes: 2 additions & 3 deletions src/manager/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const AddonThemingPanel = ({
selectValue,
changeSelectedColor,
isFirstDataReceived,
}) => {
return isFirstDataReceived ? (
}) =>
isFirstDataReceived ? (
<Layout name="adk-tmp">
<SelectTheme
themeInfoList={themeInfoList}
Expand All @@ -47,7 +47,6 @@ const AddonThemingPanel = ({
) : (
<p>Waiting for data</p>
);
};

register(
{
Expand Down
4 changes: 2 additions & 2 deletions src/preset/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export function config(entry = []) {
// return [...entry, require.resolve("./preview")]
return [...entry]
return [...entry];
}

export function managerEntries(entry = []) {
return [...entry, require.resolve("../manager/register")]
return [...entry, require.resolve('../manager/register')];
}
2 changes: 1 addition & 1 deletion src/preset/preview.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { withThemes } from "../preview";
import { withThemes } from '../preview';

export const decorators = [withThemes];
Loading

0 comments on commit be46997

Please sign in to comment.