@hyeon/linter 7.1.3 → 7.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -16,6 +16,31 @@ export default [
16
16
  ]
17
17
  ```
18
18
 
19
+ ### NestJS
20
+
21
+ NestJS 프로젝트에서 데코레이터 관련 Prettier 오류를 해결하려면:
22
+
23
+ ```js
24
+ import hyeonLinter from '@hyeon/linter'
25
+
26
+ export default [
27
+ ...hyeonLinter.nestjs,
28
+ ...hyeonLinter.typescript,
29
+ ]
30
+ ```
31
+
32
+ 또는 직접 import:
33
+
34
+ ```js
35
+ import hyeonNestjsConfig from '@hyeon/linter/nestjs'
36
+ import hyeonTypescriptConfig from '@hyeon/linter/typescript'
37
+
38
+ export default [
39
+ ...hyeonNestjsConfig,
40
+ ...hyeonTypescriptConfig,
41
+ ]
42
+ ```
43
+
19
44
  ## vite
20
45
 
21
46
  uninstall
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyeon/linter",
3
- "version": "7.1.3",
3
+ "version": "7.2.0",
4
4
  "description": "Hansanghyun custom eslint settings",
5
5
  "main": "./src/index.mjs",
6
6
  "scripts": {
@@ -18,6 +18,7 @@
18
18
  "javascript",
19
19
  "react",
20
20
  "nextjs",
21
+ "nestjs",
21
22
  "typescript",
22
23
  "prettier"
23
24
  ],
@@ -35,7 +36,7 @@
35
36
  "eslint-plugin-react": "^7.37.2",
36
37
  "eslint-plugin-react-refresh": "^0.4.16",
37
38
  "prettier-plugin-tailwindcss": "^0.6.11",
38
- "typescript-eslint": "^8.17.0"
39
+ "typescript-eslint": "^8.26.0"
39
40
  },
40
41
  "peerDependencies": {
41
42
  "eslint": "^9.5.0",
@@ -53,6 +54,7 @@
53
54
  "./react": "./src/react.mjs",
54
55
  "./prettier": "./src/prettier.mjs",
55
56
  "./hansanghyeon": "./src/hansanghyeon.mjs",
57
+ "./nestjs": "./src/nestjs.mjs",
56
58
  "./package.json": "./package.json"
57
59
  },
58
60
  "files": [
@@ -64,5 +66,6 @@
64
66
  "publishConfig": {
65
67
  "registry": "https://registry.npmjs.org/",
66
68
  "access": "public"
67
- }
68
- }
69
+ },
70
+ "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
71
+ }
package/src/base.mjs CHANGED
File without changes
File without changes
package/src/index.mjs CHANGED
@@ -3,6 +3,7 @@ import hyeonEslintConfigPrettier from './prettier.mjs'
3
3
  import hyeonEslintConfigReact from './react.mjs'
4
4
  import hyeonEslintConfigTypescript from './typescript.mjs'
5
5
  import hyeonEslintConfigHansanghyeon from './hansanghyeon.mjs'
6
+ import hyeonEslintConfigNestjs from './nestjs.mjs'
6
7
 
7
8
  export default {
8
9
  recommended: hyeonEslintConfigBase,
@@ -10,4 +11,5 @@ export default {
10
11
  react: hyeonEslintConfigReact,
11
12
  typescript: hyeonEslintConfigTypescript,
12
13
  hansanghyeon: hyeonEslintConfigHansanghyeon,
14
+ nestjs: hyeonEslintConfigNestjs,
13
15
  }
package/src/nestjs.mjs ADDED
@@ -0,0 +1,71 @@
1
+ import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
2
+ import eslintConfigPrettier from "eslint-config-prettier";
3
+
4
+ export default [
5
+ eslintConfigPrettier,
6
+ {
7
+ ...eslintPluginPrettierRecommended,
8
+ rules: {
9
+ "prettier/prettier": ["error", {
10
+ trailingComma: "all",
11
+ singleQuote: true,
12
+ semi: false,
13
+ tabWidth: 2,
14
+ printWidth: 120,
15
+ arrowParens: "always",
16
+ jsxSingleQuote: false,
17
+ // NestJS 데코레이터 지원을 위한 설정
18
+ experimentalDecorators: true,
19
+ emitDecoratorMetadata: true,
20
+ "plugins": [
21
+ "@trivago/prettier-plugin-sort-imports",
22
+ "prettier-plugin-tailwindcss"
23
+ ],
24
+ "importOrder": [
25
+ "^@nestjs/(.*)$",
26
+ "^[^.](.*)$",
27
+ "^[.]{1,2}/.*$"
28
+ ],
29
+ "importOrderSeparation": true,
30
+ "importOrderSortSpecifiers": true,
31
+ // 데코레이터 관련 설정
32
+ "bracketSpacing": true,
33
+ "bracketSameLine": false,
34
+ }],
35
+ 'arrow-body-style': ['error', 'as-needed'],
36
+ 'prefer-arrow-callback': 'error',
37
+ curly: ['error', 'all'],
38
+ 'lines-around-comment': ['error', {
39
+ beforeBlockComment: true,
40
+ afterBlockComment: true,
41
+ beforeLineComment: true,
42
+ afterLineComment: true,
43
+ allowBlockStart: true,
44
+ allowBlockEnd: true,
45
+ allowObjectStart: true,
46
+ allowObjectEnd: true,
47
+ allowArrayStart: true,
48
+ allowArrayEnd: true,
49
+ // 데코레이터 위의 주석 허용
50
+ allowClassStart: true,
51
+ allowClassEnd: true,
52
+ }],
53
+ 'max-len': 'off',
54
+ 'no-confusing-arrow': ['error', {
55
+ allowParens: false,
56
+ }],
57
+ 'no-mixed-operators': 'error',
58
+ 'no-tabs': 'error',
59
+ quotes: ['error', 'single', {
60
+ avoidEscape: true,
61
+ allowTemplateLiterals: false,
62
+ }],
63
+ // NestJS 데코레이터 관련 규칙 완화
64
+ '@typescript-eslint/no-unused-vars': ['error', {
65
+ argsIgnorePattern: '^_',
66
+ varsIgnorePattern: '^_',
67
+ ignoreRestSiblings: true,
68
+ }],
69
+ },
70
+ },
71
+ ]
package/src/prettier.mjs CHANGED
@@ -21,6 +21,9 @@ export default [
21
21
  "importOrder": ["^[^.](.*)$", "^[.]{1,2}/.*$"],
22
22
  "importOrderSeparation": false,
23
23
  "importOrderSortSpecifiers": true,
24
+ // 데코레이터 지원을 위한 기본 설정
25
+ "bracketSpacing": true,
26
+ "bracketSameLine": false,
24
27
  }],
25
28
  'arrow-body-style': ['error', 'as-needed'],
26
29
  'prefer-arrow-callback': 'error',
package/src/react.mjs CHANGED
File without changes
File without changes