{"id":13656587,"url":"https://github.com/amilajack/eslint-plugin-dom","last_synced_at":"2025-05-07T17:01:42.684Z","repository":{"id":57229812,"uuid":"77508028","full_name":"amilajack/eslint-plugin-dom","owner":"amilajack","description":"Lint DOM API performance","archived":false,"fork":false,"pushed_at":"2018-10-03T19:47:39.000Z","size":44,"stargazers_count":9,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T03:04:24.649Z","etag":null,"topics":["api","dom","eslint","layout","performance","plugin","reflow"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amilajack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-28T06:14:23.000Z","updated_at":"2024-12-04T16:42:43.000Z","dependencies_parsed_at":"2022-09-14T14:52:11.188Z","dependency_job_id":null,"html_url":"https://github.com/amilajack/eslint-plugin-dom","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amilajack%2Feslint-plugin-dom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amilajack%2Feslint-plugin-dom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amilajack%2Feslint-plugin-dom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amilajack%2Feslint-plugin-dom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amilajack","download_url":"https://codeload.github.com/amilajack/eslint-plugin-dom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252921980,"owners_count":21825632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","dom","eslint","layout","performance","plugin","reflow"],"created_at":"2024-08-02T05:00:24.329Z","updated_at":"2025-05-07T17:01:42.637Z","avatar_url":"https://github.com/amilajack.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Plugins"],"sub_categories":["Performance"],"readme":"eslint-plugin-dom\n=====================\n[![Build Status](https://travis-ci.org/amilajack/eslint-plugin-dom.svg?branch=master)](https://travis-ci.org/amilajack/eslint-plugin-dom)\n[![Build status](https://ci.appveyor.com/api/projects/status/0suu7sewpme8mp6t/branch/master?svg=true)](https://ci.appveyor.com/project/amilajack/eslint-plugin-dom/branch/master)\n[![NPM version](https://badge.fury.io/js/eslint-plugin-dom.svg)](http://badge.fury.io/js/eslint-plugin-dom)\n[![Dependency Status](https://img.shields.io/david/amilajack/eslint-plugin-dom.svg)](https://david-dm.org/amilajack/eslint-plugin-dom)\n[![npm](https://img.shields.io/npm/dm/eslint-plugin-dom.svg)](https://npm-stat.com/charts.html?package=eslint-plugin-dom)\n\n**⚠️ WORK IN PROGRESS ⚠️**\n\n## Goals\n - Use static analysis to detect forced reflow. Suggest requestAnimationFrame\n - Warn when using forcing sync layout calculation (ex. offsetLeft)\n - Warn against general perf issues, ex. `document.write()`\n\n## Idea\n```\n 22:  const elem = document.querySelector('.some')\n 23:  elem.offsetLeft\n           ^^^^^^^^^^   `offsetLeft` will trigger synchronous style and layout calculation\n```\n\n```\n 34:  const h1 = element1.clientHeight;\n 35:  element1.style.height = `${h1 * 2}px`;\n 36:  const h2 = element2.clientHeight;\n                 ^^^^^^^^^^^^^^^^^^^^^^  Forced reflow will occur. Layout invalidated at line 35.\n                                         Use requestAnimationFrame() to prevent this\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Familajack%2Feslint-plugin-dom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Familajack%2Feslint-plugin-dom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Familajack%2Feslint-plugin-dom/lists"}