ace-linters 1.3.2 → 1.3.3

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.
@@ -2088,38 +2088,26 @@ module.exports = function callBoundIntrinsic(name, allowMissing) {
2088
2088
 
2089
2089
  var bind = __webpack_require__(9138);
2090
2090
  var GetIntrinsic = __webpack_require__(528);
2091
+ var setFunctionLength = __webpack_require__(6108);
2091
2092
 
2093
+ var $TypeError = __webpack_require__(3468);
2092
2094
  var $apply = GetIntrinsic('%Function.prototype.apply%');
2093
2095
  var $call = GetIntrinsic('%Function.prototype.call%');
2094
2096
  var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
2095
2097
 
2096
- var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
2097
- var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
2098
+ var $defineProperty = __webpack_require__(4940);
2098
2099
  var $max = GetIntrinsic('%Math.max%');
2099
2100
 
2100
- if ($defineProperty) {
2101
- try {
2102
- $defineProperty({}, 'a', { value: 1 });
2103
- } catch (e) {
2104
- // IE 8 has a broken defineProperty
2105
- $defineProperty = null;
2106
- }
2107
- }
2108
-
2109
2101
  module.exports = function callBind(originalFunction) {
2110
- var func = $reflectApply(bind, $call, arguments);
2111
- if ($gOPD && $defineProperty) {
2112
- var desc = $gOPD(func, 'length');
2113
- if (desc.configurable) {
2114
- // original length, plus the receiver, minus any additional arguments (after the receiver)
2115
- $defineProperty(
2116
- func,
2117
- 'length',
2118
- { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
2119
- );
2120
- }
2102
+ if (typeof originalFunction !== 'function') {
2103
+ throw new $TypeError('a function is required');
2121
2104
  }
2122
- return func;
2105
+ var func = $reflectApply(bind, $call, arguments);
2106
+ return setFunctionLength(
2107
+ func,
2108
+ 1 + $max(0, originalFunction.length - (arguments.length - 1)),
2109
+ true
2110
+ );
2123
2111
  };
2124
2112
 
2125
2113
  var applyBind = function applyBind() {
@@ -2227,6 +2215,70 @@ function consoleAssert(expression) {
2227
2215
  }
2228
2216
 
2229
2217
 
2218
+ /***/ }),
2219
+
2220
+ /***/ 686:
2221
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2222
+
2223
+ "use strict";
2224
+
2225
+
2226
+ var $defineProperty = __webpack_require__(4940);
2227
+
2228
+ var $SyntaxError = __webpack_require__(5731);
2229
+ var $TypeError = __webpack_require__(3468);
2230
+
2231
+ var gopd = __webpack_require__(9336);
2232
+
2233
+ /** @type {import('.')} */
2234
+ module.exports = function defineDataProperty(
2235
+ obj,
2236
+ property,
2237
+ value
2238
+ ) {
2239
+ if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
2240
+ throw new $TypeError('`obj` must be an object or a function`');
2241
+ }
2242
+ if (typeof property !== 'string' && typeof property !== 'symbol') {
2243
+ throw new $TypeError('`property` must be a string or a symbol`');
2244
+ }
2245
+ if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
2246
+ throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');
2247
+ }
2248
+ if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
2249
+ throw new $TypeError('`nonWritable`, if provided, must be a boolean or null');
2250
+ }
2251
+ if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
2252
+ throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');
2253
+ }
2254
+ if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
2255
+ throw new $TypeError('`loose`, if provided, must be a boolean');
2256
+ }
2257
+
2258
+ var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
2259
+ var nonWritable = arguments.length > 4 ? arguments[4] : null;
2260
+ var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
2261
+ var loose = arguments.length > 6 ? arguments[6] : false;
2262
+
2263
+ /* @type {false | TypedPropertyDescriptor<unknown>} */
2264
+ var desc = !!gopd && gopd(obj, property);
2265
+
2266
+ if ($defineProperty) {
2267
+ $defineProperty(obj, property, {
2268
+ configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
2269
+ enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
2270
+ value: value,
2271
+ writable: nonWritable === null && desc ? desc.writable : !nonWritable
2272
+ });
2273
+ } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
2274
+ // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
2275
+ obj[property] = value; // eslint-disable-line no-param-reassign
2276
+ } else {
2277
+ throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
2278
+ }
2279
+ };
2280
+
2281
+
2230
2282
  /***/ }),
