@odg/eslint-config 1.15.1 → 1.16.0

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
@@ -527,6 +527,7 @@
527
527
  - [No Collection Size Mischeck](#no-collection-size-mischeck)
528
528
  - [No Gratuitous Expressions](#no-gratuitous-expressions)
529
529
  - [No Unused Collection](#no-unused-collection)
530
+ - [No Inconsistent Docblock](#no-inconsistent-docblock)
530
531
  - [YAML / JSON](#yaml-json)
531
532
 
532
533
  ## Introduction
@@ -554,7 +555,7 @@ Add script in your `package.json` file
554
555
  ```json
555
556
  {
556
557
  "scripts": {
557
- "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json,.jsonc,.json5,.yml,.yaml,.xml,.txt,.svg,.properties,.gradle,.java,.cpp,.c,.cs,.html,.css,.groovy,.gitignore,.npmignore,.toml,.env,.example,.sample,.ini,.php,.bat,.powershell,.ps1,.sh,.bash",
558
+ "lint": "eslint --ext .js,.jsx,.ts,.tsx,.json,.jsonc,.json5,.yml,.yaml,.xml,.txt,.svg,.properties,.gradle,.java,.cpp,.c,.cs,.html,.css,.groovy,.gitignore,.npmignore,.toml,.env,.example,.sample,.ini,.php,.bat,.powershell,.ps1,.sh,.bash,.eslintrc",
558
559
  }
559
560
  }
560
561
  ```
@@ -20118,6 +20119,58 @@ function getLength(a, b, c) {
20118
20119
  }
20119
20120
  ```
20120
20121
 
20122
+ ### No Inconsistent Docblock
20123
+
20124
+ ----------
20125
+
20126
+ Check a valid typescript and docblock
20127
+
20128
+ <https://github.com/ODGodinho/ODGEslintPlugin#no-inconsistent-docblock>
20129
+
20130
+ 👍 Examples of correct code
20131
+
20132
+ ```typescript
20133
+ /**
20134
+ * Valid Param
20135
+ *
20136
+ * @param {string} param
20137
+ */
20138
+ function name(param: string) {
20139
+
20140
+ }
20141
+
20142
+ /**
20143
+ * Valid return
20144
+ *
20145
+ * @returns {string}
20146
+ */
20147
+ function name2(): string {
20148
+
20149
+ }
20150
+ ```
20151
+
20152
+ 👎 Examples of incorrect code
20153
+
20154
+ ```typescript
20155
+ /**
20156
+ * Valid Param
20157
+ *
20158
+ * @param {number} param
20159
+ */
20160
+ function name(param: string) {
20161
+
20162
+ }
20163
+
20164
+ /**
20165
+ * Valid return
20166
+ *
20167
+ * @returns {number}
20168
+ */
20169
+ function name2(): string {
20170
+
20171
+ }
20172
+ ```
20173
+
20121
20174
  ## Yaml Json
20122
20175
 
20123
20176
  add suport yaml and json files
package/index.js CHANGED
@@ -11,6 +11,7 @@ module.exports = {
11
11
  "sonar",
12
12
  "sonarjs",
13
13
  "security",
14
+ "@odg",
14
15
  ],
15
16
  extends: [
16
17
  "./rules/global/base.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odg/eslint-config",
3
- "version": "1.15.1",
3
+ "version": "1.16.0",
4
4
  "description": "Linter for JavaScript And Typescript project",
5
5
  "main": "index.js",
6
6
  "author": "Dragons Gamers <https://www.linkedin.com/in/victor-alves-odgodinho>",
@@ -22,6 +22,7 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@babel/core": "*",
25
+ "@odg/eslint-plugin": "*",
25
26
  "@typescript-eslint/eslint-plugin": "*",
26
27
  "@typescript-eslint/parser": "*",
27
28
  "any-eslint-parser": "^1.0.1",
@@ -26,5 +26,6 @@ module.exports = {
26
26
  "@typescript-eslint/brace-style": [ "error" ], // Força formatação {}
27
27
  "sonarjs/no-extra-arguments": [ "off" ], // Argumentos extra ja é tratado por typescript
28
28
  "sonarjs/no-use-of-empty-return-value": [ "off" ], // Não atribua void em uma variável
29
+ "@odg/no-inconsistent-docblock": [ "error" ], // Valida Docblock @param e @return com tipagem
29
30
  },
30
31
  };