diff --git a/eslint.config.mjs b/eslint.config.mjs index 19e73865..98871d34 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -17,7 +17,10 @@ export default [{ }, ...compat.extends('standard'), { languageOptions: { globals: { - ...globals.node + ...globals.node, + ...globals.mocha, + ...globals.jquery, + ...globals.browser } }, diff --git a/public/js/cover.js b/public/js/cover.js index 7aba372d..4c9faa56 100644 --- a/public/js/cover.js +++ b/public/js/cover.js @@ -1,4 +1,3 @@ -/* eslint-env browser, jquery */ /* global moment, serverurl */ import { diff --git a/public/js/extra.js b/public/js/extra.js index 632c3add..210f8da9 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -1,4 +1,3 @@ -/* eslint-env browser, jquery */ /* eslint no-console: ["error", { allow: ["warn", "error"] }] */ /* global moment, serverurl */ diff --git a/public/js/history.js b/public/js/history.js index 1273af5f..276ef232 100644 --- a/public/js/history.js +++ b/public/js/history.js @@ -1,4 +1,3 @@ -/* eslint-env browser, jquery */ /* eslint no-console: ["error", { allow: ["warn", "error", "debug"] }] */ /* global serverurl, moment */ diff --git a/public/js/index.js b/public/js/index.js index 2ab7d713..c356c9d9 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -1,4 +1,3 @@ -/* eslint-env browser, jquery */ /* eslint no-console: ["error", { allow: ["warn", "error", "debug"] }] */ /* global Cookies, moment, serverurl, key, Dropbox, Visibility */ diff --git a/public/js/lib/common/login.js b/public/js/lib/common/login.js index 6990845d..c4ff6cf2 100644 --- a/public/js/lib/common/login.js +++ b/public/js/lib/common/login.js @@ -1,4 +1,3 @@ -/* eslint-env browser, jquery */ /* global Cookies */ import { serverurl } from '../config' diff --git a/public/js/lib/syncscroll.js b/public/js/lib/syncscroll.js index f033d00d..5a586fa1 100644 --- a/public/js/lib/syncscroll.js +++ b/public/js/lib/syncscroll.js @@ -1,4 +1,3 @@ -/* eslint-env browser, jquery */ /* global _ */ // Inject line numbers for sync scroll. diff --git a/public/js/locale.js b/public/js/locale.js index bf90e2c8..5d56155a 100644 --- a/public/js/locale.js +++ b/public/js/locale.js @@ -1,4 +1,3 @@ -/* eslint-env browser, jquery */ /* global Cookies */ const supportedLanguages = require('../../locales/_supported.json') diff --git a/public/js/pretty.js b/public/js/pretty.js index a5df0a47..76f5dfb8 100644 --- a/public/js/pretty.js +++ b/public/js/pretty.js @@ -1,4 +1,3 @@ -/* eslint-env browser, jquery */ /* global refreshView */ import { diff --git a/public/js/render.js b/public/js/render.js index 634bd1db..cffaa116 100644 --- a/public/js/render.js +++ b/public/js/render.js @@ -1,4 +1,3 @@ -/* eslint-env browser, jquery */ // allow some attributes const filterXSS = require('xss') diff --git a/public/js/reveal-markdown.js b/public/js/reveal-markdown.js index 484c7ac8..b01bfd36 100644 --- a/public/js/reveal-markdown.js +++ b/public/js/reveal-markdown.js @@ -1,5 +1,3 @@ -/* eslint-env browser, jquery */ - import { preventXSS, escapeAttrValue } from './render' import { md } from './extra' diff --git a/public/js/slide.js b/public/js/slide.js index 5a28993f..9e5b4a49 100644 --- a/public/js/slide.js +++ b/public/js/slide.js @@ -1,4 +1,3 @@ -/* eslint-env browser, jquery */ /* global serverurl, Reveal, RevealMarkdown */ import { preventXSS } from './render' diff --git a/public/vendor/md-toc.js b/public/vendor/md-toc.js index 59e75aed..948f954f 100644 --- a/public/vendor/md-toc.js +++ b/public/vendor/md-toc.js @@ -1,4 +1,3 @@ -/* eslint-env browser, jquery */ /** * md-toc.js v1.0.2 * https://github.com/yijian166/md-toc.js diff --git a/test/csp.js b/test/csp.js index afb95926..47861768 100644 --- a/test/csp.js +++ b/test/csp.js @@ -1,4 +1,3 @@ -/* eslint-env node, mocha */ 'use strict' const assert = require('assert') diff --git a/test/letter-avatars.js b/test/letter-avatars.js index 178075aa..85b784e8 100644 --- a/test/letter-avatars.js +++ b/test/letter-avatars.js @@ -1,5 +1,3 @@ -/* eslint-env node, mocha */ - 'use strict' const assert = require('assert') diff --git a/test/user.js b/test/user.js index 38776a8f..77bde8f0 100644 --- a/test/user.js +++ b/test/user.js @@ -1,5 +1,3 @@ -/* eslint-env node, mocha */ - 'use strict' const assert = require('assert')