2231
2283
 
2232
2284
  /***/ 1857:
@@ -2288,6 +2340,114 @@ defineProperties.supportsDescriptors = !!supportsDescriptors;
2288
2340
  module.exports = defineProperties;
2289
2341
 
2290
2342
 
2343
+ /***/ }),
2344
+
2345
+ /***/ 4940:
2346
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2347
+
2348
+ "use strict";
2349
+
2350
+
2351
+ var GetIntrinsic = __webpack_require__(528);
2352
+
2353
+ /** @type {import('.')} */
2354
+ var $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false;
2355
+ if ($defineProperty) {
2356
+ try {
2357
+ $defineProperty({}, 'a', { value: 1 });
2358
+ } catch (e) {
2359
+ // IE 8 has a broken defineProperty
2360
+ $defineProperty = false;
2361
+ }
2362
+ }
2363
+
2364
+ module.exports = $defineProperty;
2365
+
2366
+
2367
+ /***/ }),
2368
+
2369
+ /***/ 6729:
2370
+ /***/ ((module) => {
2371
+
2372
+ "use strict";
2373
+
2374
+
2375
+ /** @type {import('./eval')} */
2376
+ module.exports = EvalError;
2377
+
2378
+
2379
+ /***/ }),
2380
+
2381
+ /***/ 9838:
2382
+ /***/ ((module) => {
2383
+
2384
+ "use strict";
2385
+
2386
+
2387
+ /** @type {import('.')} */
2388
+ module.exports = Error;
2389
+
2390
+
2391
+ /***/ }),
2392
+
2393
+ /***/ 1155:
2394
+ /***/ ((module) => {
2395
+
2396
+ "use strict";
2397
+
2398
+
2399
+ /** @type {import('./range')} */
2400
+ module.exports = RangeError;
2401
+
2402
+
2403
+ /***/ }),
2404
+
2405
+ /***/ 4943:
2406
+ /***/ ((module) => {
2407
+
2408
+ "use strict";
2409
+
2410
+
2411
+ /** @type {import('./ref')} */
2412
+ module.exports = ReferenceError;
2413
+
2414
+
2415
+ /***/ }),
2416
+
2417
+ /***/ 5731:
2418
+ /***/ ((module) => {
2419
+
2420
+ "use strict";
2421
+
2422
+
2423
+ /** @type {import('./syntax')} */
2424
+ module.exports = SyntaxError;
2425
+
2426
+
2427
+ /***/ }),
2428
+
2429
+ /***/ 3468:
2430
+ /***/ ((module) => {
2431
+
2432
+ "use strict";
2433
+
2434
+
2435
+ /** @type {import('./type')} */
2436
+ module.exports = TypeError;
2437
+
2438
+
2439
+ /***/ }),
2440
+
2441
+ /***/ 2140:
2442
+ /***/ ((module) => {
2443
+
2444
+ "use strict";
2445
+
2446
+
2447
+ /** @type {import('./uri')} */
2448
+ module.exports = URIError;
2449
+
2450
+
2291
2451
  /***/ }),
2292
2452
 
2293
2453
  /***/ 3046:
@@ -2929,43 +3089,75 @@ module.exports = forEach;
2929
3089
  /* eslint no-invalid-this: 1 */
2930
3090
 
2931
3091
  var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
2932
- var slice = Array.prototype.slice;
2933
3092
  var toStr = Object.prototype.toString;
3093
+ var max = Math.max;
2934
3094
  var funcType = '[object Function]';
2935
3095
 
