monkeytype/frontend/.eslintrc.cjs
Seif Soliman e6519b166c
impr(screenshot): switch to modern-screenshot for enhancements (@byseif21) (#6884)
Switching the screenshot library from html2canvas to modern-screenshot.
for both visual for users and some technical/codebase benefits.

### Visual Improvements :
 * Background css filters now shows in the screenshot. 
   fix: #6862 , 
        #1613 ,

https://github.com/monkeytypegame/monkeytype/issues/6249#issuecomment-2651215569
* Sharper, higher-quality screenshots noticeably especially on high-DPI
screens.
* Backgrounds now render correctly on small screens that were previously
missing on mobile or small viewports, now included and properly scaled.
* Previously, with extra height e.g input history opened, the background
failed to cover everything even when it should have.
* The screenshot now more closely matches what users actually see across
devices and layouts.

### Non-Visual (Technical/Codebase) Improvements :
* Supporting modern css makes us now able to use css for the heatmap
instead of the JS.
     #5892 ,
      #5879
  * Reduced bundle size: Dropping html2canvas and its dependencies.
  * Up-to-date library, easier future improvements.

---------

Co-authored-by: Samuel Hautamäki <70753342+SirObby@users.noreply.github.com>
Co-authored-by: samuelhautamaki <samuelhautamaki@noreply.codeberg.org>
Co-authored-by: Miodec <jack@monkeytype.com>
2025-08-20 20:39:15 +02:00

27 lines
524 B
JavaScript

/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
plugins: ["compat"],
extends: ["@monkeytype/eslint-config", "plugin:compat/recommended"],
globals: {
$: "readonly",
jQuery: "readonly",
ClipboardItem: "readonly",
grecaptcha: "readonly",
},
env: {
browser: true,
es2021: true,
node: true,
},
ignorePatterns: [
"node_modules/",
"dist/",
"static/js/",
"__tests__/",
"jest.config.ts",
],
settings: {
lintAllEsApis: true,
},
};