Skip to content

Commit

Permalink
Remove rebass, update components and stories
Browse files Browse the repository at this point in the history
  • Loading branch information
majakomel committed Jun 22, 2023
1 parent 558758a commit 8ba9d46
Show file tree
Hide file tree
Showing 84 changed files with 8,129 additions and 10,015 deletions.
17 changes: 15 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react", "@babel/preset-typescript"]
}
"sourceType": "unambiguous",
"presets": [
[
"@babel/preset-env",
{
"targets": {
"chrome": 100
}
}
],
"@babel/preset-typescript",
"@babel/preset-react"
],
"plugins": ["babel-plugin-styled-components"]
}
44 changes: 22 additions & 22 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,21 @@
"plugin:prettier/recommended",
"plugin:react/jsx-runtime"
],
"plugins": [
"@typescript-eslint", "react", "prettier"
],
"plugins": ["@typescript-eslint", "react", "prettier"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"ecmaVersion": 2018,
"ecmaVersion": "latest",
"sourceType": "module",
"project": "./tsconfig.json"
},
"ignorePatterns": ["*.svg", "*.ttf", "*.woff", "*.eot", "*.md"],
"rules": {
"quotes": [
"error",
"single"
],
"semi": [
"error",
"never"
],
"quotes": ["error", "single"],
"semi": ["error", "never"],
"prettier/prettier": [
"error",
{
Expand All @@ -43,28 +35,36 @@
"arrowParens": "always"
}
],
"react/prop-types": ["warn"],
"react/prop-types": ["off"],
"no-undef": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "off",
"no-console": "warn",
"import/no-unresolved": 0,
"react/jsx-filename-extension": [1, {
"extensions": [
".ts",
".tsx"
]
}],
"import/extensions": ["error", "never", {"svg": "always", "ts": "always", "tsx": "always", "json": "always"}],
"react/jsx-filename-extension": [
1,
{
"extensions": [".ts", ".tsx"]
}
],
"import/extensions": [
"error",
"never",
{ "svg": "always", "ts": "always", "tsx": "always", "json": "always" }
],
"no-use-before-define": ["error", { "variables": false }],
"@typescript-eslint/no-use-before-define": ["error", { "variables": false }],
"@typescript-eslint/no-use-before-define": [
"error",
{ "variables": false }
],
"no-empty-function": "warn",
"@typescript-eslint/no-empty-function": ["warn"],
"dot-notation": "warn",
"react/jsx-props-no-spreading": "off",
"import/no-extraneous-dependencies": "off",
"react/no-array-index-key": "off",
"react/function-component-definition": "off",
"react/default-props-match-prop-types": "off"
"react/default-props-match-prop-types": "off",
"react/require-default-props": [0]
}
}
13 changes: 0 additions & 13 deletions .storybook/main.js

This file was deleted.

35 changes: 35 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import type { StorybookConfig } from '@storybook/react-webpack5'
const config: StorybookConfig = {
stories: ['../stories/**/*.mdx', '../stories/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-styling',
'@storybook/addon-interactions',
'@storybook/addon-mdx-gfm',
],
framework: {
name: '@storybook/react-webpack5',
options: {},
},
docs: {
autodocs: 'tag',
},
// webpackFinal: async (config) => {
// const assetRule = config.module.rules.find(({ test }) => test.test('.svg'))

// const assetLoader = {
// loader: assetRule.loader,
// options: assetRule.options || assetRule.query,
// }

// // Merge our rule with existing assetLoader rules
// config.module.rules.unshift({
// test: /\.svg$/,
// use: ['@svgr/webpack', assetLoader],
// })

// return config
// },
}
export default config
9 changes: 0 additions & 9 deletions .storybook/preview.js

This file was deleted.

31 changes: 31 additions & 0 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import React from 'react'
import type { Preview } from '@storybook/react'
import { ThemeProvider } from 'styled-components'
import theme from '../src/theme/theme'

const preview: Preview = {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
},
decorators: [
(Story) => (
<ThemeProvider theme={theme}>
{/* <link
rel="preload"
href="../fonts/FiraSans-Regular.woff"
as="font"
type="font/woff2"
/> */}
<Story />
</ThemeProvider>
),
],
}

export default preview
14 changes: 4 additions & 10 deletions icons/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"jsx": "react",
"module": "ESNext",
"declaration": true,
"declarationDir": "src/types/icons",
"declarationDir": "types",
"sourceMap": true,
"outDir": "dist",
"moduleResolution": "node",
Expand All @@ -15,12 +15,6 @@
"forceConsistentCasingInFileNames": true,
"allowJs": true
},
"include": [
"../src/components/icons",
"../src/types/svg.d.ts"
],
"exclude": [
"../dist",
"../node_modules",
],
}
"include": ["../src/components/icons", "../src/types/svg.d.ts"],
"exclude": ["../dist", "../node_modules"]
}
Loading

0 comments on commit 8ba9d46

Please sign in to comment.