@hyeon/linter 7.3.3 → 7.3.5
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 +3 -14
- package/package.json +1 -4
- package/src/index.mjs +0 -2
- package/src/typescript.mjs +26 -2
- package/src/nestjs.mjs +0 -87
package/README.md
CHANGED
|
@@ -16,31 +16,20 @@ export default [
|
|
|
16
16
|
]
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
### NestJS
|
|
19
|
+
### TypeScript (NestJS 지원 포함)
|
|
20
20
|
|
|
21
|
-
NestJS
|
|
21
|
+
TypeScript 설정은 NestJS 데코레이터를 포함한 모든 TypeScript 기능을 지원합니다:
|
|
22
22
|
|
|
23
23
|
```js
|
|
24
24
|
// eslint.config.js
|
|
25
25
|
import hyeonLinter from '@hyeon/linter'
|
|
26
26
|
|
|
27
27
|
export default [
|
|
28
|
-
...hyeonLinter.
|
|
28
|
+
...hyeonLinter.typescript,
|
|
29
29
|
]
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
또는 직접 import:
|
|
33
|
-
|
|
34
|
-
```js
|
|
35
|
-
// eslint.config.js
|
|
36
|
-
import hyeonNestjsConfig from '@hyeon/linter/nestjs'
|
|
37
|
-
|
|
38
|
-
export default [
|
|
39
|
-
...hyeonNestjsConfig,
|
|
40
|
-
]
|
|
41
|
-
```
|
|
42
32
|
|
|
43
|
-
**주의**: NestJS 설정은 TypeScript 설정을 이미 포함하고 있으므로, `typescript` 설정을 별도로 추가할 필요가 없습니다.
|
|
44
33
|
|
|
45
34
|
## vite
|
|
46
35
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyeon/linter",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.5",
|
|
4
4
|
"description": "Hansanghyun custom eslint settings",
|
|
5
5
|
"main": "./src/index.mjs",
|
|
6
6
|
"scripts": {
|
|
@@ -46,8 +46,6 @@
|
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@actions/exec": "^1.1.1",
|
|
48
48
|
"@changesets/cli": "^2.26.2",
|
|
49
|
-
"eslint": "^9.28.0",
|
|
50
|
-
"prettier": "^3.5.3",
|
|
51
49
|
"semver": "^7.5.4"
|
|
52
50
|
},
|
|
53
51
|
"exports": {
|
|
@@ -57,7 +55,6 @@
|
|
|
57
55
|
"./react": "./src/react.mjs",
|
|
58
56
|
"./prettier": "./src/prettier.mjs",
|
|
59
57
|
"./hansanghyeon": "./src/hansanghyeon.mjs",
|
|
60
|
-
"./nestjs": "./src/nestjs.mjs",
|
|
61
58
|
"./package.json": "./package.json"
|
|
62
59
|
},
|
|
63
60
|
"files": [
|
package/src/index.mjs
CHANGED
|
@@ -3,7 +3,6 @@ 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'
|
|
7
6
|
|
|
8
7
|
export default {
|
|
9
8
|
recommended: hyeonEslintConfigBase,
|
|
@@ -11,5 +10,4 @@ export default {
|
|
|
11
10
|
react: hyeonEslintConfigReact,
|
|
12
11
|
typescript: hyeonEslintConfigTypescript,
|
|
13
12
|
hansanghyeon: hyeonEslintConfigHansanghyeon,
|
|
14
|
-
nestjs: hyeonEslintConfigNestjs,
|
|
15
13
|
}
|
package/src/typescript.mjs
CHANGED
|
@@ -1,13 +1,37 @@
|
|
|
1
1
|
import js from '@eslint/js';
|
|
2
2
|
import tseslint from 'typescript-eslint'
|
|
3
|
+
import eslintConfigPrettier from "eslint-config-prettier";
|
|
3
4
|
|
|
4
5
|
export default tseslint.config(
|
|
6
|
+
{
|
|
7
|
+
ignores: ['**/node_modules/**', '**/dist/**', '**/.turbo/**', '**/coverage/**'],
|
|
8
|
+
},
|
|
5
9
|
js.configs.recommended,
|
|
6
|
-
tseslint.configs.recommended,
|
|
10
|
+
...tseslint.configs.recommended,
|
|
11
|
+
eslintConfigPrettier,
|
|
7
12
|
{
|
|
8
|
-
|
|
13
|
+
files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'],
|
|
14
|
+
languageOptions: {
|
|
15
|
+
parser: tseslint.parser,
|
|
16
|
+
parserOptions: {
|
|
17
|
+
ecmaVersion: 'latest',
|
|
18
|
+
sourceType: 'module',
|
|
19
|
+
ecmaFeatures: {
|
|
20
|
+
decorators: true,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
9
24
|
rules: {
|
|
10
25
|
"react/prop-types": "off",
|
|
26
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
27
|
+
"@typescript-eslint/no-unused-vars": ["error", {
|
|
28
|
+
argsIgnorePattern: "^_",
|
|
29
|
+
varsIgnorePattern: "^_",
|
|
30
|
+
}],
|
|
31
|
+
'@typescript-eslint/interface-name-prefix': 'off',
|
|
32
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
33
|
+
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
34
|
+
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
11
35
|
}
|
|
12
36
|
},
|
|
13
37
|
);
|
package/src/nestjs.mjs
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import js from '@eslint/js';
|
|
2
|
-
import tseslint from 'typescript-eslint';
|
|
3
|
-
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
|
|
4
|
-
import eslintConfigPrettier from "eslint-config-prettier";
|
|
5
|
-
|
|
6
|
-
export default tseslint.config(
|
|
7
|
-
js.configs.recommended,
|
|
8
|
-
...tseslint.configs.recommended,
|
|
9
|
-
eslintConfigPrettier,
|
|
10
|
-
eslintPluginPrettierRecommended,
|
|
11
|
-
{
|
|
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
|
-
},
|
|
23
|
-
rules: {
|
|
24
|
-
"prettier/prettier": ["error", {
|
|
25
|
-
trailingComma: "all",
|
|
26
|
-
singleQuote: true,
|
|
27
|
-
semi: false,
|
|
28
|
-
tabWidth: 2,
|
|
29
|
-
printWidth: 120,
|
|
30
|
-
arrowParens: "always",
|
|
31
|
-
jsxSingleQuote: false,
|
|
32
|
-
bracketSpacing: true,
|
|
33
|
-
plugins: [
|
|
34
|
-
"@trivago/prettier-plugin-sort-imports",
|
|
35
|
-
"prettier-plugin-tailwindcss"
|
|
36
|
-
],
|
|
37
|
-
importOrder: [
|
|
38
|
-
"^@nestjs/(.*)$",
|
|
39
|
-
"^@(.*)$",
|
|
40
|
-
"^[^.](.*)$",
|
|
41
|
-
"^[.]{1,2}/.*$"
|
|
42
|
-
],
|
|
43
|
-
importOrderSeparation: true,
|
|
44
|
-
importOrderSortSpecifiers: true,
|
|
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 규칙
|
|
58
|
-
'arrow-body-style': ['error', 'as-needed'],
|
|
59
|
-
'prefer-arrow-callback': 'error',
|
|
60
|
-
curly: ['error', 'all'],
|
|
61
|
-
'lines-around-comment': ['error', {
|
|
62
|
-
beforeBlockComment: true,
|
|
63
|
-
afterBlockComment: true,
|
|
64
|
-
beforeLineComment: true,
|
|
65
|
-
afterLineComment: true,
|
|
66
|
-
allowBlockStart: true,
|
|
67
|
-
allowBlockEnd: true,
|
|
68
|
-
allowObjectStart: true,
|
|
69
|
-
allowObjectEnd: true,
|
|
70
|
-
allowArrayStart: true,
|
|
71
|
-
allowArrayEnd: true,
|
|
72
|
-
allowClassStart: true,
|
|
73
|
-
allowClassEnd: true,
|
|
74
|
-
}],
|
|
75
|
-
'max-len': 'off',
|
|
76
|
-
'no-confusing-arrow': ['error', {
|
|
77
|
-
allowParens: false,
|
|
78
|
-
}],
|
|
79
|
-
'no-mixed-operators': 'error',
|
|
80
|
-
'no-tabs': 'error',
|
|
81
|
-
quotes: ['error', 'single', {
|
|
82
|
-
avoidEscape: true,
|
|
83
|
-
allowTemplateLiterals: false,
|
|
84
|
-
}],
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
);
|