diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000..4cecb59 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +yarn lint-staged && git add -A diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx index 77a8c49..0081dea 100644 --- a/.storybook/preview.tsx +++ b/.storybook/preview.tsx @@ -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, + }), +] diff --git a/package.json b/package.json index 55d9363..440713f 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/vite.config.ts b/vite.config.ts index d29a0c2..dacfe76 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -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: {