@simplysm/eslint-plugin 7.3.4 → 10.0.21

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/.eslintrc.cjs ADDED
@@ -0,0 +1 @@
1
+ module.exports = {};
package/package.json CHANGED
@@ -1,35 +1,28 @@
1
1
  {
2
2
  "name": "@simplysm/eslint-plugin",
3
- "version": "7.3.4",
3
+ "version": "10.0.21",
4
4
  "description": "심플리즘 패키지 - ESLINT 플러그인",
5
5
  "author": "김석래",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "https://github.com/kslhunter/simplysm7.git",
8
+ "url": "https://github.com/kslhunter/simplysm10.git",
9
9
  "directory": "packages/eslint-plugin"
10
10
  },
11
11
  "license": "MIT",
12
12
  "type": "module",
13
13
  "main": "src/index.cjs",
14
- "sideEffects": false,
15
14
  "engines": {
16
- "node": "^16"
15
+ "node": "^20"
17
16
  },
18
- "files": [
19
- "**/*"
20
- ],
21
17
  "dependencies": {
22
- "@angular-eslint/eslint-plugin": "14.4.0",
23
- "@angular-eslint/eslint-plugin-template": "14.4.0",
24
- "@angular-eslint/template-parser": "14.4.0",
25
- "@typescript-eslint/eslint-plugin": "5.60.1",
26
- "@typescript-eslint/experimental-utils": "5.60.1",
27
- "@typescript-eslint/parser": "5.60.1",
18
+ "@typescript-eslint/eslint-plugin": "^5.61.0",
19
+ "@typescript-eslint/experimental-utils": "^5.61.0",
20
+ "@typescript-eslint/parser": "^5.61.0",
28
21
  "eslint": "^8.44.0",
29
22
  "eslint-import-resolver-typescript": "^3.5.5",
30
23
  "eslint-module-utils": "^2.8.0",
31
24
  "eslint-plugin-deprecation": "^1.4.1",
32
25
  "eslint-plugin-import": "^2.27.5",
33
- "typescript": "~4.8.4"
26
+ "typescript": "^4.9.5"
34
27
  }
35
28
  }
@@ -1,12 +1,12 @@
1
1
  module.exports = {
2
2
  env: {
3
3
  node: true,
4
- es2020: true
4
+ es2021: true
5
5
  },
6
6
  plugins: ["import"],
7
7
  rules: {
8
8
  // import
9
- // "import/no-extraneous-dependencies": ["error"], // 느림
9
+ "import/no-extraneous-dependencies": ["error"], // 느림
10
10
 
11
11
  "no-console": ["warn"],
12
12
  "no-warning-comments": ["warn"],
@@ -18,10 +18,10 @@ module.exports = {
18
18
  "linebreak-style": ["error", "unix"],
19
19
 
20
20
  // Deprecation
21
- // "deprecation/deprecation": ["warn"], // 느림
21
+ "deprecation/deprecation": ["warn"], // 느림
22
22
 
23
23
  // import
24
- // "import/no-extraneous-dependencies": ["error"], // 느림
24
+ "import/no-extraneous-dependencies": ["error"], // 느림
25
25
 
26
26
  // 심플리즘
27
27
  "@simplysm/ts-no-throw-not-implement-error": ["warn"],
@@ -34,9 +34,9 @@ module.exports = {
34
34
  "@typescript-eslint/quotes": ["error", "double", { avoidEscape: true, allowTemplateLiterals: true }],
35
35
  "@typescript-eslint/semi": ["error"],
36
36
  "@typescript-eslint/no-shadow": ["error"],
37
- "@typescript-eslint/member-delimiter-style": ["error"],
37
+ // "@typescript-eslint/member-delimiter-style": ["error"],
38
38
  // "@typescript-eslint/no-unnecessary-condition": ["error", { allowConstantLoopConditions: true }],
39
- "@typescript-eslint/no-unnecessary-type-assertion": ["error"],
39
+ // "@typescript-eslint/no-unnecessary-type-assertion": ["error"],
40
40
  "@typescript-eslint/non-nullable-type-assertion-style": ["error"],
41
41
  "@typescript-eslint/prefer-reduce-type-parameter": ["error"],
42
42
  "@typescript-eslint/prefer-return-this-type": ["error"],
package/src/index.cjs CHANGED
@@ -1,13 +1,10 @@
1
1
  module.exports = {
2
2
  configs: {
3
3
  "base": require("./configs/base.cjs"),
4
- "typescript": require("./configs/typescript.cjs"),
5
- "angular": require("./configs/angular.cjs"),
6
- "angular-template": require("./configs/angular-template.cjs")
4
+ "typescript": require("./configs/typescript.cjs")
7
5
  },
8
6
  rules: {
9
7
  "ts-no-self-entry-import": require("./rules/ts-no-self-entry-import.cjs"),
10
- "ts-no-throw-not-implement-error": require("./rules/ts-no-throw-not-implement-error.cjs"),
11
- "ng-template-no-todo-comments": require("./rules/ng-template-no-todo-comments.cjs")
8
+ "ts-no-throw-not-implement-error": require("./rules/ts-no-throw-not-implement-error.cjs")
12
9
  }
13
10
  };
@@ -61,4 +61,4 @@ module.exports = {
61
61
  }
62
62
  };
63
63
  }
64
- };
64
+ };
@@ -1,10 +0,0 @@
1
- module.exports = {
2
- parser: "@angular-eslint/template-parser",
3
- plugins: [
4
- "@angular-eslint/template",
5
- "@simplysm"
6
- ],
7
- rules: {
8
- "@simplysm/ng-template-no-todo-comments": "warn"
9
- }
10
- };
@@ -1,5 +0,0 @@
1
- module.exports = {
2
- plugins: ["@angular-eslint"],
3
- processor: "@angular-eslint/template/extract-inline-html",
4
- rules: {}
5
- };
@@ -1,45 +0,0 @@
1
- module.exports = {
2
- meta: {
3
- type: "suggestion",
4
- docs: {
5
- description: "HTML의 'TODO' 주석 경고"
6
- },
7
-
8
- schema: []
9
- },
10
-
11
- create: (context) => {
12
- // const parserServices = context.parserServices;
13
- return {
14
- Program(node) {
15
- if (node.value) {
16
- const comments = node.value.match(/<!--(((?!-->)[\s\S])*)-->/g);
17
- if (!comments) return;
18
-
19
- let cursor = 0;
20
- for (const comment of comments) {
21
- if (!comment.includes("TODO:")) continue;
22
-
23
- const index = node.value.slice(cursor).indexOf(comment) + cursor;
24
- const line = node.value.slice(0, index).split("\n").length;
25
- const column = index - node.value.slice(0, index).lastIndexOf("\n") - 1;
26
-
27
- const endIndex = index + comment.length;
28
- const endLine = node.value.slice(0, endIndex).split("\n").length;
29
- const endColumn = endIndex - node.value.slice(0, endIndex).lastIndexOf("\n") - 1;
30
-
31
- cursor += index;
32
-
33
- context.report({
34
- loc: {
35
- start: { line, column },
36
- end: { line: endLine, column: endColumn }
37
- },
38
- message: comment.match(/<!--(((?!-->)[\s\S])*)-->/)[1].trim()
39
- });
40
- }
41
- }
42
- }
43
- };
44
- }
45
- };