@simplysm/eslint-plugin 12.5.14 → 12.5.16

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.
@@ -0,0 +1 @@
1
+ export { default } from "../eslint-plugin/src/configs/javascript.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simplysm/eslint-plugin",
3
- "version": "12.5.14",
3
+ "version": "12.5.16",
4
4
  "description": "심플리즘 패키지 - ESLINT 플러그인",
5
5
  "author": "김석래",
6
6
  "repository": {
@@ -15,11 +15,14 @@
15
15
  "node": "20.16.0"
16
16
  },
17
17
  "dependencies": {
18
- "@typescript-eslint/utils": "^8.6.0",
18
+ "@eslint/compat": "^1.1.1",
19
+ "@typescript-eslint/utils": "^8.7.0",
19
20
  "angular-eslint": "^18.3.1",
20
- "eslint": "^9.11.0",
21
+ "eslint": "^9.11.1",
22
+ "eslint-plugin-deprecation": "^3.0.0",
23
+ "eslint-plugin-import": "^2.30.0",
21
24
  "globals": "^15.9.0",
22
25
  "typescript": "~5.5.4",
23
- "typescript-eslint": "^8.6.0"
26
+ "typescript-eslint": "^8.7.0"
24
27
  }
25
28
  }
@@ -0,0 +1,31 @@
1
+ import tseslint from "typescript-eslint";
2
+ import ngeslint from "angular-eslint";
3
+ import plugin from "../plugin.js";
4
+ import typescript from "./typescript.js";
5
+
6
+ export default [
7
+ ...typescript,
8
+ ...tseslint.config(
9
+ {
10
+ files: ["**/*.ts"],
11
+ plugins: {
12
+ "@angular-eslint": ngeslint.tsPlugin,
13
+ },
14
+ processor: ngeslint.processInlineTemplates,
15
+ },
16
+ {
17
+ files: ["**/*.html"],
18
+ languageOptions: {
19
+ parser: ngeslint.templateParser,
20
+ },
21
+ plugins: {
22
+ // "@angular-eslint/template": ngeslint.templatePlugin,
23
+ "@simplysm": plugin,
24
+ },
25
+ rules: {
26
+ "@simplysm/ng-template-no-todo-comments": "warn",
27
+ // "@angular-eslint/template/use-track-by-function": "error",
28
+ },
29
+ },
30
+ ),
31
+ ];
@@ -0,0 +1,39 @@
1
+ import globals from "globals";
2
+
3
+ export default [
4
+ {
5
+ ignores: ["**/node_modules/", "**/dist/", "**/.*/", "**/_*/"],
6
+ },
7
+ {
8
+ languageOptions: {
9
+ globals: {
10
+ ...globals.node,
11
+ ...globals.es2021,
12
+ },
13
+ ecmaVersion: 2021,
14
+ sourceType: "module",
15
+ },
16
+ },
17
+ {
18
+ files: ["**/*.js"],
19
+ plugins: {
20
+ // import: importPlugin,
21
+ },
22
+ rules: {
23
+ // 기본
24
+ "no-console": ["warn"],
25
+ "no-warning-comments": ["warn"],
26
+
27
+ "require-await": ["error"],
28
+ // "semi": ["error"],
29
+ "no-shadow": ["error"],
30
+ "no-duplicate-imports": ["error"],
31
+ "no-unused-expressions": ["error"],
32
+ "no-unused-vars": ["error"],
33
+ "no-undef": ["error"],
34
+
35
+ // import
36
+ // "import/no-extraneous-dependencies": ["error"], // 느림
37
+ },
38
+ },
39
+ ];
@@ -0,0 +1,60 @@
1
+ import tseslint from "typescript-eslint";
2
+ import plugin from "../plugin.js";
3
+ import javascript from "./javascript.js";
4
+
5
+ export default [
6
+ ...javascript,
7
+ ...tseslint.config({
8
+ files: ["**/*.ts"],
9
+ plugins: {
10
+ "@typescript-eslint": tseslint.plugin,
11
+ "@simplysm": plugin,
12
+ // "import": importPlugin,
13
+ // "deprecation": fixupPluginRules(deprecationPlugin),
14
+ },
15
+ languageOptions: {
16
+ parser: tseslint.parser,
17
+ parserOptions: {
18
+ project: true,
19
+ },
20
+ },
21
+ rules: {
22
+ // 기본
23
+ "no-console": ["warn"],
24
+ "no-warning-comments": ["warn"],
25
+
26
+ // 타입스크립트
27
+ "@typescript-eslint/require-await": ["error"],
28
+ "@typescript-eslint/await-thenable": ["error"],
29
+ "@typescript-eslint/return-await": ["error", "always"],
30
+ "@typescript-eslint/no-floating-promises": ["error"],
31
+ // "@typescript-eslint/semi": ["error"], // Deprecated (https://typescript-eslint.io/rules/semi/)
32
+ "@typescript-eslint/no-shadow": ["error"],
33
+ "@typescript-eslint/no-unnecessary-condition": ["error", { allowConstantLoopConditions: true }],
34
+ "@typescript-eslint/no-unnecessary-type-assertion": ["error"],
35
+ "@typescript-eslint/non-nullable-type-assertion-style": ["error"],
36
+ "@typescript-eslint/prefer-reduce-type-parameter": ["error"],
37
+ "@typescript-eslint/prefer-return-this-type": ["error"],
38
+ "@typescript-eslint/typedef": ["error"],
39
+ "@typescript-eslint/no-unused-expressions": ["error"],
40
+ "@typescript-eslint/no-unused-vars": ["error", { args: "none" }],
41
+ "@typescript-eslint/strict-boolean-expressions": [
42
+ "error",
43
+ {
44
+ allowNullableBoolean: true,
45
+ allowNullableObject: true,
46
+ },
47
+ ],
48
+ "@typescript-eslint/prefer-ts-expect-error": ["error"],
49
+
50
+ // import
51
+ // "import/no-extraneous-dependencies": ["error"], // 느림
52
+
53
+ // Deprecation
54
+ // "deprecation/deprecation": ["warn"], // 느림
55
+
56
+ // 심플리즘
57
+ "@simplysm/ts-no-throw-not-implement-error": ["warn"],
58
+ },
59
+ }),
60
+ ];
package/src/index.js CHANGED
@@ -1,7 +1,11 @@
1
- import root from "./configs/root.js";
1
+ import angular from "./configs/angular.js";
2
+ import typescript from "./configs/typescript.js";
3
+ import javascript from "./configs/javascript.js";
2
4
 
