Skip to content

Commit

Permalink
env : husky ์„ค์ • (#7)
Browse files Browse the repository at this point in the history
* env : husky ์„ค์ •

* test :  husky ํ…Œ์ŠคํŠธ
  • Loading branch information
HelloWook authored Oct 22, 2024
1 parent b22a98b commit 10a1a87
Show file tree
Hide file tree
Showing 13 changed files with 1,558 additions and 107 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

56 changes: 0 additions & 56 deletions .eslintrc

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
node_modules
.eslintcache
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
yarn run format
yarn run lint
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
src/stories/**
src/stories/**
**/*stories*
6 changes: 3 additions & 3 deletions .vscode/stories.tsx.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"",
"export const Default: Story = {",
" args: {},",
"};"
"};",
],
"description": "Storybook Template"
}
"description": "Storybook Template",
},
}
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

8 changes: 2 additions & 6 deletions bable.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
module.exports = {
presets: [
"@babel/preset-react",
"@babel/preset-env",
"@babel/preset-typescript",
],
};
presets: ['@babel/preset-react', '@babel/preset-env', '@babel/preset-typescript'],
}
65 changes: 65 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import { FlatCompat } from '@eslint/eslintrc'

const compat = new FlatCompat({
baseDirectory: process.cwd(),
})

export default [
{
ignores: ['**/*stories*', '**/webpack*.js', '**/webpack/**/*.js', 'src/stories/**'],
},
...compat.config({
env: {
browser: true,
es2021: true,
},
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'prettier', '@emotion'],
extends: [
'airbnb',
'airbnb/hooks',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:prettier/recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
rules: {
'prettier/prettier': 'error',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
'@typescript-eslint/no-require-imports': 'off',
'global-require': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'react/react-in-jsx-scope': 'off',
'react/jsx-filename-extension': [1, { extensions: ['.jsx', '.tsx'] }],
'import/extensions': ['error', 'ignorePackages', { js: 'never', jsx: 'never', ts: 'never', tsx: 'never' }],
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
'react/function-component-definition': [
'error',
{
namedComponents: 'arrow-function',
unnamedComponents: 'arrow-function',
},
],
},
overrides: [
{
files: ['webpack.*.js'],
rules: {
'@typescript-eslint/no-require-imports': 'off',
'global-require': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'import/order': 'off',
},
},
],
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
}),
]
21 changes: 20 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"dependencies": {
"@tanstack/react-query": "^5.59.0",
"@tanstack/react-query-devtools": "^5.59.0",
"husky": "^9.1.6",
"init": "^0.1.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand All @@ -16,6 +17,9 @@
"@babel/preset-react": "^7.25.7",
"@babel/preset-typescript": "^7.25.7",
"@chromatic-com/storybook": "1.9.0",
"@emotion/eslint-plugin": "^11.12.0",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.13.0",
"@storybook/addon-essentials": "^8.3.0",
"@storybook/addon-interactions": "^8.3.0",
"@storybook/addon-links": "^8.3.0",
Expand All @@ -27,11 +31,23 @@
"@storybook/test": "^8.3.0",
"@types/react": "^18.3.11",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^8.11.0",
"@typescript-eslint/parser": "^8.11.0",
"babel-loader": "^9.2.1",
"clean-webpack-plugin": "^4.0.0",
"copy-webpack-plugin": "^12.0.2",
"dotenv": "^16.4.5",
"eslint": "^9.13.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsx-a11y": "^6.10.1",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.1",
"eslint-plugin-react-hooks": "^5.0.0",
"html-webpack-plugin": "^5.6.0",
"husky": "^8.0.0",
"prettier": "^3.3.3",
"ts-loader": "^9.5.1",
"typescript": "^5.6.2",
"webpack": "^5.95.0",
Expand All @@ -43,6 +59,9 @@
"build": "webpack --mode=production --progress",
"start": "webpack --mode=development --progress",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
"build-storybook": "storybook build",
"prepare": "husky",
"format": "prettier --cache --write .",
"lint": "eslint --cache ."
}
}
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
Expand Down
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const App: React.FC = () => {
return <div>hello world!!!!!</div>
return <div>hello world!!!!!!</div>
}

export default App
Loading

0 comments on commit 10a1a87

Please sign in to comment.