Skip to content

Commit

Permalink
Merge branch 'main' into BackEnd
Browse files Browse the repository at this point in the history
  • Loading branch information
happyhyep committed Nov 6, 2024
2 parents 1ff807e + 465f8bb commit 2750dfb
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 41 deletions.
82 changes: 44 additions & 38 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
// Airbnb ์Šคํƒ€์ผ ๊ฐ€์ด๋“œ๋ฅผ ๊ธฐ๋ฐ˜์œผ๋กœ ESLint ์„ค์ •์„ ESM(ECMAScript Module) ๋ฐฉ์‹์œผ๋กœ ๊ตฌ์„ฑํ•œ ํŒŒ์ผ์ž…๋‹ˆ๋‹ค.
import { FlatCompat } from "@eslint/eslintrc";
import airbnbBase from "eslint-config-airbnb-base";
import airbnbReact from "eslint-config-airbnb";
import importPlugin from "eslint-plugin-import";
import reactPlugin from "eslint-plugin-react";
import jsxA11yPlugin from "eslint-plugin-jsx-a11y";
import prettierPlugin from "eslint-plugin-prettier";
import prettierConfig from "eslint-config-prettier";
import { FlatCompat } from '@eslint/eslintrc';
import airbnbBase from 'eslint-config-airbnb-base';
import airbnbReact from 'eslint-config-airbnb';
import importPlugin from 'eslint-plugin-import';
import reactPlugin from 'eslint-plugin-react';
import jsxA11yPlugin from 'eslint-plugin-jsx-a11y';
import prettierPlugin from 'eslint-plugin-prettier';
import prettierConfig from 'eslint-config-prettier';
// eslint-disable-next-line import/no-unresolved
import typescriptPlugin from "@typescript-eslint/eslint-plugin";
import typescriptPlugin from '@typescript-eslint/eslint-plugin';
// eslint-disable-next-line import/no-unresolved
import typescriptParser from "@typescript-eslint/parser";
import storybook from "eslint-plugin-storybook";
import path from "path";
import { fileURLToPath } from "url";
import typescriptParser from '@typescript-eslint/parser';
import storybook from 'eslint-plugin-storybook';
import path from 'path';
import { fileURLToPath } from 'url';

// eslint-disable-next-line no-underscore-dangle
const __dirname = path.dirname(fileURLToPath(import.meta.url));
Expand Down Expand Up @@ -47,11 +47,9 @@ export default [
prettier: prettierPlugin,
},
rules: {
'import/no-extraneous-dependencies': ['error', {
"packageDir": ["./", "./backend", "./frontend"]
}],
'import/no-extraneous-dependencies': 'off',
'import/prefer-default-export': 'off',
'import/no-default-export': 'warn',
'import/no-default-export': 'error',
'prettier/prettier': 'error',
'no-underscore-dangle': 'warn',
'no-undef': 'off',
Expand All @@ -75,13 +73,41 @@ export default [
},
},

