* Add `no-restricted-globals` eslint rule
Co-authored-by: Rebeka <rebeka.dekany@overleaf.com>
* Change `self` to `window.self`
* Change `innerWidth` to `window.innerWidth`
* Change `confirm` to `window.confirm`
* Change `location` to `window.location`
* Use `location` from `useLocation` hook
* Use location from useLocation hook
Co-authored-by: Antoine <antoine.clausse@overleaf.com>
* Disable no-restricted-globals eslint rule for use of 'self'
* Use `confusing-browser-globals` from npm
* Prevent unexpected globals in workers, using `no-undef`
* Use `self` as a global in workers
* Use unexpected globals in workers, using `no-restricted-globals` in workers
---------
Co-authored-by: Rebeka <rebeka.dekany@overleaf.com>
Co-authored-by: Rebeka <o.dekany@gmail.com>
GitOrigin-RevId: 526986799f5f2edf53c7d978fa85c1e98189565f
using @typescript-eslint/no-unused-vars reduces the number of false
positives in TS code. The changes:
1. Allow the arguments to a function to be checked (reporting only after
the last used variable)
2. Allow rest siblings to be checked
3. Allow these rules to be skipped with an _ prefix to a variable
GitOrigin-RevId: 1f6eac4109859415218248d5b2068a22b34cfd7e
* Add a tsconfig.json to the eslint-plugin folder so it can be linted too
* Create eslint rule `prefer-kebab-url`
* Add prefer-kebab-url to service/web
* Ignore lowercased strings
Prevents from trying to change `v0` to `v-0`
* Ignore parts between brackets or parenthesis
* Record in URL paths by case
lower: 241
kebab: 60
snake: 43
camel: 22
other: 5
* Revert "Record in URL paths by case"
This reverts commit 262f483aafb0daa1a01e9025488cdc33f31ef67c.
* Showcase how the autofix would change the code
* Revert "Showcase how the autofix would change the code"
This reverts commit f045292bf01623de2df5b89fc0d68737a39913dc.
* Add ignored words so we don't have to update old code
* Change the rule so it suggests instead of fixing
This prevents eslint autofix from creating bugs
* Move list of ignored words to its own file
Per https://github.com/overleaf/internal/pull/18913#discussion_r1644204034
* Add comment explaining the ignore list
GitOrigin-RevId: d13918b0bcba9d77120f1b61b354a79dc8fb4b4e