@hyeon/linter 7.3.6 → 7.3.7

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,21 +16,6 @@ export default [
16
16
  ]
17
17
  ```
18
18
 
19
- ### TypeScript (NestJS 지원 포함)
20
-
21
- TypeScript 설정은 NestJS 데코레이터를 포함한 모든 TypeScript 기능을 지원합니다:
22
-
23
- ```js
24
- // eslint.config.js
25
- import hyeonLinter from '@hyeon/linter'
26
-
27
- export default [
28
- ...hyeonLinter.typescript,
29
- ]
30
- ```
31
-
32
-
33
-
34
19
  ## vite
35
20
 
36
21
  uninstall
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@hyeon/linter",
3
- "version": "7.3.6",
3
+ "version": "7.3.7",
4
4
  "description": "Hansanghyun custom eslint settings",
5
5
  "main": "./src/index.mjs",
6
6
  "scripts": {
7
- "lint": "eslint . --config=eslintrc.json",
8
- "test": "npm run lint && tape test/*.js"
7
+ "lint": "eslint src/",
8
+ "test": "npm run lint"
9
9
  },
10
10
  "repository": {
11
11
  "type": "git",
@@ -43,13 +43,13 @@
43
43
  "eslint": "^9.28.0",
44
44
  "prettier": "^3.5.3"
45
45
  },
46
- "devDependencies": {
47
- "@actions/exec": "^1.1.1",
48
- "@changesets/cli": "^2.26.2",
49
- "semver": "^7.5.4"
50
- },
46
+ "devDependencies": {},
51
47
  "exports": {
52
- ".": "./src/index.mjs",
48
+ ".": {
49
+ "import": "./src/index.mjs",
50
+ "require": "./src/index.mjs",
51
+ "default": "./src/index.mjs"
52
+ },
53
53
  "./recommended": "./src/base.mjs",
54
54
  "./typescript": "./src/typescript.mjs",
55
55
  "./react": "./src/react.mjs",
@@ -66,6 +66,5 @@
66
66
  "publishConfig": {
67
67
  "registry": "https://registry.npmjs.org/",
68
68
  "access": "public"
69
- },
70
- "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
69
+ }
71
70
  }
package/src/base.mjs CHANGED
@@ -1,5 +1,3 @@
1
- import js from '@eslint/js';
1
+ import js from '@eslint/js'
2
2
 
3
- export default [
4
- js.configs.recommended,
5
- ];
3
+ export default [js.configs.recommended]
@@ -1,13 +1,13 @@
1
- import importPlugin from 'eslint-plugin-import';
1
+ import importPlugin from 'eslint-plugin-import'
2
2
 
3
3
  const _import = [
4
4
  importPlugin.flatConfigs.recommended,
5
5
  {
6
6
  rules: {
7
- "import/first": "error",
8
- "import/newline-after-import": "error",
9
- "import/no-duplicates": "error",
10
- "import/no-unresolved": "off"
7
+ 'import/first': 'error',
8
+ 'import/newline-after-import': 'error',
9
+ 'import/no-duplicates': 'error',
10
+ 'import/no-unresolved': 'off',
11
11
  },
12
12
  },
13
13
  ]
@@ -24,7 +24,9 @@ const custom = {
24
24
  ignoreEOLComments: true,
25
25
  },
26
26
  ],
27
+
27
28
  // 보일러플레이트 코드를 생성할때 {} 를 사용하는 경우가 많아서 off
29
+
28
30
  '@typescript-eslint/no-empty-object-type': 'off',
29
31
  '@typescript-eslint/no-explicit-any': 'off',
30
32
  '@typescript-eslint/no-unused-vars': [
@@ -41,12 +43,9 @@ const custom = {
41
43
  },
42
44
  ],
43
45
  'react/display-name': 'off',
44
- 'no-confusing-arrow': 'off'
46
+ 'no-confusing-arrow': 'off',
45
47
  },
46
- ignores: [".config/*", "eslint.config.mjs", "eslint.config.js"]
48
+ ignores: ['.config/*', 'eslint.config.mjs', 'eslint.config.js'],
47
49
  }
48
50
 
49
- export default [
50
- custom,
51
- ..._import,
52
- ];
51
+ export default [custom, ..._import]
package/src/index.mjs CHANGED
@@ -1,13 +1,29 @@
1
1
  import hyeonEslintConfigBase from './base.mjs'
2
+ import hyeonEslintConfigHansanghyeon from './hansanghyeon.mjs'
2
3
  import hyeonEslintConfigPrettier from './prettier.mjs'
3
4
  import hyeonEslintConfigReact from './react.mjs'
4
5
  import hyeonEslintConfigTypescript from './typescript.mjs'
5
- import hyeonEslintConfigHansanghyeon from './hansanghyeon.mjs'
6
6
 
7
- export default {
7
+ // 기존 사용자를 위한 객체 형태 유지 (각 속성이 flat config 배열)
8
+
9
+ const configs = {
8
10
  recommended: hyeonEslintConfigBase,
9
11
  prettier: hyeonEslintConfigPrettier,
10
12
  react: hyeonEslintConfigReact,
11
13
  typescript: hyeonEslintConfigTypescript,
12
14
  hansanghyeon: hyeonEslintConfigHansanghyeon,
13
- }
15
+ }
16
+
17
+ // Default export는 설정 객체
18
+
19
+ export default configs
20
+
21
+ // Named exports로도 개별 설정 제공
22
+
23
+ export {
24
+ hyeonEslintConfigBase as recommended,
25
+ hyeonEslintConfigPrettier as prettier,
26
+ hyeonEslintConfigReact as react,
27
+ hyeonEslintConfigTypescript as typescript,
28
+ hyeonEslintConfigHansanghyeon as hansanghyeon,
29
+ }
package/src/prettier.mjs CHANGED
@@ -1,53 +1,68 @@
1
- import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
2
- import eslintConfigPrettier from "eslint-config-prettier";
1
+ import eslintConfigPrettier from 'eslint-config-prettier'
2
+ import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
3
3
 
4
4
  export default [
5
5
  eslintConfigPrettier,
6
6
  {
7
7
  ...eslintPluginPrettierRecommended,
8
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
- "plugins": [
18
- "@trivago/prettier-plugin-sort-imports",
19
- "prettier-plugin-tailwindcss"
20
- ],
21
- "importOrder": ["^[^.](.*)$", "^[.]{1,2}/.*$"],
22
- "importOrderSeparation": false,
23
- "importOrderSortSpecifiers": true,
24
- "importOrderParserPlugins": ["typescript", "decorators-legacy", "jsx", "classProperties"],
25
- }],
9
+ 'prettier/prettier': [
10
+ 'error',
11
+ {
12
+ trailingComma: 'all',
13
+ singleQuote: true,
14
+ semi: false,
15
+ tabWidth: 2,
16
+ printWidth: 120,
17
+ arrowParens: 'always',
18
+ jsxSingleQuote: false,
19
+ plugins: ['@trivago/prettier-plugin-sort-imports', 'prettier-plugin-tailwindcss'],
20
+ importOrder: ['^[^.](.*)$', '^[.]{1,2}/.*$'],
21
+ importOrderSeparation: false,
22
+ importOrderSortSpecifiers: true,
23
+
24
+ /**
25
+ * @see https://github.com/trivago/prettier-plugin-sort-imports/issues/120
26
+ */
27
+
28
+ importOrderParserPlugins: ['typescript', 'decorators-legacy', 'jsx', 'classProperties'],
29
+ },
30
+ ],
26
31
  'arrow-body-style': ['error', 'as-needed'],
27
32
  'prefer-arrow-callback': 'error',
28
33
  curly: ['error', 'all'],
29
- 'lines-around-comment': ['error', {
30
- beforeBlockComment: true,
31
- afterBlockComment: true,
32
- beforeLineComment: true,
33
- afterLineComment: true,
34
- allowBlockStart: true,
35
- allowBlockEnd: true,
36
- allowObjectStart: true,
37
- allowObjectEnd: true,
38
- allowArrayStart: true,
39
- allowArrayEnd: true,
40
- }],
34
+ 'lines-around-comment': [
35
+ 'error',
36
+ {
37
+ beforeBlockComment: true,
38
+ afterBlockComment: true,
39
+ beforeLineComment: true,
40
+ afterLineComment: true,
41
+ allowBlockStart: true,
42
+ allowBlockEnd: true,
43
+ allowObjectStart: true,
44
+ allowObjectEnd: true,
45
+ allowArrayStart: true,
46
+ allowArrayEnd: true,
47
+ },
48
+ ],
41
49
  'max-len': 'off',
42
- 'no-confusing-arrow': ['error', {
43
- allowParens: false,
44
- }],
50
+ 'no-confusing-arrow': [
51
+ 'error',
52
+ {
53
+ allowParens: false,
54
+ },
55
+ ],
45
56
  'no-mixed-operators': 'error',
46
57
  'no-tabs': 'error',
47
- quotes: ['error', 'single', {
48
- avoidEscape: true,
49
- allowTemplateLiterals: false,
50
- }],
58
+ quotes: [
59
+ 'error',
60
+ 'single',
61
+ {
62
+ avoidEscape: true,
63
+ allowTemplateLiterals: false,
64
+ },
65
+ ],
51
66
  },
52
67
  },
53
- ]
68
+ ]
@@ -1,6 +1,6 @@
1
- import js from '@eslint/js';
1
+ import js from '@eslint/js'
2
+ import eslintConfigPrettier from 'eslint-config-prettier'
2
3
  import tseslint from 'typescript-eslint'
3
- import eslintConfigPrettier from "eslint-config-prettier";
4
4
 
5
5
  export default tseslint.config(
6
6
  {
@@ -22,16 +22,19 @@ export default tseslint.config(
22
22
  },
23
23
  },
24
24
  rules: {
25
- "react/prop-types": "off",
26
- "@typescript-eslint/no-explicit-any": "off",
27
- "@typescript-eslint/no-unused-vars": ["error", {
28
- argsIgnorePattern: "^_",
29
- varsIgnorePattern: "^_",
30
- }],
25
+ 'react/prop-types': 'off',
26
+ '@typescript-eslint/no-explicit-any': 'off',
27
+ '@typescript-eslint/no-unused-vars': [
28
+ 'error',
29
+ {
30
+ argsIgnorePattern: '^_',
31
+ varsIgnorePattern: '^_',
32
+ },
33
+ ],
31
34
  '@typescript-eslint/interface-name-prefix': 'off',
32
35
  '@typescript-eslint/explicit-function-return-type': 'off',
33
36
  '@typescript-eslint/explicit-module-boundary-types': 'off',
34
37
  '@typescript-eslint/no-non-null-assertion': 'off',
35
- }
38
+ },
36
39
  },
37
- );
40
+ )