Skip to content

Commit

Permalink
Revert "chore: update infrastructure"
Browse files Browse the repository at this point in the history
This reverts commit 85a11b3.
  • Loading branch information
atanasster committed Apr 4, 2020
1 parent 85a11b3 commit f475d86
Show file tree
Hide file tree
Showing 32 changed files with 1,747 additions and 1,210 deletions.
45 changes: 0 additions & 45 deletions .eslintrc.js

This file was deleted.

3 changes: 1 addition & 2 deletions core/core/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
dist
*.test.ts
dist
3 changes: 3 additions & 0 deletions core/core/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: 'docz-ts',
}
1 change: 1 addition & 0 deletions core/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"cross-env": "^5.2.1",
"docz-rollup": "^2.1.0",
"eslint": "^6.5.1",
"eslint-config-docz-ts": "^2.1.0",
"jest": "^24.9.0"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion core/core/src/smartControls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const controlFromProps = (
}
value = cleanQuotes(value);
const isColor = name.toLowerCase().includes('color');
if (!value && propDef.type?.required) {
if (!value && propDef.required) {
value = isColor ? 'red' : 'example';
}
return {
Expand Down
2 changes: 1 addition & 1 deletion core/instrument/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dist
test/fixtures/
test/examples/
3 changes: 3 additions & 0 deletions core/instrument/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: 'docz-ts',
}
1 change: 1 addition & 0 deletions core/instrument/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"cross-env": "^5.2.1",
"docz-rollup": "^2.1.0",
"eslint": "^6.5.1",
"eslint-config-docz-ts": "^2.1.0",
"jest": "^24.9.0"
},
"browser": {
Expand Down
3 changes: 3 additions & 0 deletions core/loader/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: 'docz-ts',
}
1 change: 1 addition & 0 deletions core/loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"cross-env": "^5.2.1",
"docz-rollup": "^2.1.0",
"eslint": "^6.5.1",
"eslint-config-docz-ts": "^2.1.0",
"jest": "^24.9.0"
},
"jest": {
Expand Down
3 changes: 3 additions & 0 deletions core/specification/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: 'docz-ts',
}
1 change: 1 addition & 0 deletions core/specification/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"cross-env": "^5.2.1",
"docz-rollup": "^2.1.0",
"eslint": "^6.5.1",
"eslint-config-docz-ts": "^2.1.0",
"jest": "^24.9.0"
},
"publishConfig": {
Expand Down
3 changes: 3 additions & 0 deletions integrations/storybook/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: 'docz-ts',
}
8 changes: 4 additions & 4 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"lerna": "3.1.3",
"packages": [
"core/*",
"props-info/*",
"integrations/*",
"ui/*"
"core/**/*",
"props-info/**/*",
"integrations/**/*",
"ui/**/*"
],
"version": "0.6.0",
"npmClient": "yarn",
Expand Down
10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
"@types/node": "^12.6.8",
"@types/prettier": "^1.16.4",
"@typescript-eslint/parser": "^2.19.0",
"@typescript-eslint/eslint-plugin": "^1.12.0",
"all-contributors-cli": "^6.8.0",
"autoprefixer": "^9.7.4",
"babel-eslint": "^10.1.0",
Expand All @@ -62,10 +61,7 @@
"commitizen": "^3.1.2",
"cross-env": "^5.2.0",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-mdx": "^1.6.8",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react": "^7.18.3",
"husky": "^3.0.0",
"jest": "^24.8.0",
"lerna": "3.15.0",
Expand All @@ -74,12 +70,12 @@
"prettier": "^1.18.2",
"remark": "^11.0.2",
"remark-toc": "^7.0.0",
"rollup": "^1.17.0",
"rollup": "^1.31.0",
"trash-cli": "^3.0.0",
"ts-jest": "^24.0.2",
"ts-node": "^8.5.4",
"typedoc": "^0.17.0-3",
"typescript": "^3.8.3"
"typescript": "^3.7.5"
},
"workspaces": {
"packages": [
Expand Down
3 changes: 3 additions & 0 deletions props-info/react-docgen-typescript/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: 'docz-ts',
}
1 change: 1 addition & 0 deletions props-info/react-docgen-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"cross-env": "^5.2.1",
"docz-rollup": "^2.1.0",
"eslint": "^6.5.1",
"eslint-config-docz-ts": "^2.1.0",
"jest": "^24.9.0",
"typescript": "3.5.3"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const extractDocgenTypescriptInfo = (
},
componentNameResolver = computeComponentName,
shouldExtractLiteralValuesFromEnum = true,
savePropValueAsString = undefined,
savePropValueAsString,
} = reactDocGenTypescriptOptions || {};

