@hyeon/linter 7.3.2 → 7.3.3

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
@@ -18,29 +18,30 @@ export default [
18
18
 
19
19
  ### NestJS
20
20
 
21
- NestJS 프로젝트에서 데코레이터 관련 Prettier 오류를 해결하려면:
21
+ NestJS 프로젝트에서 데코레이터를 포함한 모든 TypeScript 문법을 지원:
22
22
 
23
23
  ```js
24
+ // eslint.config.js
24
25
  import hyeonLinter from '@hyeon/linter'
25
26
 
26
27
  export default [
27
28
  ...hyeonLinter.nestjs,
28
- ...hyeonLinter.typescript,
29
29
  ]
30
30
  ```
31
31
 
32
32
  또는 직접 import:
33
33
 
34
34
  ```js
35
+ // eslint.config.js
35
36
  import hyeonNestjsConfig from '@hyeon/linter/nestjs'
36
- import hyeonTypescriptConfig from '@hyeon/linter/typescript'
37
37
 
38
38
  export default [
39
39
  ...hyeonNestjsConfig,
40
- ...hyeonTypescriptConfig,
41
40
  ]
42
41
  ```
43
42
 
43
+ **주의**: NestJS 설정은 TypeScript 설정을 이미 포함하고 있으므로, `typescript` 설정을 별도로 추가할 필요가 없습니다.
44
+
44
45
  ## vite
45
46
 
46
47
  uninstall
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyeon/linter",
3
- "version": "7.3.2",
3
+ "version": "7.3.3",
4
4
  "description": "Hansanghyun custom eslint settings",
5
5
  "main": "./src/index.mjs",
6
6
  "scripts": {
@@ -29,6 +29,7 @@
29
29
  },
30
30
  "homepage": "https://github.com/hansanghyeon/linter#readme",
31
31
  "dependencies": {
32
+ "@eslint/js": "^9.5.0",
32
33
  "@trivago/prettier-plugin-sort-imports": "^5.2.2",
33
34
  "eslint-config-prettier": "^10.1.5",
34
35
  "eslint-plugin-import": "^2.31.0",
package/src/nestjs.mjs CHANGED
@@ -1,11 +1,25 @@
1
+ import js from '@eslint/js';
2
+ import tseslint from 'typescript-eslint';
1
3
  import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
2
4
  import eslintConfigPrettier from "eslint-config-prettier";
3
5
 
4
- export default [
6
+ export default tseslint.config(
7
+ js.configs.recommended,
8
+ ...tseslint.configs.recommended,
5
9
  eslintConfigPrettier,
6
10
  eslintPluginPrettierRecommended,
7
11
  {
8
12
  files: ['**/*.ts', '**/*.tsx'],
13
+ languageOptions: {
14
+ parser: tseslint.parser,
15
+ parserOptions: {
16
+ ecmaVersion: 'latest',
17
+ sourceType: 'module',
18
+ ecmaFeatures: {
19
+ decorators: true,
20
+ },
21
+ },
22
+ },
9
23
  rules: {
10
24
  "prettier/prettier": ["error", {
11
25
  trailingComma: "all",
@@ -29,6 +43,18 @@ export default [
29
43
  importOrderSeparation: true,
30
44
  importOrderSortSpecifiers: true,
31
45
  }],
46
+ // TypeScript 관련 규칙
47
+ '@typescript-eslint/no-unused-vars': ['error', {
48
+ argsIgnorePattern: '^_',
49
+ varsIgnorePattern: '^_',
50
+ ignoreRestSiblings: true,
51
+ }],
52
+ '@typescript-eslint/explicit-function-return-type': 'off',
53
+ '@typescript-eslint/explicit-module-boundary-types': 'off',
54
+ '@typescript-eslint/no-explicit-any': 'off',
55
+ '@typescript-eslint/interface-name-prefix': 'off',
56
+ '@typescript-eslint/no-non-null-assertion': 'off',
57
+ // 일반 ESLint 규칙
32
58
  'arrow-body-style': ['error', 'as-needed'],
33
59
  'prefer-arrow-callback': 'error',
34
60
  curly: ['error', 'all'],
@@ -58,4 +84,4 @@ export default [
58
84
  }],
59
85
  },
60
86
  },
61
- ]
87
+ );
package/src/prettier.mjs CHANGED
@@ -21,9 +21,6 @@ export default [
21
21
  "importOrder": ["^[^.](.*)$", "^[.]{1,2}/.*$"],
22
22
  "importOrderSeparation": false,
23
23
  "importOrderSortSpecifiers": true,
24
- // 데코레이터 지원을 위한 기본 설정
25
- "bracketSpacing": true,
26
- "bracketSameLine": false,
27
24
  }],
28
25
  'arrow-body-style': ['error', 'as-needed'],
29
26
  'prefer-arrow-callback': 'error',