Skip to content

Commit

Permalink
migrate to vite
Browse files Browse the repository at this point in the history
  • Loading branch information
RNR1 committed Dec 18, 2024
1 parent 1ad54b7 commit 7929eac
Show file tree
Hide file tree
Showing 244 changed files with 7,600 additions and 15,472 deletions.
34 changes: 33 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,33 @@
{
"extends": [
"eslint:recommended",
"airbnb",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:react-hooks/recommended",
"plugin:storybook/recommended",
"prettier"
],
"globals": { "google": "readonly" },
"rules": {
"react/prop-types": 0,
"no-console": 1,
"no-unused-vars": 0
"no-unused-vars": 0,
"no-param-reassign": 0,
"react/function-component-definition": [
2,
{
"namedComponents": "arrow-function",
"unnamedComponents": "arrow-function"
}
],
"react/jsx-props-no-spreading": [
2,
{
"explicitSpread": "ignore",
"exceptions": ["ContactInput", "ContactCheckbox", "TextField", "svg"]
}
]
},
"plugins": ["react", "import", "jsx-a11y"],
"parserOptions": {
Expand All @@ -25,7 +43,21 @@
"node": true,
"es2021": true
},
"overrides": [
{
"files": ["./src/stories/*.stories.js", "./vite.config.js"],
"rules": {
"import/no-extraneous-dependencies": [2, { "devDependencies": true }]
}
}
],
"settings": {
"import/resolver": {
"node": {
"moduleDirectory": ["node_modules", "src"],
"paths": ["src"]
}
},
"react": {
"version": "detect"
}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ resources/
.env

# testing
newrelic_agent.log
newrelic_agent.log
*storybook.log
20 changes: 14 additions & 6 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
module.exports = {
"stories": ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
"addons": ["@storybook/addon-links", "@storybook/addon-essentials", "@storybook/addon-interactions", "@storybook/preset-create-react-app"],
"framework": {
name: "@storybook/react-webpack5",
/** @type { import('@storybook/react-vite').StorybookConfig } */
const config = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-onboarding',
'@storybook/addon-links',
'@storybook/addon-essentials',
'@chromatic-com/storybook',
'@storybook/addon-interactions'
],
framework: {
name: '@storybook/react-vite',
options: {}
}
};
};
export default config;
16 changes: 10 additions & 6 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import withThemeProvider from './decorators/withThemeProvider';

export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/
/** @type { import('@storybook/react').Preview } */
const preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i
}
}
}
};

export const decorators = [withThemeProvider];

export default preview;
3 changes: 2 additions & 1 deletion .svgrrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"exportType": "default",
"prettierConfig": ".prettierrc",
"ref": true,
"titleProp": true
"titleProp": true,
"ext": "jsx"
}
Loading

0 comments on commit 7929eac

Please sign in to comment.