Michael Novotny
5e112c062e
Updates next/image
eslint message to denote that costs may be incurred. ( #46640 )
...
Changes ESLint warning message to still encourage usage of `next/image`
for the best experience, but also denoting that optimization could come
with incurred costs.
## Feature
- [x] Documentation added
- [x] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md )
## Documentation / Examples
- [x] Make sure the linting passes by running `pnpm build && pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md )
---------
Co-authored-by: Steven Tey <stevensteel97@gmail.com>
Co-authored-by: Steven <steven@ceriously.com>
2023-03-01 14:28:09 -08:00
Dawid Czesak
e91f2b0309
Update no-img-element.md ( #45701 )
2023-02-08 14:11:39 +00:00
Erik Hedberg
2b3a38ee47
docs: fix spelling error ( #44191 )
...
## Documentation / Examples
- [x] Make sure the linting passes by running `pnpm build && pnpm lint`
- [x] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md )
2022-12-20 14:51:14 +00:00
Steven
297459d534
Update no-img-element
lint rule ( #43982 )
...
This updates the `no-img-element` lint rule to explain the trade-offs of enabling or disabling Image Optimization.
2022-12-13 01:50:59 +00:00
Andrei Stefan
6b829d8bd6
fix(eslint): allow <img> in conjunction with <picture> ( #37504 ) ( #37570 )
...
* fix(eslint): allow <img> in conjunction with <picture> (#37504 )
* Apply suggestions from code review
* add space
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-06-15 21:13:52 -05:00
Michael Novotny
5211ac5cae
Adds consistency to ESLint rules. ( #34335 )
...
* Adds consistency to ESLint rules.
* Fixes lint errors.
* Fixes manifest.
* Adds missing title.
* Fixes copy / paste error.
Co-authored-by: Lee Robinson <me@leerob.io>
* Update errors/no-script-in-document.md
Co-authored-by: Lee Robinson <me@leerob.io>
* Update errors/no-sync-scripts.md
Co-authored-by: Lee Robinson <me@leerob.io>
* Updates a couple of rule descriptions.
* Adds redirects.
* Fixes unit tests.
* Removes duplicated section.
* Updates `no-before-interactive-script-outside-document` description.
* Fixes lint.
* Fixes integration tests.
* Adds description to `no-before-interactive-script-outside-document` documentation.
* Removes `link-passhref` from rules list.
* Updates remaining `pages/_middleware.js` references.
* Adds consistancy to messaging in new `no-styled-jsx-in-document` rule.
* Apply suggestions from code review
* Apply suggestions from code review
Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-06-13 21:17:42 -05:00
Konstantin Popov
93bac0f2b7
Fix minor typo in no-img-element.md ( #29027 )
...
Fix minor typo:
image optimization -> Image Optimization
2021-09-12 00:39:43 +00:00
Ivan Kalinin
c851da25f4
Fixed no-img-element documentation snippet. ( #26154 )
...
Module "next/image" has no exported member 'Image'.
It must be `import Image from "next/image"`
2021-06-16 08:57:45 +02:00
Houssein Djirdeh
7426ebcbc3
ESLint Plugin: Image rules ( #23402 )
...
Adds a new image rule to `eslint-plugin-next`:
```
Do not use `<img>`. Use Image from `next/image` instead
```
2021-05-17 13:06:48 +00:00