3
5
  export default {
4
6
  configs: {
5
- root,
7
+ angular,
8
+ typescript,
9
+ javascript
6
10
  },
7
11
  };
@@ -1,92 +0,0 @@
1
- import globals from "globals";
2
- import tseslint from "typescript-eslint";
3
- import ngeslint from "angular-eslint";
4
- import plugin from "../plugin.js";
5
-
6
- export default [
7
- {
8
- languageOptions: {
9
- globals: {
10
- ...globals.node,
11
- ...globals.es2021,
12
- },
13
- ecmaVersion: 2021,
14
- sourceType: "module",
15
- },
16
- },
17
- {
18
- files: ["**/*.js"],
19
- rules: {
20
- "no-console": ["warn"],
21
- "no-warning-comments": ["warn"],
22
-
23
- "require-await": ["error"],
24
- "semi": ["error"],
25
- "no-shadow": ["error"],
26
- "no-duplicate-imports": ["error"],
27
- "no-unused-expressions": ["error"],
28
- "no-unused-vars": ["error"],
29
- "no-undef": ["error"],
30
- },
31
- },
32
- ...tseslint.config(
33
- {
34
- files: ["**/*.ts", "**/*.tsx"],
35
- plugins: {
36
- "@typescript-eslint": tseslint.plugin,
37
- "@angular-eslint": ngeslint.tsPlugin,
38
- "@simplysm": plugin,
39
- },
40
- languageOptions: {
41
- parser: tseslint.parser,
42
- },
43
- processor: ngeslint.processInlineTemplates,
44
- rules: {
45
- // 기본
46
- "no-console": ["warn"],
47
- "no-warning-comments": ["warn"],
48
-
49
- // 타입스크립트
50
- "@typescript-eslint/require-await": ["error"],
51
- "@typescript-eslint/await-thenable": ["error"],
52
- "@typescript-eslint/return-await": ["error", "always"],
53
- "@typescript-eslint/no-floating-promises": ["error"],
54
- // "@typescript-eslint/semi": ["error"], // Deprecated (https://typescript-eslint.io/rules/semi/)
55
- "@typescript-eslint/no-shadow": ["error"],
56
- "@typescript-eslint/no-unnecessary-condition": ["error", { allowConstantLoopConditions: true }],
57
- "@typescript-eslint/no-unnecessary-type-assertion": ["error"],
58
- "@typescript-eslint/non-nullable-type-assertion-style": ["error"],
59
- "@typescript-eslint/prefer-reduce-type-parameter": ["error"],
60
- "@typescript-eslint/prefer-return-this-type": ["error"],
61
- "@typescript-eslint/typedef": ["error"],
62
- "@typescript-eslint/no-unused-expressions": ["error"],
63
- "@typescript-eslint/no-unused-vars": ["error", { args: "none" }],
64
- "@typescript-eslint/strict-boolean-expressions": [
65
- "error",
66
- {
67
- allowNullableBoolean: true,
68
- allowNullableObject: true,
69
- },
70
- ],
71
- "@typescript-eslint/prefer-ts-expect-error": ["error"],
72
-
73
- // 심플리즘
74
- "@simplysm/ts-no-throw-not-implement-error": ["warn"],
75
- },
76
- },
77
- {
78
- files: ["**/*.html"],
79
- languageOptions: {
80
- parser: ngeslint.templateParser,
81
- },
82
- plugins: {
83
- "@angular-eslint/template": ngeslint.templatePlugin,
84
- "@simplysm": plugin,
85
- },
86
- rules: {
87
- "@simplysm/ng-template-no-todo-comments": "warn",
88
- "@angular-eslint/template/use-track-by-function": "error",
89
- },
90
- },
91
- ),
92
- ];