From 03a7b0d3ef6341b2bde711f95b00aafe7fb06ec4 Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Sat, 1 Feb 2025 22:05:27 +0100 Subject: [PATCH] chore(eslint): remove deprecated eslint-env These comments did not work anymore and were replaced by relevant sections in eslint.config.mjs Signed-off-by: Philip Molares --- eslint.config.mjs | 5 ++++- public/js/cover.js | 1 - public/js/extra.js | 1 - public/js/history.js | 1 - public/js/index.js | 1 - public/js/lib/common/login.js | 1 - public/js/lib/syncscroll.js | 1 - public/js/locale.js | 1 - public/js/pretty.js | 1 - public/js/render.js | 1 - public/js/reveal-markdown.js | 2 -- public/js/slide.js | 1 - public/vendor/md-toc.js | 1 - test/csp.js | 1 - test/letter-avatars.js | 2 -- test/user.js | 2 -- 16 files changed, 4 insertions(+), 19 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 19e738659..98871d349 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 7aba372d0..4c9faa564 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 632c3add9..210f8da9d 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 1273af5f7..276ef2324 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 2ab7d7130..c356c9d97 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 6990845de..c4ff6cf2a 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 f033d00d9..5a586fa15 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 bf90e2c8e..5d56155a5 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 a5df0a478..76f5dfb87 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 634bd1dbd..cffaa1165 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 484c7ac8e..b01bfd36b 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 5a28993f8..9e5b4a494 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 59e75aed3..948f954f9 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 afb959264..478617683 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 178075aa3..85b784e83 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 38776a8f9..77bde8f0f 100644 --- a/test/user.js +++ b/test/user.js @@ -1,5 +1,3 @@ -/* eslint-env node, mocha */ - 'use strict' const assert = require('assert')