@hyeon/linter 7.0.25 → 7.0.26

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyeon/linter",
3
- "version": "7.0.25",
3
+ "version": "7.0.26",
4
4
  "description": "Hansanghyun custom eslint settings",
5
5
  "main": "./src/index.mjs",
6
6
  "scripts": {
package/src/base.mjs CHANGED
@@ -1,43 +1,5 @@
1
1
  import js from '@eslint/js';
2
- import simpleImportSort from "eslint-plugin-simple-import-sort";
3
- import importPlugin from 'eslint-plugin-import';
4
2
 
5
3
  export default [
6
4
  js.configs.recommended,
7
- importPlugin.flatConfigs.recommended,
8
- {
9
- rules: {
10
- camelcase: [
11
- 'error',
12
- {
13
- properties: 'never',
14
- },
15
- ],
16
- 'class-methods-use-this': 'off',
17
- // tailwindcss를 사용하기때문에 최대길이 제한은 제거함
18
- // 'max-len': [
19
- // 'warn',
20
- // 120,
21
- // ],
22
- 'no-multi-spaces': [
23
- 'error',
24
- {
25
- ignoreEOLComments: true,
26
- },
27
- ],
28
- },
29
- },
30
- {
31
- plugins: {
32
- "simple-import-sort": simpleImportSort,
33
- },
34
- rules: {
35
- 'simple-import-sort/imports': "error",
36
- "simple-import-sort/exports": "error",
37
- "import/first": "error",
38
- "import/newline-after-import": "error",
39
- "import/no-duplicates": "error",
40
- "import/no-unresolved": "off"
41
- },
42
- },
43
5
  ];
@@ -1,8 +1,55 @@
1
- export default [
1
+ import simpleImportSort from "eslint-plugin-simple-import-sort";
2
+ import importPlugin from 'eslint-plugin-import';
3
+
4
+ /**
5
+ * import관련 플러그인, 설정
6
+ * simpleImportSort - https://github.com/lydell/eslint-plugin-simple-import-sort
7
+ */
8
+ const _import = [
9
+ importPlugin.flatConfigs.recommended,
2
10
  {
11
+ plugins: {
12
+ "simple-import-sort": simpleImportSort,
13
+ },
3
14
  rules: {
4
- 'no-empty-pattern': 'off',
5
- 'lines-around-comment': ['error', { 'beforeBlockComment': true }],
6
- }
15
+ "simple-import-sort/imports": [
16
+ "error",
17
+ {
18
+ "groups": [
19
+ // 그룹 설정을 비움
20
+ ],
21
+ }
22
+ ],
23
+ "simple-import-sort/exports": "error",
24
+ "import/first": "error",
25
+ "import/newline-after-import": "error",
26
+ "import/no-duplicates": "error",
27
+ "import/no-unresolved": "off"
28
+ },
7
29
  },
30
+ ]
31
+
32
+ const custom = {
33
+ rules: {
34
+ 'no-empty-pattern': 'off',
35
+ 'lines-around-comment': ['error', { 'beforeBlockComment': true }],
36
+ camelcase: [
37
+ 'error',
38
+ {
39
+ properties: 'never',
40
+ },
41
+ ],
42
+ 'class-methods-use-this': 'off',
43
+ 'no-multi-spaces': [
44
+ 'error',
45
+ {
46
+ ignoreEOLComments: true,
47
+ },
48
+ ],
49
+ }
50
+ }
51
+
52
+ export default [
53
+ custom,
54
+ ..._import,
8
55
  ];