3096
+ var concatty = function concatty(a, b) {
3097
+ var arr = [];
3098
+
3099
+ for (var i = 0; i < a.length; i += 1) {
3100
+ arr[i] = a[i];
3101
+ }
3102
+ for (var j = 0; j < b.length; j += 1) {
3103
+ arr[j + a.length] = b[j];
3104
+ }
3105
+
3106
+ return arr;
3107
+ };
3108
+
3109
+ var slicy = function slicy(arrLike, offset) {
3110
+ var arr = [];
3111
+ for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
3112
+ arr[j] = arrLike[i];
3113
+ }
3114
+ return arr;
3115
+ };
3116
+
3117
+ var joiny = function (arr, joiner) {
3118
+ var str = '';
3119
+ for (var i = 0; i < arr.length; i += 1) {
3120
+ str += arr[i];
3121
+ if (i + 1 < arr.length) {
3122
+ str += joiner;
3123
+ }
3124
+ }
3125
+ return str;
3126
+ };
3127
+
2936
3128
  module.exports = function bind(that) {
2937
3129
  var target = this;
2938
- if (typeof target !== 'function' || toStr.call(target) !== funcType) {
3130
+ if (typeof target !== 'function' || toStr.apply(target) !== funcType) {
2939
3131
  throw new TypeError(ERROR_MESSAGE + target);
2940
3132
  }
2941
- var args = slice.call(arguments, 1);
3133
+ var args = slicy(arguments, 1);
2942
3134
 
2943
3135
  var bound;
2944
3136
  var binder = function () {
2945
3137
  if (this instanceof bound) {
2946
3138
  var result = target.apply(
2947
3139
  this,
2948
- args.concat(slice.call(arguments))
3140
+ concatty(args, arguments)
2949
3141
  );
2950
3142
  if (Object(result) === result) {
2951
3143
  return result;
2952
3144
  }
2953
3145
  return this;
2954
- } else {
2955
- return target.apply(
2956
- that,
2957
- args.concat(slice.call(arguments))
2958
- );
2959
3146
  }
3147
+ return target.apply(
3148
+ that,
3149
+ concatty(args, arguments)
3150
+ );
3151
+
2960
3152
  };
2961
3153
 
2962
- var boundLength = Math.max(0, target.length - args.length);
3154
+ var boundLength = max(0, target.length - args.length);
2963
3155
  var boundArgs = [];
2964
3156
  for (var i = 0; i < boundLength; i++) {
2965
- boundArgs.push('$' + i);
3157
+ boundArgs[i] = '$' + i;
2966
3158
  }
2967
3159
 
2968
- bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
3160
+ bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
2969
3161
 
2970
3162
  if (target.prototype) {
2971
3163
  var Empty = function Empty() {};
@@ -3001,9 +3193,15 @@ module.exports = Function.prototype.bind || implementation;
3001
3193
 
3002
3194
  var undefined;
3003
3195
 
3004
- var $SyntaxError = SyntaxError;
3196
+ var $Error = __webpack_require__(9838);
3197
+ var $EvalError = __webpack_require__(6729);
3198
+ var $RangeError = __webpack_require__(1155);
3199
+ var $ReferenceError = __webpack_require__(4943);
3200
+ var $SyntaxError = __webpack_require__(5731);
3201
+ var $TypeError = __webpack_require__(3468);
3202
+ var $URIError = __webpack_require__(2140);
3203
+
3005
3204
  var $Function = Function;
3006
- var $TypeError = TypeError;
3007
3205
 
3008
3206
  // eslint-disable-next-line consistent-return
3009
3207
  var getEvalledConstructor = function (expressionSyntax) {
@@ -3055,6 +3253,7 @@ var needsEval = {};
3055
3253
  var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);
3056
3254
 
3057
3255
  var INTRINSICS = {
3256
+ __proto__: null,
3058
3257
  '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
3059
3258
  '%Array%': Array,
3060
3259
  '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
@@ -3075,9 +3274,9 @@ var INTRINSICS = {
3075
3274
  '%decodeURIComponent%': decodeURIComponent,
3076
3275
  '%encodeURI%': encodeURI,
3077
3276
  '%encodeURIComponent%': encodeURIComponent,
3078
- '%Error%': Error,
3277
+ '%Error%': $Error,
3079
3278
  '%eval%': eval, // eslint-disable-line no-eval
3080
- '%EvalError%': EvalError,
3279
+ '%EvalError%': $EvalError,
3081
3280
  '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
3082
3281
  '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
3083
3282
  '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
@@ -3099,8 +3298,8 @@ var INTRINSICS = {
3099
3298
  '%parseInt%': parseInt,
3100
3299
  '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
3101
3300
  '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
3102
- '%RangeError%': RangeError,
3103
- '%ReferenceError%': ReferenceError,
3301
+ '%RangeError%': $RangeError,
3302
+ '%ReferenceError%': $ReferenceError,
3104
3303
  '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
3105
3304
  '%RegExp%': RegExp,
3106
3305
  '%Set%': typeof Set === 'undefined' ? undefined : Set,
@@ -3117,7 +3316,7 @@ var INTRINSICS = {
3117
3316
  '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
3118
3317
  '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
3119
3318
  '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
3120
- '%URIError%': URIError,
3319
+ '%URIError%': $URIError,
3121
3320
  '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
3122
3321
  '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
3123
3322
  '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
@@ -3159,6 +3358,7 @@ var doEval = function doEval(name) {
3159
3358
  };
3160
3359
 
3161
3360
  var LEGACY_ALIASES = {
3361
+ __proto__: null,
3162
3362
  '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
3163
3363
  '%ArrayPrototype%': ['Array', 'prototype'],
3164
3364
  '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
@@ -3213,7 +3413,7 @@ var LEGACY_ALIASES = {
3213
3413
  };
3214
3414
 
3215
3415
  var bind = __webpack_require__(9138);
3216
- var hasOwn = __webpack_require__(2571);
3416
+ var hasOwn = __webpack_require__(8554);
3217
3417
  var $concat = bind.call(Function.call, Array.prototype.concat);
3218
3418
  var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
3219
3419
  var $replace = bind.call(Function.call, String.prototype.replace);
@@ -3382,26 +3582,15 @@ module.exports = $gOPD;
3382
3582
  "use strict";
3383
3583
 
3384
3584
 
3385
- var GetIntrinsic = __webpack_require__(528);
3386
-
3387
- var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
3585
+ var $defineProperty = __webpack_require__(4940);
3388
3586
 
3389
3587
  var hasPropertyDescriptors = function hasPropertyDescriptors() {
3390
- if ($defineProperty) {
3391
- try {
3392
- $defineProperty({}, 'a', { value: 1 });
3393
- return true;
3394
- } catch (e) {
3395
- // IE 8 has a broken defineProperty
3396
- return false;
3397
- }
3398
- }
3399
- return false;
3588
+ return !!$defineProperty;
3400
3589
  };
3401
3590
 
3402
3591
  hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
3403
3592
  // node v0.6 has a bug where array lengths can be Set but not Defined
3404
- if (!hasPropertyDescriptors()) {
3593
+ if (!$defineProperty) {
3405
3594
  return null;
3406
3595
  }
3407
3596
  try {
@@ -3522,15 +3711,18 @@ module.exports = function hasToStringTagShams() {
3522
3711
 
3523
3712
  /***/ }),
3524
3713
 
3525
- /***/ 2571:
3714
+ /***/ 8554:
3526
3715
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3527
3716
 
3528
3717
  "use strict";
3529
3718
 
3530
3719
 
3720
+ var call = Function.prototype.call;
3721
+ var $hasOwn = Object.prototype.hasOwnProperty;
3531
3722
  var bind = __webpack_require__(9138);
3532
3723
 
3533
- module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
3724
+ /** @type {import('.')} */
3725
+ module.exports = bind.call(call, $hasOwn);
3534
3726
 
3535
3727
 
3536
3728
  /***/ }),
@@ -4339,6 +4531,56 @@ process.chdir = function (dir) {
4339
4531
  process.umask = function() { return 0; };
4340
4532
 
4341
4533
 
4534
+ /***/ }),
4535
+
4536
+ /***/ 6108:
4537
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4538
+
4539
+ "use strict";
4540
+
4541
+
4542
+ var GetIntrinsic = __webpack_require__(528);
4543
+ var define = __webpack_require__(686);
4544
+ var hasDescriptors = __webpack_require__(7239)();
4545
+ var gOPD = __webpack_require__(9336);
4546
+
4547
+ var $TypeError = __webpack_require__(3468);
4548
+ var $floor = GetIntrinsic('%Math.floor%');
4549
+
4550
+ /** @type {import('.')} */
4551
+ module.exports = function setFunctionLength(fn, length) {
4552
+ if (typeof fn !== 'function') {
4553
+ throw new $TypeError('`fn` is not a function');
4554
+ }
4555
+ if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) {
4556
+ throw new $TypeError('`length` must be a positive 32-bit integer');
4557
+ }
4558
+
4559
+ var loose = arguments.length > 2 && !!arguments[2];
4560
+
4561
+ var functionLengthIsConfigurable = true;
4562
+ var functionLengthIsWritable = true;
4563
+ if ('length' in fn && gOPD) {
4564
+ var desc = gOPD(fn, 'length');
4565
+ if (desc && !desc.configurable) {
4566
+ functionLengthIsConfigurable = false;
4567
+ }
4568
+ if (desc && !desc.writable) {
4569
+ functionLengthIsWritable = false;
4570
+ }
4571
+ }
4572
+
4573
+ if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
4574
+ if (hasDescriptors) {
4575
+ define(/** @type {Parameters<define>[0]} */ (fn), 'length', length, true, true);
4576
+ } else {
4577
+ define(/** @type {Parameters<define>[0]} */ (fn), 'length', length);
4578
+ }
4579
+ }
4580
+ return fn;
4581
+ };
4582
+
4583
+
4342
4584
  /***/ }),
4343
4585
 
4344
4586
  /***/ 8583:
@@ -19756,11 +19998,27 @@ function toCompletion(item) {
19756
19998
  let kind = itemKind ? Object.keys(main.CompletionItemKind)[Object.values(main.CompletionItemKind).indexOf(itemKind)] : undefined;
19757
19999
  var _item_textEdit_newText, _ref;
19758
20000
  let text = (_ref = (_item_textEdit_newText = (_item_textEdit = item.textEdit) === null || _item_textEdit === void 0 ? void 0 : _item_textEdit.newText) !== null && _item_textEdit_newText !== void 0 ? _item_textEdit_newText : item.insertText) !== null && _ref !== void 0 ? _ref : item.label;
20001
+ let filterText;
19759
20002
  // filtering would happen on ace editor side
19760
- // TODO: if filtering and sorting are on server side, we should disable FilteredList in ace completer
19761
- text = item.filterText && !text.startsWith(item.filterText) ? item.filterText + text : text;
20003
+ //TODO: if filtering and sorting are on server side, we should disable FilteredList in ace completer
20004
+ if (item.filterText) {
20005
+ const firstWordMatch = item.filterText.match(/\w+/);
20006
+ const firstWord = firstWordMatch ? firstWordMatch[0] : null;
20007
+ if (firstWord) {
20008
+ const wordRegex = new RegExp(`\\b${firstWord}\\b`, 'i');
20009
+ if (!wordRegex.test(text)) {
20010
+ text = `${item.filterText} ${text}`;
20011
+ filterText = item.filterText;
20012
+ }
20013
+ } else {
20014
+ if (!text.includes(item.filterText)) {
20015
+ text = `${item.filterText} ${text}`;
20016
+ filterText = item.filterText;
20017
+ }
20018
+ }
20019
+ }
19762
20020
  let command = ((_item_command = item.command) === null || _item_command === void 0 ? void 0 : _item_command.command) == "editor.action.triggerSuggest" ? "startAutocomplete" : undefined;
19763
- let range = item.textEdit ? getTextEditRange(item.textEdit, item.filterText) : undefined;
20021
+ let range = item.textEdit ? getTextEditRange(item.textEdit, filterText) : undefined;
19764
20022
  let completion = {
19765
20023
  meta: kind,
19766
20024
  caption: item.label,