@bhsd/codemirror-mediawiki 3.11.3 → 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.
- package/dist/linter.js +3 -6
- package/dist/main.min.js +30 -30
- package/dist/mw.min.js +32 -32
- package/dist/wiki.min.js +32 -32
- package/i18n/en.json +1 -1
- package/i18n/zh-hans.json +1 -1
- package/i18n/zh-hant.json +1 -1
- package/package.json +7 -5
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
|
-
}
|
|
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)
|