Skip to content

Commit d81fa07

Browse files
joaltorocjtoroc
andauthored
Feature/upgrade versions (#45)
* Upgrade Versions --------- Co-authored-by: John Toro <joaltoroc@creativecode.com.co>
1 parent c62d472 commit d81fa07

54 files changed

Lines changed: 8700 additions & 8531 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.js

Lines changed: 0 additions & 41 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ storybook-static
99
**/migration-storybook.log
1010
**/storybook.log
1111
*.env
12+
debug-storybook.log

.storybook/main.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1-
import path from 'path';
1+
// This file has been automatically migrated to valid ESM format by Storybook.
2+
import { fileURLToPath } from 'node:url';
3+
import path, { dirname } from 'path';
24
import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin';
35

46
import type { StorybookConfig } from '@storybook/react-webpack5';
57

8+
const __filename = fileURLToPath(import.meta.url);
9+
const __dirname = dirname(__filename);
10+
611
const config: StorybookConfig = {
712
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
813
addons: [
9-
'@storybook/addon-essentials',
10-
'@storybook/addon-interactions',
1114
'@storybook/addon-links',
1215
'@storybook/addon-webpack5-compiler-swc',
13-
'@chromatic-com/storybook'
16+
'@chromatic-com/storybook',
17+
'@storybook/addon-docs'
1418
],
1519
framework: {
1620
name: '@storybook/react-webpack5',

.storybook/manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { addons } from '@storybook/manager-api';
1+
import { addons } from 'storybook/manager-api';
22
import theme from './theme';
33

44
addons.setConfig({

.storybook/preview.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
import React from 'react';
2-
3-
import type { Preview } from '@storybook/react';
4-
import { themes } from '@storybook/theming';
1+
import type { Preview } from '@storybook/react-webpack5';
2+
import { themes } from 'storybook/theming';
53

64
import { CreativeCodeUIProvider } from '../lib';
75

.storybook/theme.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { create } from "@storybook/theming/create";
1+
import { create } from 'storybook/theming/create';
22

33
export default create({
4-
base: "light",
4+
base: 'light'
55
});

.vscode/settings.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,9 @@
1212
"testid",
1313
"theming",
1414
"usehooks"
15-
]
16-
}
15+
],
16+
"files.associations": {
17+
"*.css": "tailwindcss",
18+
"*.scss": "scss"
19+
}
20+
}

Changelog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
<!-- markdownlint-configure-file { "MD024": false } -->
2+
23
# Changelog
34

5+
## v1.0.0 - Update Libraries
6+
7+
### ☝🏻 Upgrade
8+
9+
- Upgrade libs
10+
- Adjust Tailwindcss
11+
412
## v0.64 - Fix chromatic
513

614
### 👾 Fix

README.md

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ yarn add @creativecodeco/ui
2525
### Dependencies
2626

2727
```bash
28-
npm install --save-dev tailwindcss postcss postcss-import autoprefixer usehooks-ts cssnano
28+
npm install --save-dev tailwindcss postcss usehooks-ts cssnano
2929

3030
or
3131

32-
yarn add -D tailwindcss postcss postcss-import autoprefixer usehooks-ts cssnano
32+
yarn add -D tailwindcss postcss usehooks-ts cssnano
3333
```
3434

3535
### Setting Tailwind
@@ -45,8 +45,8 @@ const themeConfig = {
4545
content: [
4646
...creativeCodeTheme.content,
4747
'./src/**/*.{js,jsx,ts,tsx}',
48-
'./app/**/*.{js,jsx,ts,tsx}',
49-
],
48+
'./app/**/*.{js,jsx,ts,tsx}'
49+
]
5050
};
5151

5252
export default themeConfig;
@@ -63,7 +63,7 @@ const themeConfig = {
6363
content: [
6464
...creativeCodeTheme.content,
6565
'./src/**/*.{js,jsx,ts,tsx}',
66-
'./app/**/*.{js,jsx,ts,tsx}',
66+
'./app/**/*.{js,jsx,ts,tsx}'
6767
],
6868
daisyui: {
6969
...creativeCodeTheme.daisyui,
@@ -75,11 +75,11 @@ const themeConfig = {
7575
secondary: '#427AA1',
7676
neutral: '#EBF2FA',
7777
accent: '#679436',
78-
other: '#A5BE00',
79-
},
80-
},
81-
],
82-
},
78+
other: '#A5BE00'
79+
}
80+
}
81+
]
82+
}
8383
};
8484

8585
export default themeConfig;
@@ -92,12 +92,8 @@ Create file `postcss.config.js` and add
9292
```js
9393
module.exports = {
9494
plugins: {
95-
'postcss-import': {},
96-
'tailwindcss/nesting': {},
97-
tailwindcss: {},
98-
autoprefixer: {},
99-
...(process.env.NODE_ENV === 'production' ? { cssnano: {} } : {}),
100-
},
95+
'@tailwindcss/postcss': {}
96+
}
10197
};
10298
```
10399

@@ -114,9 +110,7 @@ export default function RootLayout({ children }) {
114110
return (
115111
<html>
116112
<body>
117-
<CreativeCodeUIProvider>
118-
{children}
119-
</CreativeCodeUIProvider>
113+
<CreativeCodeUIProvider>{children}</CreativeCodeUIProvider>
120114
</body>
121115
</html>
122116
);

eslint.config.mjs

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
import globals from 'globals';
2+
import pluginJs from '@eslint/js';
3+
import tseslint from 'typescript-eslint';
4+
import pluginReact from 'eslint-plugin-react';
5+
import pluginUnusedImports from 'eslint-plugin-unused-imports';
6+
import pluginPrettier from 'eslint-plugin-prettier';
7+
import configPrettier from 'eslint-config-prettier';
8+
9+
/** @type {import('eslint').Linter.Config[]} */
10+
export default [
11+
{
12+
ignores: [
13+
'**/node_modules/*',
14+
'jest.config.js',
15+
'__tests__/**/*.test.tsx',
16+
'**.d.ts',
17+
'**.config.js',
18+
'**.config.ts',
19+
'lib/**',
20+
'coverage/**'
21+
]
22+
},
23+
pluginJs.configs.recommended,
24+
...tseslint.configs.recommended,
25+
{
26+
files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'],
27+
languageOptions: {
28+
ecmaVersion: 'latest',
29+
sourceType: 'module',
30+
globals: {
31+
...globals.browser,
32+
...globals.node,
33+
...globals.jest
34+
},
35+
parserOptions: {
36+
ecmaFeatures: {
37+
jsx: true
38+
}
39+
}
40+
},
41+
plugins: {
42+
react: pluginReact,
43+
'unused-imports': pluginUnusedImports,
44+
prettier: pluginPrettier
45+
},
46+
settings: {
47+
react: {
48+
version: 'detect'
49+
}
50+
},
51+
rules: {
52+
...configPrettier.rules,
53+
'prettier/prettier': 'error',
54+
semi: 'off',
55+
'@typescript-eslint/semi': 'off',
56+
'react-hooks/exhaustive-deps': 'off',
57+
'react/display-name': 'off',
58+
'react/react-in-jsx-scope': 'off',
59+
'@typescript-eslint/no-unused-vars': [
60+
'error',
61+
{
62+
argsIgnorePattern: '^_',
63+
varsIgnorePattern: '^_',
64+
caughtErrorsIgnorePattern: '^_'
65+
}
66+
]
67+
}
68+
}
69+
];

0 commit comments

Comments
 (0)