🔧 This rule is automatically fixable by the --fix CLI option.
Disallows direct import of axios and suggests using 'Utils/api' instead.
This rule aims to prevent direct imports of axios.
Examples of incorrect code for this rule:
import axios from "axios";Examples of correct code for this rule:
import callApi from "Utils/api";This rule has an options to specify the importPath of the api util file.
{
"rules": {
"@ezylab/no-axios-import": ["error", { "importPath": "custom/path" }]
}
}If you think that it is fine to use axios directly in your code, you can disable this rule.
If there are other links that describe the issue this rule addresses, please include them here in a bulleted list.