@hyeon/linter 7.3.1 → 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.1",
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",
@@ -70,4 +71,4 @@
70
71
  "access": "public"
71
72
  },
72
73
  "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
73
- }
74
+ }
package/src/nestjs.mjs CHANGED
@@ -1,18 +1,20 @@
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
- import tseslint from 'typescript-eslint';
4
5
 
5
- export default [
6
+ export default tseslint.config(
7
+ js.configs.recommended,
8
+ ...tseslint.configs.recommended,
6
9
  eslintConfigPrettier,
10
+ eslintPluginPrettierRecommended,
7
11
  {
8
- ...eslintPluginPrettierRecommended,
9
12
  files: ['**/*.ts', '**/*.tsx'],
10
13
  languageOptions: {
11
14
  parser: tseslint.parser,
12
15
  parserOptions: {
13
16
  ecmaVersion: 'latest',
14
17
  sourceType: 'module',
15
- project: true,
16
18
  ecmaFeatures: {
17
19
  decorators: true,
18
20
  },
@@ -27,36 +29,32 @@ export default [
27
29
  printWidth: 120,
28
30
  arrowParens: "always",
29
31
  jsxSingleQuote: false,
30
- "plugins": [
32
+ bracketSpacing: true,
33
+ plugins: [
31
34
  "@trivago/prettier-plugin-sort-imports",
32
35
  "prettier-plugin-tailwindcss"
33
36
  ],
34
- "importOrder": [
37
+ importOrder: [
35
38
  "^@nestjs/(.*)$",
39
+ "^@(.*)$",
36
40
  "^[^.](.*)$",
37
41
  "^[.]{1,2}/.*$"
38
42
  ],
39
- "importOrderSeparation": true,
40
- "importOrderSortSpecifiers": true,
41
- // 데코레이터 관련 설정
42
- "bracketSpacing": true,
43
- "bracketSameLine": false,
44
- // TypeScript 파일에 대한 parser 설정
45
- "overrides": [
46
- {
47
- "files": "*.ts",
48
- "options": {
49
- "parser": "typescript"
50
- }
51
- },
52
- {
53
- "files": "*.tsx",
54
- "options": {
55
- "parser": "typescript"
56
- }
57
- }
58
- ]
43
+ importOrderSeparation: true,
44
+ importOrderSortSpecifiers: true,
45
+ }],
46
+ // TypeScript 관련 규칙
47
+ '@typescript-eslint/no-unused-vars': ['error', {
48
+ argsIgnorePattern: '^_',
49
+ varsIgnorePattern: '^_',
50
+ ignoreRestSiblings: true,
59
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 규칙
60
58
  'arrow-body-style': ['error', 'as-needed'],
61
59
  'prefer-arrow-callback': 'error',
62
60
  curly: ['error', 'all'],
@@ -71,7 +69,6 @@ export default [
71
69
  allowObjectEnd: true,
72
70
  allowArrayStart: true,
73
71
  allowArrayEnd: true,
74
- // 데코레이터 위의 주석 허용
75
72
  allowClassStart: true,
76
73
  allowClassEnd: true,
77
74
  }],
@@ -85,12 +82,6 @@ export default [
85
82
  avoidEscape: true,
86
83
  allowTemplateLiterals: false,
87
84
  }],
88
- // NestJS 데코레이터 관련 규칙 완화
89
- '@typescript-eslint/no-unused-vars': ['error', {
90
- argsIgnorePattern: '^_',
91
- varsIgnorePattern: '^_',
92
- ignoreRestSiblings: true,
93
- }],
94
85
  },
95
86
  },
96
- ]
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',