Skip to content

Commit

Permalink
⬆️ update emotion and fix updates side-effect
Browse files Browse the repository at this point in the history
  • Loading branch information
Yago committed Dec 8, 2020
1 parent dc44e18 commit de30425
Show file tree
Hide file tree
Showing 15 changed files with 271 additions and 223 deletions.
4 changes: 2 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@typescript-eslint/no-unused-vars": [
"error",
{
"varsIgnorePattern": "React|tw|css"
"varsIgnorePattern": "React|tw|css|jsx"
}
],
"arrow-body-style": [
Expand Down Expand Up @@ -158,7 +158,7 @@
"react/no-array-index-key": 0,
"react/no-unescaped-entities": 0,
"react/require-default-props": 0,
"simple-import-sort/sort": [
"simple-import-sort/imports": [
"error",
{
"groups": [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"cypress:run": "cypress run",
"jest:start": "jest --watchAll",
"jest:run": "jest",
"start": "cd playground && node_modules/.bin/next start",
"start": "cd playground && node_modules/.bin/next dev",
"storybook:start": "NODE_PATH=playground/src start-storybook -p 6006",
"storybook:build": "NODE_PATH=playground/src build-storybook"
},
Expand Down
2 changes: 1 addition & 1 deletion playground/.babelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"presets": ["next/babel"],
"presets": ["next/babel", "@emotion/babel-preset-css-prop"],
"plugins": [
"babel-plugin-macros"
]
Expand Down
1 change: 1 addition & 0 deletions playground/babel-plugin-macros.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ module.exports = {
format: 'auto',
hasSuggestions: true,
debug: false,
allowStyleProp: true,
},
};
1 change: 1 addition & 0 deletions playground/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="@emotion/react/types/css-prop" />
4 changes: 3 additions & 1 deletion playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
"type-check": "tsc"
},
"dependencies": {
"@emotion/core": "^11.0.0",
"@emotion/babel-preset-css-prop": "^11.0.0",
"@emotion/react": "^11.1.2",
"@emotion/styled": "^11.0.0",
"next": "10.0.3",
"postcss": "^8.2.0",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"tailwindcss": "^2.0.1",
Expand Down
2 changes: 1 addition & 1 deletion playground/src/components/Blank/Blank.styles.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { css } from '@emotion/core';
import { css } from '@emotion/react';
import tw from 'twin.macro';

export default css`
Expand Down
3 changes: 1 addition & 2 deletions playground/src/components/Blank/Blank.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/** @jsx jsx */
import React from 'react';
import { jsx } from '@emotion/core';
import { jsx } from '@emotion/react';
import tw from 'twin.macro';

import styles from './Blank.styles';
Expand Down
7 changes: 3 additions & 4 deletions playground/src/components/Counter/Counter.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
/** @jsx jsx */
import React, { useState } from 'react';
import { jsx } from '@emotion/core';
import { jsx } from '@emotion/react';
import tw from 'twin.macro';

import { add, subtract } from 'utils';

export interface CounterProps {
export type CounterProps = {
count: number;
}
};

const Counter = ({ count: defaultCount }: CounterProps): JSX.Element => {
const [count, setCount] = useState(defaultCount);
Expand Down
4 changes: 2 additions & 2 deletions playground/src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { ReactType } from 'react';
import React, { FunctionComponent } from 'react';

import '../styles/base.css';

interface AppProps {
Component: ReactType;
Component: FunctionComponent;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
pageProps: any;
}
Expand Down
3 changes: 1 addition & 2 deletions playground/src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/** @jsx jsx */
import React from 'react';
import { jsx } from '@emotion/core';
import { jsx } from '@emotion/react';
import tw from 'twin.macro';

import Counter from 'components/Counter';
Expand Down

0 comments on commit de30425

Please sign in to comment.