Skip to content

Commit

Permalink
merge: eslint, prettier, husky 적용 (#8)
Browse files Browse the repository at this point in the history
merge: eslint, prettier, husky 적용 (#8)
  • Loading branch information
d0422 authored May 16, 2024
2 parents db516b0 + c56e2d5 commit 2e1ad15
Show file tree
Hide file tree
Showing 29 changed files with 2,646 additions and 275 deletions.
25 changes: 25 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
plugins: ['unused-imports'],
env: {
jest: true,
browser: true,
node: true,
},
extends: [
'eslint:recommended',
'plugin:react-hooks/recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
ignorePatterns: ['node_modules/', 'dist/', '.storybook/', '.github', 'storybook-static/', 'rollup.config.js'],
parser: '@typescript-eslint/parser',
rules: {
'react-hooks/exhaustive-deps': 'off',
// forwardRef에서 displayName문제해결을 위해
'react/display-name': 'off',
},
settings: {
react: { version: 'detect' },
},
};
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules/
/dist
build-storybook.log
storybook-static
storybook-static
/coverage
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run test && npx lint-staged
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "all",
"printWidth": 140,
"endOfLine": "auto"
}
18 changes: 9 additions & 9 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import type { StorybookConfig } from "@storybook/react-vite";
import type { StorybookConfig } from '@storybook/react-vite';

const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
"@storybook/addon-onboarding",
"@storybook/addon-links",
"@storybook/addon-essentials",
"@chromatic-com/storybook",
"@storybook/addon-interactions",
'@storybook/addon-onboarding',
'@storybook/addon-links',
'@storybook/addon-essentials',
'@chromatic-com/storybook',
'@storybook/addon-interactions',
],
framework: {
name: "@storybook/react-vite",
name: '@storybook/react-vite',
options: {},
},
docs: {
autodocs: "tag",
autodocs: 'tag',
},
};
export default config;
2 changes: 1 addition & 1 deletion .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Preview } from "@storybook/react";
import type { Preview } from '@storybook/react';

const preview: Preview = {
parameters: {
Expand Down
Loading

0 comments on commit 2e1ad15

Please sign in to comment.