overleaf/services
Antoine Clausse 3d5418611b Add an ESLint rule enforcing kebab-case in URL paths (#18913)
* 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
2024-06-24 12:04:26 +00:00
..
chat Explicitly specify latest version of async 2024-06-17 08:04:00 +00:00
clsi Explicitly specify latest version of async 2024-06-17 08:04:00 +00:00
contacts Explicitly specify latest version of async 2024-06-17 08:04:00 +00:00
docstore Explicitly specify latest version of async 2024-06-17 08:04:00 +00:00
document-updater Merge pull request #18906 from overleaf/em-migrate-existing-histories-2 2024-06-19 08:05:02 +00:00
filestore Merge pull request #18289 from overleaf/ac-ar-eslint-return-await 2024-05-27 10:22:49 +00:00
git-bridge Merge pull request #18402 from overleaf/msm-git-bridge-pom 2024-06-17 08:04:21 +00:00
history-v1 Merge pull request #18088 from overleaf/ab-session-secret-rotation 2024-05-27 10:23:33 +00:00
notifications Explicitly specify latest version of async 2024-06-17 08:04:00 +00:00
project-history Merge pull request #18906 from overleaf/em-migrate-existing-histories-2 2024-06-19 08:05:02 +00:00
real-time Explicitly specify latest version of async 2024-06-17 08:04:00 +00:00
spelling Explicitly specify latest version of async 2024-06-17 08:04:00 +00:00
web Add an ESLint rule enforcing kebab-case in URL paths (#18913) 2024-06-24 12:04:26 +00:00