Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infra 2024 part 2 #36

Merged
merged 10 commits into from
Nov 8, 2024
Merged
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
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
Loading