const parserOptions: ParserOptions = {
Expand Down
5 changes: 1 addition & 4 deletions props-info/react-docgen-typescript/src/transform-props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ export const transformProps = (props: Props): PropTypes => {
prop.parentName = rdProp.parent?.name;
}
if (rdProp.defaultValue !== null && rdProp.defaultValue !== undefined) {
prop.defaultValue =
rdProp.defaultValue.value !== undefined
? rdProp.defaultValue.value
: rdProp.defaultValue;
prop.defaultValue = rdProp.defaultValue.value ?? rdProp.defaultValue;
}
const typeName = rdProp.type.name || '';
let propType: Partial<TypeInformation> = {};
Expand Down
3 changes: 3 additions & 0 deletions props-info/react-docgen/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: 'docz-ts',
}
1 change: 1 addition & 0 deletions props-info/react-docgen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"cross-env": "^5.2.1",
"docz-rollup": "^2.1.0",
"eslint": "^6.5.1",
"eslint-config-docz-ts": "^2.1.0",
"jest": "^24.9.0",
"prop-types": "^15.7.2",
"typescript": "3.5.3"
Expand Down
5 changes: 1 addition & 4 deletions props-info/react-docgen/src/transform-props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ const rdPropToCCProp = (rdProp: any): PropType => {
prop.description = rdProp.description;
}
if (rdProp.defaultValue !== null && rdProp.defaultValue !== undefined) {
prop.defaultValue =
rdProp.defaultValue.value !== undefined
? rdProp.defaultValue.value
: rdProp.defaultValue;
prop.defaultValue = rdProp.defaultValue.value ?? rdProp.defaultValue;
}
let type: Partial<TypeInformation> = {};
if (rdProp.type) {
Expand Down
3 changes: 3 additions & 0 deletions ui/blocks/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: 'docz-ts',
}
1 change: 1 addition & 0 deletions ui/blocks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"cross-env": "^5.2.1",
"docz-rollup": "^2.1.0",
"eslint": "^6.5.1",
"eslint-config-docz-ts": "^2.1.0",
"jest": "^24.9.0"
},
"peerDependencies": {
Expand Down
3 changes: 3 additions & 0 deletions ui/components/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: 'docz-ts',
}
1 change: 1 addition & 0 deletions ui/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"cross-env": "^5.2.1",
"docz-rollup": "^2.1.0",
"eslint": "^6.5.1",
"eslint-config-docz-ts": "^2.1.0",
"jest": "^24.9.0"
},
"peerDependencies": {
Expand Down
54 changes: 19 additions & 35 deletions ui/components/src/ActionBar/ActionBar.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
/** @jsx jsx */
import { FunctionComponent } from 'react';
import { transparentize } from 'polished';
import {
Theme,
Box,
Flex,
Button,
jsx,
useThemeUI,
SxStyleProp,
} from 'theme-ui';
import { Theme, Box, Flex, Button, jsx, useThemeUI } from 'theme-ui';
import { getSortedActions, ActionItems } from './utils';

export interface ActionBarProps {
Expand All @@ -25,32 +17,24 @@ const ActionColors = ({
}: {
theme: Theme;
disabled: boolean | undefined;
}) => {
const styles: SxStyleProp = {
color: disabled ? '#ddd' : 'background',
cursor: disabled ? 'not-allowed' : undefined,
px: 2,
py: 1,
lineHeight: 1,
borderRadius: 1,
display: 'inline-block',
};
if (theme.colors) {
styles.backgroundColor = transparentize(
0.15,
theme.colors['highlight'] as string,
);
styles.boxShadow = `${transparentize(
0.9,
theme.colors.text as string,
)} 0 1px 3px 1px, ${transparentize(
0.35,
theme.colors.text as string,
)} 0 0 0 1px`;
styles.border = `1px solid ${theme.colors['highlight'] as string}`;
}
return styles;
};
}) => ({
backgroundColor: transparentize(0.15, theme.colors?.['highlight'] as string),
color: disabled ? '#ddd' : 'background',
cursor: disabled ? 'not-allowed' : undefined,
px: 2,
py: 1,
lineHeight: 1,
borderRadius: 1,
display: 'inline-block',
boxShadow: `${transparentize(
0.9,
theme.colors?.text as string,
)} 0 1px 3px 1px, ${transparentize(
0.35,
theme.colors?.text as string,
)} 0 0 0 1px`,
border: `1px solid ${theme.colors?.['highlight'] as string}`,
});

/**
* a strip of actions to be attached to a container
Expand Down
4 changes: 2 additions & 2 deletions ui/components/src/ActionBar/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const getSortedActions = (actions: ActionItems): ActionItems =>
.filter(({ hidden }) => !hidden)
.reduce((acc: ActionItem[], item: ActionItem) => {
const accIndex = acc.findIndex(
accItem => (accItem.id || accItem.title) === (item.id || item.title),
accItem => (accItem.id ?? accItem.title) === (item.id ?? item.title),
);
if (accIndex > -1) {
acc[accIndex] = { ...acc[accIndex], ...item };
Expand All @@ -70,7 +70,7 @@ export const getSortedActions = (actions: ActionItems): ActionItems =>
({ order, ...item }, index) =>
({
...item,
order: order === undefined ? index : order,
order: order ?? index,
} as ActionItem),
)
.sort((a: ActionItem, b: ActionItem) => {
Expand Down
2 changes: 1 addition & 1 deletion ui/components/src/ActionContainer/ActionContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const ActionContainer: FC<ActionContainerProps> = ({
borderRadius: 4,
border: `1px solid ${transparentize(
0.9,
theme.colors ? theme.colors.text : 'black',
theme.colors?.text as string,
)}`,
'div:first-child, svg:first-child': {
paddingTop,
Expand Down
3 changes: 3 additions & 0 deletions ui/editors/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: 'docz-ts',
}
1 change: 1 addition & 0 deletions ui/editors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"cross-env": "^5.2.1",
"docz-rollup": "^2.1.0",
"eslint": "^6.5.1",
"eslint-config-docz-ts": "^2.1.0",
"jest": "^24.9.0"
},
"peerDependencies": {
Expand Down
Loading

0 comments on commit f475d86

Please sign in to comment.