Skip to content

Commit

Permalink
Infra 2024 part 2 (#36)
Browse files Browse the repository at this point in the history
* Updated workflow actions

* Updated aliases for tsconfig

* Updated chartjs and added storybooks for popup components

* Added i18n

* Fixed usage of any

* Resturctured components. Added stories for pages

* Added de,it,ru translations

* Updated deps

* Removed pre-commit msg

* Fixed types
  • Loading branch information
PsychoSanchez authored Nov 8, 2024
1 parent 5f3ded3 commit 441225a
Show file tree
Hide file tree
Showing 86 changed files with 2,521 additions and 1,004 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/webpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-latest
name: Lint code
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 23

Expand All @@ -27,10 +27,10 @@ jobs:
runs-on: ubuntu-latest
name: Run tests
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 23

Expand All @@ -44,10 +44,10 @@ jobs:
name: Build production
needs: [lint, test]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 23

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,4 @@ dist

.vscode
*storybook.log
.DS_Store
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g')
[ -z "$FILES" ] && exit 0

Expand Down
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
"importOrder": [
"<THIRD_PARTY_MODULES>",
"^@shared/(.*)$",
"^@popup/(.*)$",
"^@background/(.*)$",
"^@content/(.*)$",
"^@dashboard/(.*)$",
"^[./]"
],
"importOrderSeparation": true
Expand Down
9 changes: 8 additions & 1 deletion .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@ const config: StorybookConfig = {
'@storybook/addon-webpack5-compiler-swc',
'@storybook/addon-essentials',
'@storybook/addon-styling-webpack',
'@storybook/addon-themes',
],
framework: {
name: '@storybook/react-webpack5',
options: {},
},
webpackFinal: async (config) => {
env(config) {
return {
...config,
ENV: 'storybook',
};
},
webpackFinal: (config) => {
// eslint-disable-next-line @typescript-eslint/no-require-imports
const path = require('path');
// eslint-disable-next-line @typescript-eslint/no-require-imports
Expand Down
11 changes: 11 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import type { Preview } from '@storybook/react';

import '!style-loader!css-loader!postcss-loader!../src/tailwind.css';

import { withThemeByClassName } from "@storybook/addon-themes";

const preview: Preview = {
parameters: {
controls: {
Expand All @@ -11,6 +13,15 @@ const preview: Preview = {
},
},
},

decorators: [withThemeByClassName({
themes: {
// nameOfTheme: 'classNameForTheme',
light: '',
dark: 'dark',
},
defaultTheme: 'light',
})]
};

export default preview;
3 changes: 1 addition & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ export default [
'react/prop-types': 'off',
'react/display-name': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-explicit-any': 'off',

'@typescript-eslint/no-explicit-any': ['warn', { ignoreRestArgs: true }],
'@typescript-eslint/no-unused-vars': [
'error',
{
Expand Down
Loading

0 comments on commit 441225a

Please sign in to comment.