@agilebot/eslint-plugin 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +36 -36
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* @license @agilebot/eslint-plugin v0.3.
|
2
|
+
* @license @agilebot/eslint-plugin v0.3.1
|
3
3
|
*
|
4
4
|
* Copyright (c) Agilebot, Inc. and its affiliates.
|
5
5
|
*
|
@@ -766,41 +766,6 @@ var unusedClasses = {
|
|
766
766
|
}
|
767
767
|
};
|
768
768
|
|
769
|
-
var noUnnecessaryTemplateLiterals = {
|
770
|
-
meta: {
|
771
|
-
type: 'problem',
|
772
|
-
docs: {
|
773
|
-
description: 'Check if a template string contains only one ${}',
|
774
|
-
recommended: true
|
775
|
-
},
|
776
|
-
fixable: 'code',
|
777
|
-
schema: []
|
778
|
-
},
|
779
|
-
create(context) {
|
780
|
-
return {
|
781
|
-
TemplateLiteral(node) {
|
782
|
-
const code = context.sourceCode.getText(node);
|
783
|
-
if (
|
784
|
-
code.startsWith('`${') &&
|
785
|
-
code.endsWith('}`') &&
|
786
|
-
code.split('${').length === 2
|
787
|
-
) {
|
788
|
-
context.report({
|
789
|
-
node,
|
790
|
-
message: 'Unnecessary template string with only one ${}.',
|
791
|
-
fix(fixer) {
|
792
|
-
return fixer.replaceText(
|
793
|
-
node,
|
794
|
-
code.substring(3, code.length - 2)
|
795
|
-
);
|
796
|
-
}
|
797
|
-
});
|
798
|
-
}
|
799
|
-
}
|
800
|
-
};
|
801
|
-
}
|
802
|
-
};
|
803
|
-
|
804
769
|
var betterExhaustiveDeps = {
|
805
770
|
meta: {
|
806
771
|
type: 'suggestion',
|
@@ -2532,6 +2497,41 @@ var preferSxProp = {
|
|
2532
2497
|
}
|
2533
2498
|
};
|
2534
2499
|
|
2500
|
+
var noUnnecessaryTemplateLiterals = {
|
2501
|
+
meta: {
|
2502
|
+
type: 'problem',
|
2503
|
+
docs: {
|
2504
|
+
description: 'Check if a template string contains only one ${}',
|
2505
|
+
recommended: true
|
2506
|
+
},
|
2507
|
+
fixable: 'code',
|
2508
|
+
schema: []
|
2509
|
+
},
|
2510
|
+
create(context) {
|
2511
|
+
return {
|
2512
|
+
TemplateLiteral(node) {
|
2513
|
+
const code = context.sourceCode.getText(node);
|
2514
|
+
if (
|
2515
|
+
code.startsWith('`${') &&
|
2516
|
+
code.endsWith('}`') &&
|
2517
|
+
code.split('${').length === 2
|
2518
|
+
) {
|
2519
|
+
context.report({
|
2520
|
+
node,
|
2521
|
+
message: 'Unnecessary template string with only one ${}.',
|
2522
|
+
fix(fixer) {
|
2523
|
+
return fixer.replaceText(
|
2524
|
+
node,
|
2525
|
+
code.substring(3, code.length - 2)
|
2526
|
+
);
|
2527
|
+
}
|
2528
|
+
});
|
2529
|
+
}
|
2530
|
+
}
|
2531
|
+
};
|
2532
|
+
}
|
2533
|
+
};
|
2534
|
+
|
2535
2535
|
var ruleFiles = /*#__PURE__*/Object.freeze({
|
2536
2536
|
__proto__: null,
|
2537
2537
|
rules_import_enforce_icon_alias: enforceIconAlias,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@agilebot/eslint-plugin",
|
3
|
-
"version": "0.3.
|
3
|
+
"version": "0.3.1",
|
4
4
|
"description": "Agilebot's ESLint plugin",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -20,7 +20,7 @@
|
|
20
20
|
"dependencies": {
|
21
21
|
"@typescript-eslint/utils": "~7.7.0",
|
22
22
|
"eslint-plugin-react": "^7.34.1",
|
23
|
-
"@agilebot/eslint-utils": "0.3.
|
23
|
+
"@agilebot/eslint-utils": "0.3.1"
|
24
24
|
},
|
25
25
|
"peerDependencies": {
|
26
26
|
"eslint": "^7.0.0 || ^8.0.0"
|