feat(editor): broaden language detection in web code editor (#37619)

Use
https://github.com/github-linguist/linguist/blob/main/lib/linguist/languages.yml
to substantially improve syntax higlighting in Codemirror. File is
generated on-demand only.

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
This commit is contained in:
silverwind
2026-05-10 06:51:46 +02:00
committed by GitHub
parent 0a3aaeafe7
commit a61598884f
7 changed files with 1513 additions and 40 deletions
+4 -2
View File
@@ -570,8 +570,6 @@ export default defineConfig([
'no-redeclare': [0], // must be disabled for typescript overloads
'no-regex-spaces': [2],
'no-restricted-exports': [0],
'no-restricted-globals': [2, ...restrictedGlobals],
'no-restricted-properties': [2, ...restrictedProperties],
'no-restricted-imports': [2, {paths: [
{name: 'jquery', message: 'Use the global $ instead', allowTypeImports: true},
]}],
@@ -1022,5 +1020,9 @@ export default defineConfig([
{
files: ['web_src/**/*'],
languageOptions: {globals: {...globals.browser, ...globals.jquery}},
rules: {
'no-restricted-globals': [2, ...restrictedGlobals],
'no-restricted-properties': [2, ...restrictedProperties],
},
},
]);