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

build: add husky pre-commit hook and update linting scripts #35

Merged
merged 3 commits into from
Jul 17, 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
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint-staged && git add -A
17 changes: 9 additions & 8 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import theme from '../src/theme/theme'

export const decorators = [
withThemeFromJSXProvider({
themes: {
light: theme,
dark: theme,
},
defaultTheme: 'light',
Provider: ThemeProvider,
GlobalStyles: CssBaseline,
})];
themes: {
light: theme,
dark: theme,
},
defaultTheme: 'light',
Provider: ThemeProvider,
GlobalStyles: CssBaseline,
}),
]
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
"test:ci": "NODE_ENV=test jest --ci --all --coverage --colors --maxWorkers=100%",
"ci": "run-p 'lint:js' 'lint:other' 'test:ci'",
"lint": "run-p 'lint:js' 'lint:other'",
"lint:js": "eslint ./ --ext ts,tsx,js,jsx,cjs -c .eslintrc.cjs --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint --color --report-unused-disable-directives",
"lint:js": "prettier --check '**/*.{ts,tsx,js,jsx,cjs}' --ignore-path .gitignore --ignore-path .prettierignore",
"lint:other": "prettier --check '**/*.{json,md,yaml,yml}' --ignore-path .gitignore --ignore-path .prettierignore",
"fix": "run-p 'fix:**'",
"fix:js": "yarn run lint:js --fix",
"fix:js": "yarn run lint:js --write",
"fix:other": "yarn run lint:other --write",
"semantic-release": "semantic-release",
"postinstall": "yarn run prepare",
Expand Down
4 changes: 2 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import sass from 'sass'
export default defineConfig({
define: {
'process.env': {},
/* eslint-disable prettier/prettier */
// prettier-ignore
global: ({}),
// prettier-ignore
_global: ({}),
/* eslint-enable prettier/prettier */
},
resolve: {
alias: {
Expand Down
Loading