@admc.com/eslintplugin-sn-test 3.8.0 → 3.9.0
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/bad1Scripts/all/sp_widget.client_script/namedFn.js +1 -1
- package/bad1Scripts/all/sp_widget.link/backticks.js +5 -0
- package/bad1Scripts/all/sys_ui_context_menu/backticks.js +2 -0
- package/{bad1Scripts → bad2Scripts}/all/sp_widget.client_script/fnAssignment.js +4 -1
- package/bad2Scripts/all/sp_widget.client_script/ootbBoilerplate.js +8 -0
- package/goodScripts/all/sp_widget.link/cleanedBoilerplate.js +4 -0
- package/goodScripts/all/sp_widget.link/good.js +9 -0
- package/goodScripts/all/sys_ui_context_menu/good.js +2 -0
- package/goodScripts/scoped-es12/sp_widget.script/arrow.js +7 -0
- package/package.json +1 -1
- package/sneslintrc.json +2 -2
- /package/{bad1Scripts/all/sp_widget.client_script/ootbBoilerplate.js → goodScripts/all/sp_widget.client_script/cleanedBoilerplate.js} +0 -0
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
_unused = function($scope) {
|
|
2
|
+
/* I had to put this script under bad2Scripts instead of bad1Scripts to accommodate an
|
|
3
|
+
* ESLint bug where varsIgnorePatterns are sometimes not honored, including for "_unused". */
|
|
2
4
|
"use strict";
|
|
5
|
+
/* global _unused:writable */
|
|
3
6
|
const fName = "spclient/" + $scope.widget.id + ":" + $scope.$id;
|
|
4
7
|
console.warn("UPDATE02");
|
|
5
8
|
console.warn("$scope", $scope);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
api.controller=function() {
|
|
2
|
+
// Have to satisfy "use strict" or would have to complicate eslintplugin-sn-test design to
|
|
3
|
+
// allow arbitrarily-specified number of failures, or at least add support for 3 failures.
|
|
4
|
+
// Doing this instead of eslint-disable notation since that notation would conflict with wrapping:
|
|
5
|
+
"use strict";
|
|
6
|
+
/* widget controller */
|
|
7
|
+
var c = this;
|
|
8
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
(scope) => {
|
|
2
|
+
"use strict";
|
|
3
|
+
const fName = "splink/" + scope.widget.id + ":" + scope.$id;
|
|
4
|
+
console.warn("UPDATE02");
|
|
5
|
+
console.warn("scope", scope);
|
|
6
|
+
console.info("Executing " + fName + " with this", this);
|
|
7
|
+
this.thisVar = "I am here"; // To facilitate checking for this exact instance
|
|
8
|
+
scope.pneu = "new string";
|
|
9
|
+
}
|
package/package.json
CHANGED
package/sneslintrc.json
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"overrides": [
|
|
30
30
|
{ // ES6 overrides
|
|
31
31
|
"files": [ "**/@(noniso|iso)/*.js",
|
|
32
|
-
"**/@(sys_ui_script|sys_script_validator|sp_widget.client_script|sys_ux_data_broker_scriptlet)/all/*.js"], // eslint-disable-line max-len
|
|
32
|
+
"**/@(sys_ui_script|sys_script_validator|sp_widget.client_script|sys_ux_data_broker_scriptlet|sp_widget.link|sys_ui_context_menu)/all/*.js"], // eslint-disable-line max-len
|
|
33
33
|
"rules": {
|
|
34
34
|
"strict": ["error", "function"],
|
|
35
35
|
"prefer-arrow-callback": "error",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
// Reverting eslint-plugin-sn exceptions back, because we overrode them generally above
|
|
58
58
|
// when raising warnings to errors.
|
|
59
59
|
"files":
|
|
60
|
-
["**/@(sys_ui_script|sp_widget.script|sp_widget.client_script|sp_widget.link)/*/*.js"],
|
|
60
|
+
["**/@(sys_ui_script|sp_widget.script|sp_widget.client_script|sp_widget.link|sp_widget.link|sys_ui_context_menu)/*/*.js"],
|
|
61
61
|
"rules": {
|
|
62
62
|
"prefer-template": "off",
|
|
63
63
|
"no-template-curly-in-string": "off"
|