Add lint rule to prevent usage of browser only global objects
- Dominant language
- JavaScript
- Stars
- 37
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
**I'm submitting a feature request**
* **Language:**
all
**Current behavior:**
Browser global objects can be used.
**Expected/desired behavior:**
* **What is the expected behavior?**
Using browser global objects should result in a lint warning. This warning can optionally recommend using aurelia-pal.
This needs to be implemented for both eslint and tslint.
An exception to this rule should be added to the pal library.
* **What is the motivation / use case for changing the behavior?**
Prevent issues such as https://github.com/aurelia/i18n/issues/243.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the repository's ESLint and TSLint integrations and the pal library exception points. Confirm how existing lint rules are structured, then define browser-global usage as a warning in both linters, with an optional aurelia-pal recommendation and the pal library exempted. Done means both linting paths enforce the rule without flagging pal code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100