Skip to content

Commit

Permalink
fix: idk, remove storysource to fix eslint-loader errors
Browse files Browse the repository at this point in the history
  • Loading branch information
shrugs committed Jul 11, 2020
1 parent 46d17f9 commit 3b3452e
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 76 deletions.
17 changes: 17 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": [
"react-app",
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/react",
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
"rules": {
"react/prop-types": 0,
"prettier/prettier": 2,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/explicit-member-accessibility": 0
}
}
4 changes: 3 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"semi": true,
"trailingComma": "all",
"singleQuote": true
"singleQuote": true,
"printWidth": 100,
"tabWidth": 2
}
21 changes: 10 additions & 11 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,19 @@ module.exports = {
'@storybook/addon-actions',
'@storybook/addon-links',
'@storybook/addon-a11y/register',
'@storybook/addon-storysource',
'@storybook/addon-viewport/register'
'@storybook/addon-viewport/register',
],
webpackFinal: (config) => {
config.module.rules.push({
test: /\.css$/,
use: [
{
loader: 'postcss-loader',
options: { sourceMap: true }
}
]
})
test: /\.css$/,
use: [
{
loader: 'postcss-loader',
options: { sourceMap: true },
},
],
});

return config;
}
},
};
7 changes: 3 additions & 4 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import React from 'react'
import { addDecorator, addParameters } from '@storybook/react';
import React from 'react';
import { addDecorator } from '@storybook/react';
import { withKnobs } from '@storybook/addon-knobs';
import { withA11y } from '@storybook/addon-a11y';
import { withInfo } from '@storybook/addon-info';

import Layout from './Layout';

addDecorator(story => <Layout>{story()}</Layout>)
addDecorator((story) => <Layout>{story()}</Layout>);
addDecorator(withKnobs);
addDecorator(withA11y);
addDecorator(withInfo);
addParameters({ info: { inline: true, header: false } })
22 changes: 2 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"start": "start-storybook -p 9009 -s public --ci",
"build": "build-storybook -s public",
"test": "react-scripts test",
"eject": "react-scripts eject"
"eject": "react-scripts eject",
"lint": "eslint 'src/**/*.{js,jsx,ts,tsx,json,mdx}'"
},
"lint-staged": {
"src/**/*.{js,jsx,ts,tsx,json,mdx}": [
Expand All @@ -25,24 +26,6 @@
"react-scripts": "3.4.1",
"typescript": "~3.7.2"
},
"eslintConfig": {
"extends": [
"react-app",
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/@typescript-eslint",
"prettier/react",
"plugin:react/recommended",
"plugin:prettier/recommended"
],
"rules": {
"react/prop-types": 0,
"prettier/prettier": 2,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/explicit-member-accessibility": 0
}
},
"browserslist": {
"production": [
">0.2%",
Expand All @@ -61,7 +44,6 @@
"@storybook/addon-info": "^5.3.19",
"@storybook/addon-knobs": "^5.3.19",
"@storybook/addon-links": "^5.3.19",
"@storybook/addon-storysource": "^5.3.19",
"@storybook/addon-viewport": "^5.3.19",
"@storybook/addons": "^5.3.19",
"@storybook/preset-create-react-app": "^3.1.3",
Expand Down
40 changes: 0 additions & 40 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1663,25 +1663,6 @@
qs "^6.6.0"
ts-dedent "^1.1.0"

"@storybook/addon-storysource@^5.3.19":
version "5.3.19"
resolved "https://registry.yarnpkg.com/@storybook/addon-storysource/-/addon-storysource-5.3.19.tgz#ae693e88db5d220cb256a9ef4a2366c300e8d88c"
integrity sha512-W7mIAHuxYT+b1huaHCHLkBAh2MbeWmF8CxeBCFiOgZaYYQUTDEh018HJF8u2AqiWSouRhcfzhTnGxOo0hNRBgw==
dependencies:
"@storybook/addons" "5.3.19"
"@storybook/components" "5.3.19"
"@storybook/router" "5.3.19"
"@storybook/source-loader" "5.3.19"
"@storybook/theming" "5.3.19"
core-js "^3.0.1"
estraverse "^4.2.0"
loader-utils "^1.2.3"
prettier "^1.16.4"
prop-types "^15.7.2"
react-syntax-highlighter "^11.0.2"
regenerator-runtime "^0.13.3"
util-deprecate "^1.0.2"

"@storybook/addon-viewport@^5.3.19":
version "5.3.19"
resolved "https://registry.yarnpkg.com/@storybook/addon-viewport/-/addon-viewport-5.3.19.tgz#adeaae497d943d2b740109d9f7a6ccd27a512cde"
Expand Down Expand Up @@ -1972,22 +1953,6 @@
qs "^6.6.0"
util-deprecate "^1.0.2"

"@storybook/[email protected]":
version "5.3.19"
resolved "https://registry.yarnpkg.com/@storybook/source-loader/-/source-loader-5.3.19.tgz#ff0a00731c24c61721d8b9d84152f8542913a3b7"
integrity sha512-srSZRPgEOUse8nRVnlazweB2QGp63mPqM0uofg8zYARyaYSOzkC155ymdeiHsmiBTS3X3I0FQE4+KnwiH7iLtw==
dependencies:
"@storybook/addons" "5.3.19"
"@storybook/client-logger" "5.3.19"
"@storybook/csf" "0.0.1"
core-js "^3.0.1"
estraverse "^4.2.0"
global "^4.3.2"
loader-utils "^1.2.3"
prettier "^1.16.4"
prop-types "^15.7.2"
regenerator-runtime "^0.13.3"

"@storybook/[email protected]":
version "5.3.19"
resolved "https://registry.yarnpkg.com/@storybook/theming/-/theming-5.3.19.tgz#177d9819bd64f7a1a6ea2f1920ffa5baf9a5f467"
Expand Down Expand Up @@ -11037,11 +11002,6 @@ prettier-linter-helpers@^1.0.0:
dependencies:
fast-diff "^1.1.2"

prettier@^1.16.4:
version "1.19.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==

prettier@^2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4"
Expand Down

0 comments on commit 3b3452e

Please sign in to comment.