@admc.com/eslintplugin-sn-test 2.0.6 → 2.0.8

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.
@@ -0,0 +1 @@
1
+ gs.log(gs.now() + " is from obsoleted function", "src");
@@ -0,0 +1,5 @@
1
+ const gr = new GlideRecord("sys_script_fix");
2
+ gr.setLimit(1);
3
+ if (gr.next()) console.info(`Got sys_script_fix ${gr.sys_id}`);
4
+ gr.setValue("someField", "someVal");
5
+ if (!gr.update()) throw new Error("update failed");
@@ -1,2 +1,3 @@
1
+ // eslint-disable-next-line prefer-template
1
2
  console.info(location + ` now in multi-line
2
3
  backtick string`);
@@ -0,0 +1,5 @@
1
+ const gr = new GlideRecord("sys_script_fix");
2
+ gr.setLimit(1);
3
+ if (gr.next()) gs.log("Got sys_script_fix " + gr.sys_id, "src");
4
+ gr.setValue("someField", "someVal");
5
+ if (!gr.update()) throw new Error("update failed");
@@ -0,0 +1,2 @@
1
+ const grs = new GlideRecordSecure("sys_db_object");
2
+ gs.log(grs.getRowCount() + " db objects", "src");
@@ -0,0 +1,4 @@
1
+ (function() {
2
+ // This is the supported replacement for obsoleted gs.now() function:
3
+ gs.info("Today in UTF is " + new GlideDate().getDisplayValue());
4
+ })(previous, current);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@admc.com/eslintplugin-sn-test",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "description": "External tests for ESLint plugin @admc.com/eslint-plugin-sn",
5
5
  "scripts": {
6
6
  "test": "mocha --recursive",
package/sneslintrc.json CHANGED
@@ -30,28 +30,16 @@
30
30
  "files": ["**/sys_ui_script/*/*.js"],
31
31
  "rules": { "@admc.com/sn/no-uiscript-curlyref": "error" }
32
32
  },{ // ES6 overrides
33
- "files": [
34
- "**/@(global|scoped)/*.js",
35
- "**/sys_ui_action/@(iso|noniso)_@(global|scoped)action/*.js"
36
- ]
37
- },{ // ES6 overrides
38
- "files": [ "**/@(noniso|iso)/*.js", "**/@(sys_ui_script|sys_script_validator)/*.js"],
33
+ "files": [ "**/@(noniso|iso)/*.js",
34
+ "**/@(sys_ui_script|sys_script_validator|sp_widget.client_script)/all/*.js"],
39
35
  "rules": {
40
36
  "strict": ["error", "safe"],
41
37
  "prefer-arrow-callback": "error",
42
38
  "object-shorthand": "error",
43
39
  "no-useless-rename": "error",
44
40
  "no-var": "error",
45
- "prefer-template": "error"
46
- }
47
- }, {
48
- "files": [ "**/sys_ui_script/*.js" ],
49
- "rules": {
50
- "strict": ["error", "safe"],
51
- "prefer-arrow-callback": "error",
52
- "object-shorthand": "error",
53
- "no-useless-rename": "error",
54
- "no-var": "error"
41
+ "prefer-template": "error",
42
+ "@admc.com/sn/no-client-gr": "error"
55
43
  }
56
44
  }, { // Custom table and scope
57
45
  "files": [ "**/custom_table/custom_alt/*.js" ],