Skip to content

Commit

Permalink
Config: #3 prettier, eslint 설정 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Seok93 committed May 18, 2024
1 parent 433c275 commit 08f9707
Show file tree
Hide file tree
Showing 4 changed files with 1,314 additions and 21 deletions.
64 changes: 54 additions & 10 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,18 +1,62 @@
const vitest = require('eslint-plugin-vitest');

module.exports = {
root: true,
env: { browser: true, es2020: true },
env: { browser: true, node: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'airbnb',
'airbnb/hooks',
'airbnb-typescript',
'plugin:testing-library/react',
'plugin:vitest/recommended',
'prettier',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
plugins: ['react-refresh', 'react', 'react-hooks', '@typescript-eslint', 'jest-dom', 'testing-library', 'vitest'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
'arrow-body-style': 'off',
'consistent-return': 'off',
'object-curly-newline': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'no-unused-vars': 'warn',
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'react/require-default-props': 'off',
'react-hooks/exhaustive-deps': 'warn',
'import/prefer-default-export': 'warn',
'import/no-extraneous-dependencies': 'off',
'import/extensions': 'off',
'jsx-a11y/no-noninteractive-element-interactions': 'warn',
'vitest/valid-title': 'off',
},
ignorePatterns: [
'dist',
'build',
'node_modules',
'public',
'.history',
'.eslintrc.cjs',
'yarn.lock',
'postcss.config.js',
'tailwind.config.js',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
project: './tsconfig.json',
},
globals: {
...vitest.environments.env.globals,
},
settings: {
react: {
version: 'detect',
},
},
}
};
17 changes: 17 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Ignore artifacts:
build
coverage
dist
package.json
package-lock.json
yarn.lock
README.md
.history

# Ignore all files:
**/*.html
**/.git
**/.svn
**/.hg
**/node_modules
**/.github
13 changes: 13 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"printWidth": 120,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"jsxSingleQuote": false,
"trailingComma": "all",
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "always",
"endOfLine": "lf"
}
Loading

0 comments on commit 08f9707

Please sign in to comment.