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
114 changes: 60 additions & 54 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,55 +1,61 @@
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended",
"plugin:prettier/recommended"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"babelOptions": {
"presets": ["@babel/preset-react"]
},
"ecmaVersion": 2018,
"sourceType": "module",
"requireConfigFile": false
},
"parser": "@babel/eslint-parser",
"settings": {
"react": {
"version": "detect"
}
},
"plugins": ["react", "prettier"],
"rules": {
"react/prop-types": [
2,
{
"skipUndeclared": true
}
],
"prettier/prettier": [
"error",
{
"printWidth": 100,
"tabWidth": 2,
"useTabs": true,
"singleQuote": true,
"trailingComma": "es5",
"endOfLine": "lf"
}
],
"react/jsx-uses-react": "error"
},
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
}
}
"env": {
"browser": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended",
"plugin:prettier/recommended",
"plugin:storybook/recommended"
],
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"babelOptions": {
"presets": [
"@babel/preset-react"
]
},
"ecmaVersion": 2018,
"sourceType": "module",
"requireConfigFile": false
},
"parser": "@babel/eslint-parser",
"settings": {
"react": {
"version": "detect"
}
},
"plugins": [
"react",
"prettier"
],
"rules": {
"react/prop-types": [
2,
{
"skipUndeclared": true
}
],
"prettier/prettier": [
"error",
{
"printWidth": 100,
"tabWidth": 2,
"useTabs": true,
"singleQuote": true,
"trailingComma": "es5",
"endOfLine": "lf"
}
],
"react/jsx-uses-react": "error"
},
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
}
}
2 changes: 1 addition & 1 deletion .storybook/body-class.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
var body = document.body;
body.classList.add("sui-2-12-24");
body.classList.add('sui-2-12-25');
27 changes: 11 additions & 16 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@ import { dirname, join } from 'path';
const path = require('path');

module.exports = {
stories: ['../packages/**/*.stories.jsx'],
stories: ['../packages/**/*.stories.jsx'],

addons: [
getAbsolutePath('@storybook/addon-links'),
getAbsolutePath('@storybook/addon-actions'),
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('@storybook/addon-a11y'),
getAbsolutePath('@storybook/addon-webpack5-compiler-babel'),
getAbsolutePath('@chromatic-com/storybook'),
],
addons: [
getAbsolutePath('@storybook/addon-links'),
getAbsolutePath('@storybook/addon-a11y'),
getAbsolutePath('@storybook/addon-webpack5-compiler-babel'),
getAbsolutePath('@chromatic-com/storybook'),
getAbsolutePath("@storybook/addon-docs")
],

webpackFinal: async (config) => {
webpackFinal: async (config) => {
// Change the order of resolution of main fields.
config.resolve.mainFields = ['src', 'module', 'main'];

Expand All @@ -25,14 +24,10 @@ module.exports = {
return config;
},

framework: {
framework: {
name: getAbsolutePath('@storybook/react-webpack5'),
options: {},
},

docs: {
autodocs: true,
},
}
};

function getAbsolutePath(value) {
Expand Down
4 changes: 2 additions & 2 deletions .storybook/manager.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { addons } from '@storybook/manager-api';
import { create } from '@storybook/theming/create';
import { addons } from 'storybook/manager-api';
import { create } from 'storybook/theming/create';

const customTheme = create({
base: 'light',
Expand Down
Loading
Loading