Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/darwintantuco/eslint-plugin-jsx-img-no-referrer
Using img tag with external source must have referrerPolicy="no-referrer"
https://github.com/darwintantuco/eslint-plugin-jsx-img-no-referrer
Last synced: 18 days ago
JSON representation
Using img tag with external source must have referrerPolicy="no-referrer"
- Host: GitHub
- URL: https://github.com/darwintantuco/eslint-plugin-jsx-img-no-referrer
- Owner: darwintantuco
- License: mit
- Created: 2020-07-24T08:21:08.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-07-18T22:59:32.000Z (over 1 year ago)
- Last Synced: 2024-10-09T19:02:22.872Z (30 days ago)
- Language: JavaScript
- Homepage:
- Size: 361 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# eslint-plugin-jsx-img-no-referrer
![Node.js CI](https://github.com/darwintantuco/eslint-plugin-jsx-img-no-referrer/workflows/Node.js%20CI/badge.svg)
Using img tag with external source must have referrerPolicy="no-referrer"
## Installation
You'll first need to install [ESLint](http://eslint.org):
Next, install `eslint-plugin-jsx-img-no-referrer`:
### npm
```
$ npm install eslint-plugin-jsx-img-no-referrer --save-dev
```### yarn
```
$ yarn add eslint-plugin-jsx-img-no-referrer --dev
```## Usage
Add `jsx-img-no-referrer` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:
```json
{
"plugins": ["jsx-img-no-referrer"]
}
```Then configure the rules you want to use under the rules section.
```json
{
"rules": {
"jsx-img-no-referrer/jsx-img-no-referrer": "error"
}
}
```If you have custom image components, you can define them under settings section.
```json
{
"settings": {
"imageComponents": [
"Avatar",
{ "name": "Profile", "imageAttribute": "imageSrc" }
]
}
}
```## License
MIT