@odg/eslint-config 3.2.4 → 3.2.6
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/index.mjs +2 -1
- package/package.json +5 -2
- package/rules/global/base.mjs +10 -0
package/index.mjs
CHANGED
|
@@ -35,6 +35,7 @@ const require = createRequire(import.meta.url);
|
|
|
35
35
|
// Import plugins (most are CommonJS)
|
|
36
36
|
|
|
37
37
|
const typescriptParser = require("@typescript-eslint/parser");
|
|
38
|
+
const jsoncParser = require("jsonc-eslint-parser");
|
|
38
39
|
|
|
39
40
|
const odgPlugin = require("@odg/eslint-plugin");
|
|
40
41
|
const typescriptEslint = require("@typescript-eslint/eslint-plugin");
|
|
@@ -57,7 +58,6 @@ const sonarjs = require("eslint-plugin-sonarjs");
|
|
|
57
58
|
const sortClassMembers = require("eslint-plugin-sort-class-members");
|
|
58
59
|
const yml = require("eslint-plugin-yml");
|
|
59
60
|
const espree = require("espree");
|
|
60
|
-
const jsoncParser = require("jsonc-eslint-parser");
|
|
61
61
|
|
|
62
62
|
export default [
|
|
63
63
|
|
|
@@ -66,6 +66,7 @@ export default [
|
|
|
66
66
|
ignores: [
|
|
67
67
|
"!.*",
|
|
68
68
|
".git/",
|
|
69
|
+
".yarn/",
|
|
69
70
|
"node_modules/",
|
|
70
71
|
"bower_components/",
|
|
71
72
|
"jspm_packages/",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@odg/eslint-config",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.6",
|
|
4
4
|
"description": "Linter for JavaScript And Typescript project",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.mjs",
|
|
@@ -62,7 +62,9 @@
|
|
|
62
62
|
"eslint-plugin-yml": "^1.19.1",
|
|
63
63
|
"espree": "^11.0.0",
|
|
64
64
|
"globals": "^17.0.0",
|
|
65
|
+
"jsonc-eslint-parser": "^3.1.0",
|
|
65
66
|
"toml-eslint-parser": "^1.0.3",
|
|
67
|
+
"ts-api-utils": "^2.4.0",
|
|
66
68
|
"yaml-eslint-parser": "^2.0.0"
|
|
67
69
|
},
|
|
68
70
|
"files": [
|
|
@@ -73,5 +75,6 @@
|
|
|
73
75
|
"bugs": {
|
|
74
76
|
"url": "https://github.com/ODGodinho/ODG-Linter-Js/issues"
|
|
75
77
|
},
|
|
76
|
-
"homepage": "https://github.com/ODGodinho/ODG-Linter-Js#readme"
|
|
78
|
+
"homepage": "https://github.com/ODGodinho/ODG-Linter-Js#readme",
|
|
79
|
+
"packageManager": "yarn@4.13.0"
|
|
77
80
|
}
|
package/rules/global/base.mjs
CHANGED
|
@@ -136,6 +136,16 @@ export default {
|
|
|
136
136
|
"message": "Avoid 'error instances'. Use the specific specifications of your @odg/exception"
|
|
137
137
|
+ "(Exception.isError) or structural type checking for greater security between packets.",
|
|
138
138
|
},
|
|
139
|
+
{
|
|
140
|
+
"selector": "CallExpression[callee.name='sleep']",
|
|
141
|
+
"message": "Do not use 'sleep()' with timestamps. Use async/await patterns, Promise.race"
|
|
142
|
+
+ ", timeout function or other async timing mechanisms instead.",
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"selector": "CallExpression[callee.property.name='waitFor']",
|
|
146
|
+
"message": "Do not use 'page.waitFor()' with timestamps. Use 'waitForSelector', 'waitForResponse',"
|
|
147
|
+
+ " or 'waitForFunction' instead.",
|
|
148
|
+
},
|
|
139
149
|
],
|
|
140
150
|
"no-magic-numbers": [
|
|
141
151
|
"warn",
|