Skip to content

Commit

Permalink
Merge pull request #9843 from storybookjs/fix/deepscan-issues
Browse files Browse the repository at this point in the history
FIX more deepscan issues
  • Loading branch information
ndelangen authored Feb 13, 2020
2 parents f7fdd76 + 2d94eac commit a0f5b9c
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 33 deletions.
2 changes: 1 addition & 1 deletion addons/cssresources/src/css-resource-panel.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Component, Fragment } from 'react';
import React, { Component } from 'react';
import { SyntaxHighlighter, Placeholder, Spaced, Icons } from '@storybook/components';
import { STORY_RENDERED } from '@storybook/core-events';
import { API } from '@storybook/api';
Expand Down
8 changes: 2 additions & 6 deletions addons/jest/src/components/Message.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Fragment } from 'react';
import React, { Fragment, FunctionComponent } from 'react';
import { styled } from '@storybook/theming';

const positiveConsoleRegex = /\[32m(.*?)\[39m/;
Expand Down Expand Up @@ -51,10 +51,6 @@ const StatusColor = styled.strong<{ status: string }>(({ status, theme }) => ({
fontWeight: 500,
}));

const Main = styled(({ msg, className }) => <section className={className}>{msg}</section>)({
padding: 5,
});

const colorizeText: (msg: string, type: string) => MsgElement[] = (msg: string, type: string) => {
if (type) {
return msg
Expand Down Expand Up @@ -148,7 +144,7 @@ interface MessageProps {
msg: string;
}

export const Message = (props: any) => {
export const Message: FunctionComponent<MessageProps> = props => {
const { msg } = props;

const detail: TestDetail = getTestDetail(msg);
Expand Down
2 changes: 1 addition & 1 deletion addons/jest/src/components/Result.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Component, Fragment, useState } from 'react';
import React, { Fragment, useState } from 'react';
import { styled, themes, convert } from '@storybook/theming';
import { Icons } from '@storybook/components';
import Message from './Message';
Expand Down
2 changes: 1 addition & 1 deletion examples/ember-cli/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { addParameters, addDecorator } from '@storybook/ember';
import { addParameters } from '@storybook/ember';
import { setJSONDoc } from '@storybook/addon-docs/ember';
// eslint-disable-next-line import/no-unresolved
import docJson from '../ember-output/storybook-docgen/index.json';
Expand Down
2 changes: 1 addition & 1 deletion examples/html-kitchen-sink/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { addParameters, addDecorator } from '@storybook/html';
import { addParameters } from '@storybook/html';

addParameters({
a11y: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import m from 'mithril';

import { action } from '@storybook/addon-actions';
import { linkTo } from '@storybook/addon-links';

import Button from '../Button';

Expand Down
9 changes: 1 addition & 8 deletions examples/official-storybook/stories/addon-actions.stories.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
import { window, File } from 'global';
import React, { Fragment } from 'react';
import {
action,
actions,
configureActions,
decorate,
decorateAction,
} from '@storybook/addon-actions';
import { action, actions, configureActions, decorate } from '@storybook/addon-actions';
import { Form } from '@storybook/components';

const { Button } = Form;

const pickNative = decorate([args => [args[0].nativeEvent]]);
const pickNativeAction = decorateAction([args => [args[0].nativeEvent]]);

export default {
title: 'Addons/Actions',
Expand Down
2 changes: 1 addition & 1 deletion examples/vue-kitchen-sink/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { addParameters, addDecorator } from '@storybook/vue';
import { addParameters } from '@storybook/vue';
import Vue from 'vue';
import Vuex from 'vuex';

Expand Down
9 changes: 2 additions & 7 deletions examples/web-components-kitchen-sink/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/* global window */

import {
configure,
addParameters,
addDecorator,
setCustomElements,
} from '@storybook/web-components';
import { configure, addParameters, setCustomElements } from '@storybook/web-components';

import customElements from '../custom-elements.json';

Expand All @@ -26,7 +21,7 @@ addParameters({

// configure(require.context('../stories', true, /\.stories\.(js|mdx)$/), module);

// force full reload to not reregister web components
// force full reload to not re-register web components
const req = require.context('../stories', true, /\.stories\.(js|mdx)$/);
configure(req, module);
if (module.hot) {
Expand Down
2 changes: 1 addition & 1 deletion lib/components/src/Button/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { FunctionComponent, forwardRef } from 'react';
import React, { forwardRef } from 'react';
import { styled } from '@storybook/theming';
import { darken, lighten, rgba, transparentize } from 'polished';

Expand Down
2 changes: 1 addition & 1 deletion lib/components/src/blocks/EmptyBlock.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { FunctionComponent } from 'react';
import React from 'react';
import { styled } from '@storybook/theming';
import { transparentize } from 'polished';
import { withReset } from '../typography/shared';
Expand Down
2 changes: 1 addition & 1 deletion lib/components/src/tooltip/TooltipLinkList.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { FunctionComponent, Key, ReactNode } from 'react';
import React, { FunctionComponent } from 'react';
import { styled } from '@storybook/theming';

import ListItem, { LinkWrapperType, ListItemProps } from './ListItem';
Expand Down
2 changes: 0 additions & 2 deletions lib/theming/src/tests/create.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { create } from '../create';
import darkThemeVars from '../themes/dark';
import lightThemeVars from '../themes/light';

describe('create base', () => {
it('should create a theme with minimal viable theme', () => {
Expand Down
2 changes: 1 addition & 1 deletion scripts/reset.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from 'fs';
import { spawn, exec } from 'child_process';
import { spawn } from 'child_process';
import trash from 'trash';
import del from 'del';

Expand Down

0 comments on commit a0f5b9c

Please sign in to comment.