@sarj/eslint-plugin 9.10.0 → 9.11.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/dist/index.d.cts CHANGED
@@ -438,7 +438,7 @@ type FlatPreset = {
438
438
  declare const plugin: {
439
439
  meta: {
440
440
  readonly name: "@sarj/eslint-plugin";
441
- readonly version: "9.10.0";
441
+ readonly version: "9.11.0";
442
442
  };
443
443
  rules: {
444
444
  "enforce-file-structure": _typescript_eslint_utils_ts_eslint.RuleModule<"importsFirst" | "useServerDirective", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
package/dist/index.d.ts CHANGED
@@ -438,7 +438,7 @@ type FlatPreset = {
438
438
  declare const plugin: {
439
439
  meta: {
440
440
  readonly name: "@sarj/eslint-plugin";
441
- readonly version: "9.10.0";
441
+ readonly version: "9.11.0";
442
442
  };
443
443
  rules: {
444
444
  "enforce-file-structure": _typescript_eslint_utils_ts_eslint.RuleModule<"importsFirst" | "useServerDirective", readonly [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
package/dist/index.js CHANGED
@@ -641,6 +641,7 @@ var CODE_KEYWORD_RE = /^(import |export |const |let |var |function\b|class |inte
641
641
  var CODE_TAIL_RE = /[;{}()]\s*$|=>\s*$|,\s*$/;
642
642
  var ASSIGN_RE = /^[A-Za-z_$][\w.$[\]]*\s*(?:=(?![=>])|\+=|-=|\*=)\s*\S.*[;)}\]]\s*$/;
643
643
  var CALL_RE = /^[A-Za-z_$][\w.$]*\([^)]*\)\s*;?\s*$/;
644
+ var ASSERTION_CODE_RE = /^(?:await\s+)?(?:expect(?:TypeOf)?\s*\(.+\)\s*(?:\.\w+(?:<[^;()]*>)?)+(?:\s*\(.*\))?|assert(?:\.\w+)?\s*\(.+\))\s*;?\s*$/;
644
645
  var PSEUDOCODE_RE = /%\w+%|\[opt\]|(?:^|\s)<[A-Za-z]\w*>|…|\.\.\./;
645
646
  function stripCommentMarker(line) {
646
647
  return line.replace(/^\s*\/{1,2}/, "").replace(/^\s*\*+/, "").trim();
@@ -659,6 +660,7 @@ function looksLikeCode(text, allowCall = true) {
659
660
  if (!t) return false;
660
661
  if (CODE_KEYWORD_RE.test(t) && CODE_TAIL_RE.test(t)) return true;
661
662
  if (ASSIGN_RE.test(t)) return true;
663
+ if (ASSERTION_CODE_RE.test(t)) return true;
662
664
  return allowCall && CALL_RE.test(t);
663
665
  }
664
666
  function hasPseudocode(text) {
@@ -10323,7 +10325,7 @@ var rules = {
10323
10325
  };
10324
10326
  var meta = {
10325
10327
  name: "@sarj/eslint-plugin",
10326
- version: "9.10.0"
10328
+ version: "9.11.0"
10327
10329
  };
10328
10330
  var applicationOnlyRules = [
10329
10331
  "no-restricted-library-load",