Skip to content

Commit

Permalink
feat: 회원 인증 필요 여부 판단 메서드 구현 (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
Coalery authored Jan 30, 2025
2 parents 6ebf72c + 30da058 commit af2f140
Show file tree
Hide file tree
Showing 7 changed files with 383 additions and 9 deletions.
84 changes: 84 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import path from 'node:path';
import { fileURLToPath } from 'node:url';

import { FlatCompat } from '@eslint/eslintrc';
import js from '@eslint/js';
import typescriptEslintEslintPlugin from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
import simpleImportSort from 'eslint-plugin-simple-import-sort';
import globals from 'globals';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
{
ignores: ['**/eslint.*'],
},
...compat.extends(
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
),
{
plugins: {
'@typescript-eslint': typescriptEslintEslintPlugin,
'simple-import-sort': simpleImportSort,
},

languageOptions: {
globals: {
...globals.node,
...globals.jest,
},

parser: tsParser,
ecmaVersion: 5,
sourceType: 'module',

parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: '/Users/lery/khlug/sight-backend',
},
},

rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',

'prettier/prettier': [
'error',
{
endOfLine: 'auto',
},
],

'simple-import-sort/imports': [
'error',
{
groups: [
['^\\u0000'],
['^node:'],
['^@?\\w'],
['^@khlug/core'],
['^@khlug/\\w+/infra'],
['^@khlug/\\w+/interface'],
['^@khlug/\\w+/application'],
['^@khlug/\\w+/domain'],
['^@khlug'],
['^'],
['^\\.'],
],
},
],

'simple-import-sort/exports': 'error',
},
},
];
6 changes: 6 additions & 0 deletions jest/setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import dayjs from 'dayjs';
import timezone from 'dayjs/plugin/timezone';
import utc from 'dayjs/plugin/utc';

dayjs.extend(timezone);
dayjs.extend(utc);
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
"cookie-parser": "^1.4.7",
"dayjs": "^1.11.13",
"nestjs-cls": "^4.5.0",
"php-serialize": "^5.0.1",
"reflect-metadata": "^0.2.2",
Expand Down Expand Up @@ -85,6 +86,9 @@
"collectCoverageFrom": [
"**/*.(t|j)s"
],
"setupFiles": [
"../jest/setup.ts"
],
"coverageDirectory": "../coverage",
"testEnvironment": "node",
"moduleNameMapper": {
Expand Down
Loading

0 comments on commit af2f140

Please sign in to comment.