ESLint plugin to enforce using fetch over other AJAX methods like jQuery's $.ajax, Angular's $http, and XMLHttpRequest. Version 0.0.1 is the only release, with no active development since 2019. Key rules include no-jquery, no-xhr, and no-$http (the latter disabled by default). Differentiates from broader eslint-plugin-compat by focusing solely on fetch preference.
npm install eslint-plugin-fetchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to configure the plugin in .eslintrc.json and which patterns are flagged.
Use eslint-plugin-no-jquery or a custom eslint rule.
Add 'fetch/no-$http': 'error' to rules.
Use eslint-plugin-fetch only with ESLint < 9 or convert config to legacy format.
Run npm install eslint-plugin-fetch --save-dev or check config uses 'fetch' not 'eslint-plugin-fetch'.
Install plugin locally in project root or globally if ESLint is global.
Ensure rule exists in the plugin version; it's part of 0.0.1, so it's valid.