This repository has been archived by the owner on Jun 21, 2023. It is now read-only.
forked from vercel/next.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[eslint] move core-web-vitals config to eslint-plugin-next (vercel#27363
) this pr moves the "core-web-vitals" config from `eslint-config-next` to `eslint-plugin-next`. Fixes: vercel#27292 ## 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. - [x] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes
- Loading branch information
1 parent
5561bc8
commit f02f35a
Showing
7 changed files
with
96 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
module.exports = { | ||
extends: ['.'].map(require.resolve), | ||
rules: { | ||
'@next/next/no-sync-scripts': 2, | ||
'@next/next/no-html-link-for-pages': 2, | ||
}, | ||
extends: ['.', 'plugin:@next/next/core-web-vitals'].map(require.resolve), | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
test/integration/eslint/plugin-core-web-vitals-config/.eslintrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"extends": "plugin:@next/next/core-web-vitals", | ||
"root": true, | ||
"parserOptions": { | ||
"sourceType": "module", | ||
"ecmaVersion": 2015, | ||
"ecmaFeatures": { | ||
"jsx": true | ||
} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
test/integration/eslint/plugin-core-web-vitals-config/pages/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const Home = () => ( | ||
<div> | ||
<p>Home</p> | ||
<script src="https://example.com" /> | ||
<img src="https://example.com/image.png" /> | ||
</div> | ||
) | ||
|
||
export default Home |
11 changes: 11 additions & 0 deletions
11
test/integration/eslint/plugin-recommended-config/.eslintrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"extends": "plugin:@next/next/recommended", | ||
"root": true, | ||
"parserOptions": { | ||
"sourceType": "module", | ||
"ecmaVersion": 2015, | ||
"ecmaFeatures": { | ||
"jsx": true | ||
} | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
test/integration/eslint/plugin-recommended-config/pages/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import Document from 'next/document' | ||
|
||
const Home = () => ( | ||
<div> | ||
<p>Home</p> | ||
<script src="https://example.com" /> | ||
</div> | ||
) | ||
|
||
export default Home |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters