diff --git a/services/web/Makefile b/services/web/Makefile index 0e22d924db..44bb625d73 100644 --- a/services/web/Makefile +++ b/services/web/Makefile @@ -410,17 +410,17 @@ $(WITH_NODE_MODULES_PATH): export PATH=$(NODE_MODULES_PATH) lint: lint_backend lint_backend: npx eslint \ - 'app.{js,ts,tsx}' \ - 'app/**/*.{js,ts,tsx}' \ - 'modules/*/index.{js,ts,tsx}' \ - 'modules/*/app/**/*.{js,ts,tsx}' \ + 'app.{js,mjs,ts,tsx}' \ + 'app/**/*.{js,mjs,ts,tsx}' \ + 'modules/*/index.{js,mjs,ts,tsx}' \ + 'modules/*/app/**/*.{js,mjs,ts,tsx}' \ --max-warnings=0 lint: lint_frontend lint_frontend: npx eslint \ - 'frontend/**/*.{js,ts,tsx}' \ - 'modules/**/frontend/**/*.{js,ts,tsx}' \ + 'frontend/**/*.{js,mjs,ts,tsx}' \ + 'modules/**/frontend/**/*.{js,mjs,ts,tsx}' \ --max-warnings=0 lint: lint_test @@ -428,34 +428,34 @@ lint_test: lint_test_app lint_test_app: lint_test_app_unit lint_test_app_unit: npx eslint \ - 'test/unit/**/*.{js,ts,tsx}' \ + 'test/unit/**/*.{js,mjs,ts,tsx}' \ --max-warnings=0 lint_test_app: lint_test_app_rest lint_test_app_rest: npx eslint \ - 'test/**/*.{js,ts,tsx}' \ - --ignore-pattern 'test/unit/**/*.{js,ts,tsx}' \ + 'test/**/*.{js,mjs,ts,tsx}' \ + --ignore-pattern 'test/unit/**/*.{js,mjs,ts,tsx}' \ --max-warnings=0 lint_test: lint_test_modules lint_test_modules: npx eslint \ - 'modules/*/test/**/*.{js,ts,tsx}' \ + 'modules/*/test/**/*.{js,mjs,ts,tsx}' \ --max-warnings=0 lint: lint_misc # migrations, scripts, webpack config, karma config lint_misc: npx eslint . \ - --ignore-pattern 'app.{js,ts,tsx}' \ - --ignore-pattern 'app/**/*.{js,ts,tsx}' \ - --ignore-pattern 'modules/*/app/**/*.{js,ts,tsx}' \ - --ignore-pattern 'modules/*/index.{js,ts,tsx}' \ - --ignore-pattern 'frontend/**/*.{js,ts,tsx}' \ - --ignore-pattern 'modules/**/frontend/**/*.{js,ts,tsx}' \ - --ignore-pattern 'test/**/*.{js,ts,tsx}' \ - --ignore-pattern 'modules/*/test/**/*.{js,ts,tsx}' \ + --ignore-pattern 'app.{js,mjs,ts,tsx}' \ + --ignore-pattern 'app/**/*.{js,mjs,ts,tsx}' \ + --ignore-pattern 'modules/*/app/**/*.{js,mjs,ts,tsx}' \ + --ignore-pattern 'modules/*/index.{js,mjs,ts,tsx}' \ + --ignore-pattern 'frontend/**/*.{js,mjs,ts,tsx}' \ + --ignore-pattern 'modules/**/frontend/**/*.{js,mjs,ts,tsx}' \ + --ignore-pattern 'test/**/*.{js,mjs,ts,tsx}' \ + --ignore-pattern 'modules/*/test/**/*.{js,mjs,ts,tsx}' \ --max-warnings=0 lint: lint_pug diff --git a/services/web/frontend/js/features/source-editor/lezer-latex/tokens.mjs b/services/web/frontend/js/features/source-editor/lezer-latex/tokens.mjs index 30478dd7e3..29674c79c6 100644 --- a/services/web/frontend/js/features/source-editor/lezer-latex/tokens.mjs +++ b/services/web/frontend/js/features/source-editor/lezer-latex/tokens.mjs @@ -169,11 +169,9 @@ export const lstinlineTokenizer = new ExternalTokenizer( delimiter = CHAR_CLOSE_BRACE } input.advance() - let content = '' for (;;) { - let next = input.next + const next = input.next if (next === -1 || next === CHAR_NEWLINE) return - content += String.fromCharCode(next) input.advance() if (next === delimiter) break } diff --git a/services/web/package.json b/services/web/package.json index 1ebcff6e34..a9dc93d748 100644 --- a/services/web/package.json +++ b/services/web/package.json @@ -27,7 +27,7 @@ "format:styles": "prettier --list-different $PWD/'**/*.less'", "format:styles:fix": "prettier --write $PWD/'**/*.less'", "lint": "eslint --max-warnings 0 --format unix --ext .js,.mjs,.ts,.tsx .", - "lint:fix": "eslint --fix --ext .js,.ts,.tsx .", + "lint:fix": "eslint --fix --ext .js,.mjs,.ts,.tsx .", "type-check": "tsc --noEmit", "extract-translations": "i18next-scanner", "migrations": "east",