@agilebot/eslint-plugin 0.7.2 → 0.7.4
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 +1 -1
- package/dist/index.js +47 -17
- package/package.json +4 -4
package/README.md
CHANGED
package/dist/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license @agilebot/eslint-plugin v0.7.
|
2
|
+
* @license @agilebot/eslint-plugin v0.7.4
|
3
3
|
*
|
4
4
|
* Copyright (c) Agilebot, Inc. and its affiliates.
|
5
5
|
*
|
@@ -38,9 +38,9 @@ const hasDocs = typeof ["enforce-mui-icon-alias","intl-id-missing","intl-id-pref
|
|
38
38
|
["enforce-mui-icon-alias","intl-id-missing","intl-id-prefix","intl-no-default","react-better-exhaustive-deps"] : [];
|
39
39
|
const createRule = utils.ESLintUtils.RuleCreator(name => hasDocs.includes(name) ? "".concat(docBaseUrl).concat(name, ".md") : "".concat(docBaseUrl).concat(name, ".test.js"));
|
40
40
|
|
41
|
-
const RULE_NAME$
|
41
|
+
const RULE_NAME$j = 'enforce-mui-icon-alias';
|
42
42
|
var enforceMuiIconAlias = createRule({
|
43
|
-
name: RULE_NAME$
|
43
|
+
name: RULE_NAME$j,
|
44
44
|
meta: {
|
45
45
|
type: 'problem',
|
46
46
|
docs: {
|
@@ -93,9 +93,9 @@ function warnOnce(message) {
|
|
93
93
|
console.warn("Warning: ".concat(message));
|
94
94
|
}
|
95
95
|
|
96
|
-
const RULE_NAME$
|
96
|
+
const RULE_NAME$i = 'import-monorepo';
|
97
97
|
var importMonorepo = createRule({
|
98
|
-
name: RULE_NAME$
|
98
|
+
name: RULE_NAME$i,
|
99
99
|
meta: {
|
100
100
|
type: 'problem',
|
101
101
|
docs: {
|
@@ -211,9 +211,9 @@ function getIntlIds(context) {
|
|
211
211
|
return results;
|
212
212
|
}
|
213
213
|
|
214
|
-
const RULE_NAME$
|
214
|
+
const RULE_NAME$h = 'intl-id-missing';
|
215
215
|
var intlIdMissing = createRule({
|
216
|
-
name: RULE_NAME$
|
216
|
+
name: RULE_NAME$h,
|
217
217
|
meta: {
|
218
218
|
type: 'problem',
|
219
219
|
docs: {
|
@@ -301,9 +301,9 @@ var intlIdMissing = createRule({
|
|
301
301
|
}
|
302
302
|
});
|
303
303
|
|
304
|
-
const RULE_NAME$
|
304
|
+
const RULE_NAME$g = 'intl-id-naming';
|
305
305
|
var intlIdNaming = createRule({
|
306
|
-
name: RULE_NAME$
|
306
|
+
name: RULE_NAME$g,
|
307
307
|
meta: {
|
308
308
|
type: 'problem',
|
309
309
|
docs: {
|
@@ -396,9 +396,9 @@ var intlIdNaming = createRule({
|
|
396
396
|
}
|
397
397
|
});
|
398
398
|
|
399
|
-
const RULE_NAME$
|
399
|
+
const RULE_NAME$f = 'intl-id-prefix';
|
400
400
|
var intlIdPrefix = createRule({
|
401
|
-
name: RULE_NAME$
|
401
|
+
name: RULE_NAME$f,
|
402
402
|
meta: {
|
403
403
|
type: 'problem',
|
404
404
|
docs: {
|
@@ -472,10 +472,10 @@ var intlIdPrefix = createRule({
|
|
472
472
|
}
|
473
473
|
});
|
474
474
|
|
475
|
-
const RULE_NAME$
|
475
|
+
const RULE_NAME$e = 'intl-id-unused';
|
476
476
|
const usedIds = new Map();
|
477
477
|
var intlIdUnused = createRule({
|
478
|
-
name: RULE_NAME$
|
478
|
+
name: RULE_NAME$e,
|
479
479
|
meta: {
|
480
480
|
type: 'problem',
|
481
481
|
docs: {
|
@@ -551,9 +551,9 @@ var intlIdUnused = createRule({
|
|
551
551
|
}
|
552
552
|
});
|
553
553
|
|
554
|
-
const RULE_NAME$
|
554
|
+
const RULE_NAME$d = 'intl-no-default';
|
555
555
|
var intlNoDefault = createRule({
|
556
|
-
name: RULE_NAME$
|
556
|
+
name: RULE_NAME$d,
|
557
557
|
meta: {
|
558
558
|
type: 'problem',
|
559
559
|
docs: {
|
@@ -595,9 +595,9 @@ var intlNoDefault = createRule({
|
|
595
595
|
}
|
596
596
|
});
|
597
597
|
|
598
|
-
const RULE_NAME$
|
598
|
+
const RULE_NAME$c = 'no-async-array-methods';
|
599
599
|
var noAsyncArrayMethods = createRule({
|
600
|
-
name: RULE_NAME$
|
600
|
+
name: RULE_NAME$c,
|
601
601
|
meta: {
|
602
602
|
type: 'problem',
|
603
603
|
docs: {
|
@@ -639,6 +639,35 @@ var noAsyncArrayMethods = createRule({
|
|
639
639
|
}
|
640
640
|
});
|
641
641
|
|
642
|
+
const RULE_NAME$b = 'no-extends-error';
|
643
|
+
var noExtendsError = createRule({
|
644
|
+
name: RULE_NAME$b,
|
645
|
+
meta: {
|
646
|
+
type: 'problem',
|
647
|
+
docs: {
|
648
|
+
description: 'Disallow extending the Error class',
|
649
|
+
recommended: 'recommended'
|
650
|
+
},
|
651
|
+
schema: [],
|
652
|
+
messages: {
|
653
|
+
noExtendsError: "Extending the 'Error' class is prohibited."
|
654
|
+
}
|
655
|
+
},
|
656
|
+
defaultOptions: [],
|
657
|
+
create(context) {
|
658
|
+
return {
|
659
|
+
ClassDeclaration(node) {
|
660
|
+
if (node.superClass && node.superClass.type === 'Identifier' && node.superClass.name === 'Error') {
|
661
|
+
context.report({
|
662
|
+
node: node.superClass,
|
663
|
+
messageId: 'noExtendsError'
|
664
|
+
});
|
665
|
+
}
|
666
|
+
}
|
667
|
+
};
|
668
|
+
}
|
669
|
+
});
|
670
|
+
|
642
671
|
const RULE_NAME$a = 'no-import-css';
|
643
672
|
var noImportCss = createRule({
|
644
673
|
name: RULE_NAME$a,
|
@@ -2940,6 +2969,7 @@ var ruleFiles = /*#__PURE__*/Object.freeze({
|
|
2940
2969
|
rules_intl_id_unused: intlIdUnused,
|
2941
2970
|
rules_intl_no_default: intlNoDefault,
|
2942
2971
|
rules_no_async_array_methods: noAsyncArrayMethods,
|
2972
|
+
rules_no_extends_error: noExtendsError,
|
2943
2973
|
rules_no_import_css: noImportCss,
|
2944
2974
|
rules_no_then_catch_finally: noThenCatchFinally,
|
2945
2975
|
rules_no_unnecessary_template_literals: noUnnecessaryTemplateLiterals,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@agilebot/eslint-plugin",
|
3
|
-
"version": "0.7.
|
3
|
+
"version": "0.7.4",
|
4
4
|
"description": "Agilebot's ESLint plugin",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -19,9 +19,9 @@
|
|
19
19
|
},
|
20
20
|
"dependencies": {
|
21
21
|
"@eslint/compat": "^1.2.3",
|
22
|
-
"@typescript-eslint/utils": "~8.
|
22
|
+
"@typescript-eslint/utils": "~8.25.0",
|
23
23
|
"eslint-plugin-react": "^7.37.2",
|
24
|
-
"@agilebot/eslint-utils": "0.7.
|
24
|
+
"@agilebot/eslint-utils": "0.7.4"
|
25
25
|
},
|
26
26
|
"peerDependencies": {
|
27
27
|
"eslint": "^8.57.0 || ^9.0.0"
|
@@ -34,7 +34,7 @@
|
|
34
34
|
"@types/estree": "^1.0.5",
|
35
35
|
"color-name": "^2.0.0",
|
36
36
|
"eslint-vitest-rule-tester": "^0.6.1",
|
37
|
-
"typescript-eslint": "~8.
|
37
|
+
"typescript-eslint": "~8.25.0"
|
38
38
|
},
|
39
39
|
"scripts": {
|
40
40
|
"build": "rollup -c rollup.config.mjs",
|