Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
const error = 2;
const warn = 1; // eslint-disable-line no-unused-vars
const off = 0;

module.exports = {
root: true,
extends: ['airbnb', 'plugin:jest/recommended', 'prettier', 'prettier/react'],
extends: ['plugin:jest/recommended', 'prettier', 'plugin:import/recommended'],
parser: 'babel-eslint',
env: {
es6: true,
Expand All @@ -30,10 +26,9 @@ module.exports = {
project: './tsconfig.json',
},
rules: {
'import/extensions': off, // [warn, { ts: 'never', tsx: 'never' }],
'import/no-default-export': error,
'import/prefer-default-export': off,
'react/jsx-filename-extension': off,
'import/extensions': 'off', // [warn, { ts: 'never', tsx: 'never' }],
'import/no-default-export': 'error',
'import/prefer-default-export': 'off',
},
settings: {
'import/parsers': {
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 14.x
- id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
Expand All @@ -34,7 +34,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 14.x
- id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
Expand All @@ -54,7 +54,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node: [10]
node: [14]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
Expand Down
6 changes: 2 additions & 4 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ const withTests = {
],
};

const modules = process.env.BABEL_ESM === 'true' ? false : 'auto';

module.exports = {
presets: [
[
Expand All @@ -27,8 +25,8 @@ module.exports = {
shippedProposals: true,
useBuiltIns: 'usage',
corejs: '3',
targets: 'defaults',
modules,
targets: { node: 'current' },
modules: 'auto',
},
],
'@babel/preset-typescript',
Expand Down
7 changes: 0 additions & 7 deletions example/.storybook/main.js

This file was deleted.

14 changes: 14 additions & 0 deletions example/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { StorybookConfig } from '@storybook/html-webpack5';

export default {
stories: [
'../stories/**/*.stories.mdx',
'../stories/**/*.stories.@(js|jsx|ts|tsx)',
],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'../../', // the addon we're actually interested in seeing if it works
],
framework: '@storybook/html-webpack5',
} as StorybookConfig;
File renamed without changes.
29 changes: 16 additions & 13 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
{
"name": "example",
"version": "1.0.0",
"main": "index.js",
"author": "Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
"license": "MIT",
"devDependencies": {
"@babel/core": "^7.12.10",
"@storybook/addon-actions": "^6.1.14",
"@storybook/addon-essentials": "^6.1.14",
"@storybook/addon-links": "^6.1.14",
"@storybook/html": "^6.1.14",
"babel-loader": "^8.2.2"
},
"dependencies": {},
"author": "Blaine Bublitz <blaine.bublitz@gmail.com> (https://github.com/phated)",
"main": "index.js",
"scripts": {
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
"build-storybook": "storybook build",
"storybook": "storybook dev -p 6006"
},
"devDependencies": {
"@babel/core": "^7.18.6",
"@storybook/addon-actions": "7.0.0-alpha.12",
"@storybook/addon-essentials": "7.0.0-alpha.12",
"@storybook/addon-links": "7.0.0-alpha.12",
"@storybook/html": "7.0.0-alpha.12",
"@storybook/html-webpack5": "7.0.0-alpha.12",
"react": "^17.0.0",
"react-dom": "^17.0.0",
"storybook": "7.0.0-alpha.12",
"typescript": "^4.1.3"
}
}
17 changes: 17 additions & 0 deletions example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist",
"types": ["webpack-env"],
"declaration": true,
"downlevelIteration": true,
"esModuleInterop": true,
"lib": ["esnext"],
"skipLibCheck": true,
"sourceMap": true,
"strict": true,
"target": "es5"
},
"include": ["stories/**/*", ".storybook/*"],
"exclude": ["*.test.js"]
}
Loading