@bhsd/codemirror-mediawiki 3.11.2 → 3.11.4

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.
@@ -343,11 +343,11 @@ export class CodeMirror6 {
343
343
  */
344
344
  prefer(names) {
345
345
  if (Array.isArray(names)) {
346
- this.#preferred = new Set(names.filter(name => Object.prototype.hasOwnProperty.call(avail, name)));
346
+ this.#preferred = new Set(names.filter(name => Object.hasOwn(avail, name)));
347
347
  }
348
348
  else {
349
349
  for (const [name, enable] of Object.entries(names)) {
350
- if (enable && Object.prototype.hasOwnProperty.call(avail, name)) {
350
+ if (enable && Object.hasOwn(avail, name)) {
351
351
  this.#preferred.add(name);
352
352
  }
353
353
  else {
package/dist/linter.js CHANGED
@@ -1,3 +1,5 @@
1
+ /** @todo revert df69718ab908966bff162fe51e8cfb4595e6b2ec */
2
+ import { rules as recommended } from '@eslint/js/src/configs/eslint-recommended.js';
1
3
  import { sanitizeInlineStyle } from '@bhsd/common';
2
4
  import { loadScript, getWikiparse, getLSP } from '@bhsd/browser';
3
5
  import { styleLint } from '@bhsd/stylelint-util';
@@ -134,12 +136,7 @@ export const getJsLinter = async (cdn = eslintRepo) => {
134
136
  const esLinter = new eslint.Linter(), conf = {
135
137
  env: jsEnv,
136
138
  parserOptions: { ecmaVersion: 15, sourceType: 'module' },
137
- }, recommended = {};
138
- for (const [name, { meta }] of esLinter.getRules()) {
139
- if (meta?.docs?.recommended) {
140
- recommended[name] = 2;
141
- }
142
- }
139
+ };
143
140
  const linter = (text, opt) => {
144
141
  const config = { ...conf, ...opt };
145
142
  if (!('rules' in config)