@agilebot/eslint-config 0.4.2 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cli.js +10 -2
- package/dist/index.js +4 -3
- package/package.json +3 -4
package/dist/cli.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license @agilebot/eslint-config v0.4.
|
2
|
+
* @license @agilebot/eslint-config v0.4.4
|
3
3
|
*
|
4
4
|
* Copyright (c) Agilebot, Inc. and its affiliates.
|
5
5
|
*
|
@@ -75,7 +75,8 @@ function cli() {
|
|
75
75
|
config: false,
|
76
76
|
strict: false,
|
77
77
|
checkIntl: false,
|
78
|
-
progress: false
|
78
|
+
progress: false,
|
79
|
+
showWarningsInCI: false
|
79
80
|
};
|
80
81
|
const pkg = require.resolve("eslint/package.json");
|
81
82
|
const bin = import_node_path.default.join(pkg, "..", "bin", "eslint.js");
|
@@ -86,6 +87,7 @@ function cli() {
|
|
86
87
|
has.strict = has.strict || arg === "--strict";
|
87
88
|
has.checkIntl = has.checkIntl || arg === "--check-intl";
|
88
89
|
has.progress = has.progress || arg === "--progress";
|
90
|
+
has.showWarningsInCI = has.showWarningsInCI || arg === "--show-warnings-in-ci";
|
89
91
|
});
|
90
92
|
if (!has.fix) {
|
91
93
|
process.argv.splice(2, 0, "--fix");
|
@@ -103,6 +105,12 @@ function cli() {
|
|
103
105
|
"file-progress/activate: 1"
|
104
106
|
);
|
105
107
|
}
|
108
|
+
if (!has.showWarningsInCI && (0, import_eslint_utils.isCI)()) {
|
109
|
+
console.warn(
|
110
|
+
"Warning: eslint-agilebot will report errors only in CI environment"
|
111
|
+
);
|
112
|
+
process.argv.splice(2, 0, "--quiet");
|
113
|
+
}
|
106
114
|
if (has.checkIntl) {
|
107
115
|
process.argv.splice(process.argv.indexOf("--check-intl"), 1);
|
108
116
|
process.argv.splice(2, 0, "--rule", "@agilebot/intl-id-unused: 1");
|
package/dist/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license @agilebot/eslint-config v0.4.
|
2
|
+
* @license @agilebot/eslint-config v0.4.4
|
3
3
|
*
|
4
4
|
* Copyright (c) Agilebot, Inc. and its affiliates.
|
5
5
|
*
|
@@ -455,7 +455,8 @@ function react(opts) {
|
|
455
455
|
"@eslint-react",
|
456
456
|
"react-hooks",
|
457
457
|
"jsx-a11y",
|
458
|
-
"@stylistic"
|
458
|
+
"@stylistic",
|
459
|
+
"@agilebot"
|
459
460
|
],
|
460
461
|
extends: ["plugin:jsx-a11y/recommended"],
|
461
462
|
rules: {
|
@@ -508,7 +509,7 @@ function react(opts) {
|
|
508
509
|
// recommended rules from @eslint-react/hooks-extra
|
509
510
|
"@eslint-react/hooks-extra/prefer-use-state-lazy-initialization": "warn",
|
510
511
|
// recommended rules react-hooks
|
511
|
-
"react-
|
512
|
+
"@agilebot/react-rules-of-hooks": "error",
|
512
513
|
// recommended rules from @eslint-react/naming-convention
|
513
514
|
"@eslint-react/naming-convention/component-name": "error",
|
514
515
|
"@eslint-react/naming-convention/use-state": "error",
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@agilebot/eslint-config",
|
3
|
-
"version": "0.4.
|
3
|
+
"version": "0.4.4",
|
4
4
|
"description": "Agilebot's ESLint config",
|
5
5
|
"bin": {
|
6
6
|
"eslint-agilebot": "bin/eslint-agilebot"
|
@@ -38,20 +38,19 @@
|
|
38
38
|
"eslint-plugin-prettier": "^5.2.1",
|
39
39
|
"eslint-plugin-promise": "^7.1.0",
|
40
40
|
"eslint-plugin-react": "^7.35.0",
|
41
|
-
"eslint-plugin-react-hooks": "^4.6.2",
|
42
41
|
"eslint-plugin-unicorn": "^55.0.0",
|
43
42
|
"eslint-plugin-unused-imports": "^4.1.3",
|
44
43
|
"eslint-plugin-vue": "^9.27.0",
|
45
44
|
"eslint-plugin-you-dont-need-lodash-underscore": "^6.13.0",
|
46
45
|
"vue-eslint-parser": "^9.4.3",
|
47
|
-
"@agilebot/eslint-utils": "0.4.
|
46
|
+
"@agilebot/eslint-utils": "0.4.4"
|
48
47
|
},
|
49
48
|
"devDependencies": {
|
50
49
|
"eslint-config-love": "^63.0.0"
|
51
50
|
},
|
52
51
|
"peerDependencies": {
|
53
52
|
"eslint": "^7.0.0 || ^8.0.0 || ^9.0.0",
|
54
|
-
"@agilebot/eslint-plugin": "0.4.
|
53
|
+
"@agilebot/eslint-plugin": "0.4.4"
|
55
54
|
},
|
56
55
|
"files": [
|
57
56
|
"bin",
|