@masknet/eslint-plugin
Version:
eslint plugin for masknet
37 lines (24 loc) • 516 B
Markdown
<!-- begin title -->
# `@masknet/prefer-fetch`
Enforce fetch
<!-- end title -->
## Rule Details
### :x: Incorrect
```ts
jQuery(element).load();
request();
axios.get();
new XMLHttpRequest();
```
### :white_check_mark: Correct
```ts
const response = await fetch(url, options);
```
## Attributes
<!-- begin attributes -->
- [x] :white_check_mark: Recommended
- [ ] :wrench: Fixable
- [ ] :bulb: Suggestions
- [ ] :gear: Configurable
- [ ] :thought_balloon: Requires type information
<!-- end attributes -->