@agilebot/eslint-config 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
package/dist/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @agilebot/eslint-config v0.5.0
2
+ * @license @agilebot/eslint-config v0.5.1
3
3
  *
4
4
  * Copyright (c) Agilebot, Inc. and its affiliates.
5
5
  *
@@ -36,6 +36,7 @@ var import_node_path = __toESM(require("path"));
36
36
  var import_eslint_utils = require("@agilebot/eslint-utils");
37
37
  var import_yargs = __toESM(require("yargs"));
38
38
  var import_helpers = require("yargs/helpers");
39
+ var import_picocolors = __toESM(require("picocolors"));
39
40
 
40
41
  // src/constants.ts
41
42
  var JS_EXTS = [".js", ".jsx", ".cjs", ".cjsx", ".mjs", ".mjsx"];
@@ -93,7 +94,9 @@ function cli() {
93
94
  process.argv = process.argv.slice(0, 2);
94
95
  if (argv._.length === 0) {
95
96
  console.error(
96
- "Error: 'patterns' must be a non-empty string or an array of non-empty strings"
97
+ import_picocolors.default.red(
98
+ "Error: 'patterns' must be a non-empty string or an array of non-empty strings"
99
+ )
97
100
  );
98
101
  process.exit(1);
99
102
  }
@@ -121,7 +124,9 @@ function cli() {
121
124
  }
122
125
  if (!argv.showWarningsInCi && (0, import_eslint_utils.isCI)()) {
123
126
  console.warn(
124
- "Warning: eslint-agilebot will report errors only in CI environment"
127
+ import_picocolors.default.yellow(
128
+ "Warning: eslint-agilebot will report errors only in CI environment"
129
+ )
125
130
  );
126
131
  process.argv.splice(2, 0, "--quiet");
127
132
  }
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license @agilebot/eslint-config v0.5.0
2
+ * @license @agilebot/eslint-config v0.5.1
3
3
  *
4
4
  * Copyright (c) Agilebot, Inc. and its affiliates.
5
5
  *
@@ -521,6 +521,7 @@ function react(opts) {
521
521
  "@eslint-react/web-api/no-leaked-interval": "warn",
522
522
  "@eslint-react/web-api/no-leaked-timeout": "warn",
523
523
  "@eslint-react/web-api/no-leaked-event-listener": "warn",
524
+ "@eslint-react/web-api/no-leaked-resize-observer": "warn",
524
525
  // 以下是自定义规则
525
526
  "react/jsx-handler-names": [
526
527
  "error",
@@ -608,7 +609,10 @@ function jsdoc(opt) {
608
609
  function lodash() {
609
610
  return {
610
611
  // lodash一些方法可能影响性能,如forEach等,优先使用js的原生方法
611
- extends: ["plugin:you-dont-need-lodash-underscore/compatible"]
612
+ extends: ["plugin:you-dont-need-lodash-underscore/compatible"],
613
+ rules: {
614
+ "you-dont-need-lodash-underscore/throttle": "off"
615
+ }
612
616
  };
613
617
  }
614
618
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agilebot/eslint-config",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Agilebot's ESLint config",
5
5
  "bin": {
6
6
  "eslint-agilebot": "bin/eslint-agilebot"
@@ -42,9 +42,10 @@
42
42
  "eslint-plugin-unused-imports": "^4.1.4",
43
43
  "eslint-plugin-vue": "^9.28.0",
44
44
  "eslint-plugin-you-dont-need-lodash-underscore": "^6.13.0",
45
+ "picocolors": "^1.1.0",
45
46
  "vue-eslint-parser": "^9.4.3",
46
47
  "yargs": "^17.7.2",
47
- "@agilebot/eslint-utils": "0.5.0"
48
+ "@agilebot/eslint-utils": "0.5.1"
48
49
  },
49
50
  "devDependencies": {
50
51
  "@types/yargs": "^17.0.33",
@@ -52,7 +53,7 @@
52
53
  },
53
54
  "peerDependencies": {
54
55
  "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0",
55
- "@agilebot/eslint-plugin": "0.5.0"
56
+ "@agilebot/eslint-plugin": "0.5.1"
56
57
  },
57
58
  "files": [
58
59
  "bin",