rsnext/packages/eslint-plugin-next/lib/rules
stefanprobst da4203d032
Add eslint rule for id attribute on inline next/script (#27853)
This adds a new ESLint rule to `eslint-plugin-next` to check that `next/script` components with inline content have the required `id` attribute.

Also adjusted the code example for inline scripts in the `next/script` docs, which were actually missing an `id` attribute.
And also updated the `next/scripts` integration test to also have the required `id` attribute.

Unsure about the required heading levels in the errors .md document (other examples have h1 and h4??)

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [x] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [x] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes
2021-08-19 20:08:04 +00:00
..
google-font-display.js Add rootDir setting to eslint-plugin-next (#27918) 2021-08-11 10:37:55 +00:00
google-font-preconnect.js Add rootDir setting to eslint-plugin-next (#27918) 2021-08-11 10:37:55 +00:00
inline-script-id.js Add eslint rule for id attribute on inline next/script (#27853) 2021-08-19 20:08:04 +00:00
link-passhref.js Add rootDir setting to eslint-plugin-next (#27918) 2021-08-11 10:37:55 +00:00
next-script-for-ga.js ESLint Plugin: Prefer next script component when using the inline script for Google Analytics. (#25147) 2021-08-16 13:55:07 -05:00
no-css-tags.js Adds ESLint with default rule-set (#23702) 2021-04-30 11:09:07 +00:00
no-document-import-in-page.js Fix crash of lint rule no-document-import-in-page (#28148) 2021-08-16 16:04:42 +00:00
no-duplicate-head.js adds no duplicate head rule (#27179) 2021-07-15 13:04:17 -05:00
no-head-import-in-document.js [ESLint] Documentation updates + bug fixes (#26331) 2021-08-05 00:58:06 +00:00
no-html-link-for-pages.js Update to latest babel versions (#28174) 2021-08-17 09:18:08 +02:00
no-img-element.js ESLint Plugin: Image rules (#23402) 2021-05-17 13:06:48 +00:00
no-page-custom-font.js Add rootDir setting to eslint-plugin-next (#27918) 2021-08-11 10:37:55 +00:00
no-script-in-document.js [ESLint] Disallow <Script /> inside _document.js & <Script /> inside the next/head component (#27257) 2021-08-13 23:16:15 +00:00
no-script-in-head.js [ESLint] Disallow <Script /> inside _document.js & <Script /> inside the next/head component (#27257) 2021-08-13 23:16:15 +00:00
no-sync-scripts.js next lint + ESLint in Create Next App (#25064) 2021-06-03 14:01:24 +02:00
no-title-in-document-head.js ESLint Plugin: Disallow <title> in Head from next/document (#24868) 2021-05-07 08:49:37 +00:00
no-typos.js [ESLint] add no-typos rule to eslint (#26650) 2021-07-24 22:22:19 -05:00
no-unwanted-polyfillio.js Adds ESLint with default rule-set (#23702) 2021-04-30 11:09:07 +00:00