{
files: [
'**/*.stories.*', // ๋ชจ๋“  ์Šคํ† ๋ฆฌ ํŒŒ์ผ
'**/.storybook/**/*.*', // .storybook ํด๋” ๋‚ด ๋ชจ๋“  ํŒŒ์ผ
'**/eslint.config.mjs', // eslint ์„ค์ • ํŒŒ์ผ
'**/*.test.{js,ts,tsx}', // ํ…Œ์ŠคํŠธ ํŒŒ์ผ
'**/*.spec.{js,ts,tsx}', // ์ŠคํŽ™ ํŒŒ์ผ
'**/webpack.config.{js,ts}', // Webpack ์„ค์ • ํŒŒ์ผ
'**/jest.setup.{js,ts}', // Jest ์„ค์ • ํŒŒ์ผ
'**/vite.config.{js,ts}', // Vite ์„ค์ • ํŒŒ์ผ
'**/*.tsdoc.{js,ts}', // TSDoc ๊ด€๋ จ ํŒŒ์ผ
'**/*.jsdoc.{js,ts}', // JSDoc ๊ด€๋ จ ํŒŒ์ผ
'**/*.vitest.{js,ts}', // Vitest ๊ด€๋ จ ํŒŒ์ผ
'**/swagger.config.{js,ts}', // Swagger ์„ค์ • ํŒŒ์ผ
'**/*.swagger.{js,ts}', // Swagger ๊ด€๋ จ ํŒŒ์ผ
'**/*.config.*', // Swagger ๊ด€๋ จ ํŒŒ์ผ
],
rules: {
'import/no-extraneous-dependencies': 'off', // ํ•ด๋‹น ํŒŒ์ผ์—์„œ ๊ทœ์น™ ๋น„ํ™œ์„ฑํ™”
'import/no-default-export': 'off', // ํ•ด๋‹น ํŒŒ์ผ์—์„œ ๊ทœ์น™ ๋น„ํ™œ์„ฑํ™”
},
},

// 2. backend ์„ค์ • - JavaScript ์ „์šฉ ๊ทœ์น™ ์ ์šฉ
{
files: ['backend/**/*.js'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {
'import/prefer-default-export': 'off',
'import/no-unresolved': 'warn',
'no-console': 'off', // ๋ฐฑ์•ค๋“œ์—์„œ๋Š” console ์‚ฌ์šฉ ํ—ˆ์šฉ
},
},

// 3. frontend ์„ค์ • - React ๋ฐ TypeScript ์ „์šฉ ๊ทœ์น™ ์ ์šฉ
Expand Down Expand Up @@ -143,6 +169,7 @@ export default [
'react/require-default-props': 'off',
'react/jsx-props-no-spreading': 'warn',
'react/no-unescaped-entities': 'off',
'import/no-unresolved': 'error',
},
},

Expand All @@ -152,25 +179,4 @@ export default [
'no-console': 'off', // ํ…Œ์ŠคํŠธ ํŒŒ์ผ์—์„œ๋Š” console ์‚ฌ์šฉ ํ—ˆ์šฉ
},
},

{
files: [
'**/*.stories.*', // ๋ชจ๋“  ์Šคํ† ๋ฆฌ ํŒŒ์ผ
'**/.storybook/**/*.*', // .storybook ํด๋” ๋‚ด ๋ชจ๋“  ํŒŒ์ผ
'**/eslint.config.mjs', // eslint ์„ค์ • ํŒŒ์ผ
'**/*.test.{js,ts,tsx}', // ํ…Œ์ŠคํŠธ ํŒŒ์ผ
'**/*.spec.{js,ts,tsx}', // ์ŠคํŽ™ ํŒŒ์ผ
'**/webpack.config.{js,ts}', // Webpack ์„ค์ • ํŒŒ์ผ
'**/jest.setup.{js,ts}', // Jest ์„ค์ • ํŒŒ์ผ
'**/vite.config.{js,ts}', // Vite ์„ค์ • ํŒŒ์ผ
'**/*.tsdoc.{js,ts}', // TSDoc ๊ด€๋ จ ํŒŒ์ผ
'**/*.jsdoc.{js,ts}', // JSDoc ๊ด€๋ จ ํŒŒ์ผ
'**/*.vitest.{js,ts}', // Vitest ๊ด€๋ จ ํŒŒ์ผ
'**/swagger.config.{js,ts}', // Swagger ์„ค์ • ํŒŒ์ผ
'**/*.swagger.{js,ts}', // Swagger ๊ด€๋ จ ํŒŒ์ผ
],
rules: {
'import/no-extraneous-dependencies': 'off', // ํ•ด๋‹น ํŒŒ์ผ์—์„œ ๊ทœ์น™ ๋น„ํ™œ์„ฑํ™”
},
},
];
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2750dfb

Please sign in to comment.