Commit graph

639 commits

Author SHA1 Message Date
Tim Neutkens
90904e4b7e v11.1.3-canary.43 2021-10-05 12:53:51 +02:00
jj@jjsweb.site
7af61f69f3
v11.1.3-canary.42 2021-10-04 19:30:19 -05:00
jj@jjsweb.site
d0b7d1579e
v11.1.3-canary.41 2021-10-01 10:25:21 -05:00
Maia Teegarden
bab7d912cb
v11.1.3-canary.40 2021-09-30 18:38:04 -07:00
jj@jjsweb.site
4eda88145e
v11.1.3-canary.39 2021-09-30 16:11:10 -05:00
jj@jjsweb.site
cee573f582
v11.1.3-canary.38 2021-09-29 14:47:42 -05:00
Tim Neutkens
27b4681922 v11.1.3-canary.37 2021-09-29 12:46:35 +02:00
Tim Neutkens
88e15a5bfc v11.1.3-canary.36 2021-09-29 11:19:01 +02:00
jj@jjsweb.site
0e0b51ea7b
v11.1.3-canary.35 2021-09-28 12:40:43 -05:00
Tim Neutkens
0df68366ca v11.1.3-canary.34 2021-09-28 16:48:35 +02:00
Tim Neutkens
0baced3e54 v11.1.3-canary.33 2021-09-27 13:27:47 +02:00
jj@jjsweb.site
81925f9e15
v11.1.3-canary.32 2021-09-24 10:09:58 -05:00
jj@jjsweb.site
f2c266ba4d
v11.1.3-canary.31 2021-09-22 22:57:15 -05:00
Tim Neutkens
3be2480a56 v11.1.3-canary.30 2021-09-22 07:22:02 +02:00
jj@jjsweb.site
53a59336e9
v11.1.3-canary.29 2021-09-21 16:12:44 -05:00
jj@jjsweb.site
7b74f7771c
v11.1.3-canary.28 2021-09-21 14:19:19 -05:00
Tim Neutkens
dc43e297b7 v11.1.3-canary.27 2021-09-21 19:37:49 +02:00
Tim Neutkens
adf7fa67d3 v11.1.3-canary.26 2021-09-21 09:50:33 +02:00
jj@jjsweb.site
0568d24205
v11.1.3-canary.25 2021-09-20 09:30:41 -05:00
jj@jjsweb.site
f579767e60
v11.1.3-canary.24 2021-09-17 15:00:16 -05:00
Tim Neutkens
367f8d6e6d v11.1.3-canary.23 2021-09-17 09:35:40 +02:00
Tim Neutkens
84ce15bba5 v11.1.3-canary.22 2021-09-16 19:48:00 +02:00
Tim Neutkens
e98690c307 v11.1.3-canary.21 2021-09-16 17:13:46 +02:00
Tim Neutkens
60560a941d v11.1.3-canary.20 2021-09-16 15:48:46 +02:00
Tim Neutkens
c491adfe12 v11.1.3-canary.19 2021-09-16 08:59:20 +02:00
Tim Neutkens
4b41b48a8e v11.1.3-canary.18 2021-09-15 17:34:32 +02:00
Tim Neutkens
ca27e34167 v11.1.3-canary.17 2021-09-15 09:32:44 +02:00
jj@jjsweb.site
2cfdc68650
v11.1.3-canary.16 2021-09-14 16:05:21 -05:00
Tim Neutkens
5fed96dd88 v11.1.3-canary.15 2021-09-10 11:20:55 +02:00
Tim Neutkens
dab4ac2d12 v11.1.3-canary.14 2021-09-08 08:39:32 +02:00
Tim Neutkens
49a2fa2b07 v11.1.3-canary.13 2021-09-07 12:25:22 +02:00
Tim Neutkens
b16751283c v11.1.3-canary.12 2021-09-07 10:39:51 +02:00
Tim Neutkens
1ee74ebcf1 v11.1.3-canary.11 2021-09-07 08:15:53 +02:00
Tim Neutkens
fb3aff4139 v11.1.3-canary.10 2021-09-07 07:20:56 +02:00
Tim Neutkens
c5f724df0a v11.1.3-canary.9 2021-09-06 19:25:29 +02:00
JJ Kasper
85366a0244
v11.1.3-canary.8 2021-09-03 16:48:00 -05:00
Houssein Djirdeh
d0563127c6
[ESLint Plugin] Updates no-document-import-in-page rule to use path separators (#28768)
Context: https://github.com/vercel/next.js/pull/28745/files#r701418932
2021-09-03 18:51:21 +00:00
Steven
1eb3bd9240 v11.1.3-canary.7 2021-09-02 19:09:08 -04:00
Steven
31fef9ae5d v11.1.3-canary.6 2021-09-02 18:24:42 -04:00
jj@jjsweb.site
2c27f995e4
v11.1.3-canary.5 2021-09-02 16:48:25 -05:00
Steven
7980bcd453 v11.1.3-canary.4 2021-09-02 17:32:48 -04:00
Steven
9bbba98c01
Fix next lint no-document-import-in-page on Windows (#28745)
Fixes #28596
2021-09-02 20:51:22 +00:00
Tim Neutkens
d310009c9b v11.1.3-canary.3 2021-09-02 13:40:21 +02:00
Prateek Bhatnagar
7c29a262e1
Bug fix for lint rule (#28677) 2021-09-02 10:45:27 +02:00
Tim Neutkens
3693ed2e0e v11.1.3-canary.2 2021-09-02 08:55:58 +02:00
jj@jjsweb.site
899683c3d5
v11.1.3-canary.1 2021-09-01 14:44:53 -05:00
jj@jjsweb.site
c1a97e557b
v11.1.3-canary.0 2021-08-31 16:11:16 -05:00
Rahul Gaba
c21cbdf899
Fix for next-script-for-ga ESLint rule crashing when a method is used in dangerouslySetInnerHTML (#28675)
Fixes #28635



## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [x] Errors have helpful link attached, see `contributing.md`
2021-08-31 20:23:21 +00:00
Tim Neutkens
97456e81ce v11.1.2 2021-08-31 07:15:17 +02:00
jj@jjsweb.site
248b34105b
v11.1.2-canary.0 2021-08-30 21:48:53 -05:00
Steven
804971fd9a v11.1.1 2021-08-30 14:24:52 -04:00
jj@jjsweb.site
194d70f068
v11.1.1-canary.19 2021-08-30 13:20:57 -05:00
Steven
a60690f59b v11.1.1-canary.18 2021-08-30 13:06:42 -04:00
Steven
ed6ce1ae27 v11.1.1-canary.17 2021-08-25 15:25:53 -04:00
Houssein Djirdeh
9442925f50
handle edge case for no-import-document rule (#28261)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-08-25 13:30:49 -05:00
Steven
d835402f28 v11.1.1-canary.16 2021-08-25 12:53:06 -04:00
Tim Neutkens
a509d906a6 v11.1.1-canary.15 2021-08-25 10:49:43 +02:00
jj@jjsweb.site
ee462442c8
v11.1.1-canary.14 2021-08-24 09:54:07 -05:00
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
jj@jjsweb.site
52b858a4ea
v11.1.1-canary.13 2021-08-19 12:27:49 -05:00
jj@jjsweb.site
517ea6dc20
v11.1.1-canary.12 2021-08-19 11:25:39 -05:00
jj@jjsweb.site
f4b85dc9e8
v11.1.1-canary.11 2021-08-18 11:30:31 -05:00
Tim Neutkens
71cecc2ba7 v11.1.1-canary.10 2021-08-17 10:41:02 +02:00
JJ Kasper
5544adc481
Update to latest babel versions (#28174) 2021-08-17 09:18:08 +02:00
jj@jjsweb.site
4dad4fb7bf
v11.1.1-canary.9 2021-08-16 17:45:02 -05:00
Rahul Gaba
da4d65252f
ESLint Plugin: Prefer next script component when using the inline script for Google Analytics. (#25147)
* Add a lint rule for using next script component when using inline script for Google Analytics.

* Apply suggestions from code review

Co-authored-by: JJ Kasper <jj@jjsweb.site>

* Update errors/next-script-for-ga.md

Co-authored-by: JJ Kasper <jj@jjsweb.site>

* Apply suggestions from code review

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-08-16 13:55:07 -05:00
Jiachi Liu
90eae2c00f
Fix crash of lint rule no-document-import-in-page (#28148)
Fixes #28030 
Fixes #28169

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [x] Errors have helpful link attached, see `contributing.md`
2021-08-16 16:04:42 +00:00
Maia Teegarden
ebe3d93f59
v11.1.1-canary.8 2021-08-15 11:46:11 -07:00
jj@jjsweb.site
a1889798d8
v11.1.1-canary.7 2021-08-13 21:23:09 -05:00
Jesse Jafa
a28e775e88
[ESLint] Disallow <Script /> inside _document.js & <Script /> inside the next/head component (#27257)
## Feature

- [x] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. [Feature Request](https://github.com/vercel/next.js/discussions/26365)
- [x] Eslint unit ests added
- [x] Errors have helpful link attached, see `contributing.md`

Let me know if this looks good or something needs to be changed. I still need to add the error links and improve the eslint error messages.

I don't know if the CI runs the ESLint tests, but current all pass locally
2021-08-13 23:16:15 +00:00
Maia Teegarden
2a83012def
v11.1.1-canary.6 2021-08-12 21:10:04 -07:00
Maia Teegarden
ea6a0f0eda
v11.1.1-canary.5 2021-08-12 19:08:44 -07:00
Maia Teegarden
1302067c74
v11.1.1-canary.4 2021-08-12 14:01:16 -07:00
Maia Teegarden
b6411408c0
v11.1.1-canary.3 2021-08-12 10:55:41 -07:00
Maia Teegarden
2d38efa7b5
v11.1.1-canary.2 2021-08-12 10:21:01 -07:00
Tim Neutkens
06e08accde v11.1.1-canary.1 2021-08-12 17:07:36 +02:00
jj@jjsweb.site
988c0c7fd3
v11.1.1-canary.0 2021-08-11 12:13:30 -05:00
Tim Neutkens
ce4adfc02d v11.1.0 2021-08-11 17:52:20 +02:00
Tim Neutkens
092a476feb v11.0.2-canary.31 2021-08-11 17:49:46 +02:00
Tim Neutkens
52486ceccf v11.0.2-canary.30 2021-08-11 15:59:00 +02:00
Tim Neutkens
6014b6e0f8 v11.0.2-canary.29 2021-08-11 12:46:11 +02:00
Brody McKee
4cd45aabcf
Add rootDir setting to eslint-plugin-next (#27918)
## Introduction

This PR enables setting a `rootDir` for a Next.js project, and follows the same pattern used by [`@typescript-eslint/parser`](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser#parseroptionsproject).

## Details

Previously, users had to pass paths to the rule itself.
```js
module.exports = {
  rules: { 
    "@next/next/no-html-link-for-pages": [
      "error",
      // This could be a string, or array of strings.
      "/packages/my-app/pages",
    ],
  },
};
```

With this PR, this has been simplified (the previous implementation still works as expected).
```js
module.exports = {
  settings: { 
    next: {
      rootDir: "/packages/my-app",
    },
  },
  rules: { 
    "@next/next/no-html-link-for-pages": "error",
  },
};
```

Further, this rule allows the use of globs, again aligning with `@typescript-eslint/parser`.
```js
module.exports = {
  settings: { 
    next: {
      // Globs
      rootDir: "/packages/*",
      rootDir: "/packages/{app-a,app-b}",

      // Arrays
      rootDir: ["/app-a", "/app-b"],
      
      // Arrays with globs
      rootDir: ["/main-app", "/other-apps/*"],
  },
};
```

This enables users to either provide per-workspace configuration with overrides, or to use globs for situations like monorepos where the apps share a domain (micro-frontends).

This doesn't solve, but improves https://github.com/vercel/next.js/issues/26330.

## Feature

- [x] 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

- [x] Make sure the linting passes
2021-08-11 10:37:55 +00:00
Tim Neutkens
8cbaa409ca v11.0.2-canary.28 2021-08-10 11:01:53 +02:00
JJ Kasper
e57b959e17
v11.0.2-canary.27 2021-08-06 13:45:57 -05:00
JJ Kasper
f15d05754d
v11.0.2-canary.26 2021-08-04 22:15:26 -05:00
Houssein Djirdeh
df83ccb7cd
[ESLint] Documentation updates + bug fixes (#26331)
Documentation:

- Expands the "Migrating Existing Config" section of ESLint doc to explain in more detail
- Minor changes to the "Ignoring ESLint" doc

Bug fixes:

- Adds `browser` and `node` environments to `eslint-config-next`. Closes #26319
- Fixes `no-document-import` rule. Closes #26159
- Fixes `no-page-custom-font` rule. Closes #26160 #26894
2021-08-05 00:58:06 +00:00
JJ Kasper
ca0c122f63
v11.0.2-canary.25 2021-08-02 20:00:21 -05:00
JJ Kasper
dd7a54c509
v11.0.2-canary.24 2021-07-29 21:15:13 -05:00
JJ Kasper
c63bfbe773
v11.0.2-canary.23 2021-07-28 15:19:07 -05:00
JJ Kasper
7c0f707b06
v11.0.2-canary.22 2021-07-26 12:48:27 -05:00
kaykdm
3b2732bc36
[ESLint] add no-typos rule to eslint (#26650)
* add no-typos rule to eslint

* return early when function name is correct

* Handle null decl.type

* update check

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-07-24 22:22:19 -05:00
JJ Kasper
2cf9b462ae
v11.0.2-canary.21 2021-07-24 12:10:01 -05:00
stefanprobst
daf54bb2b0
[eslint] move core-web-vitals config to eslint-plugin-next (#27363)
this pr moves the "core-web-vitals" config from `eslint-config-next` to `eslint-plugin-next`.

Fixes: #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
2021-07-23 17:58:53 +00:00
JJ Kasper
bb779eceeb
v11.0.2-canary.20 2021-07-22 18:21:12 -05:00
JJ Kasper
5dc5a3fba8
v11.0.2-canary.19 2021-07-21 13:57:48 -05:00
JacobLey
527cb97b56
Support multiple pages directories for linting (#25565)
Monorepos may contain multiple NextJS apps, but linting occurs at top-level so all directories must be declared.

Declaring multiple directories via an Array allows loading all to generate a full list of potential URLs.

Updated schema and tests. Also optimized some of the `fs.*Sync` requests that can add up to lots of blocking lookups.

## 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`
- [x] Integration tests added
- [x] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.

Closes: https://github.com/vercel/next.js/pull/27223
2021-07-20 21:29:54 +00:00
JJ Kasper
a972579304
v11.0.2-canary.18 2021-07-20 12:36:49 -05:00
JJ Kasper
198046360d
v11.0.2-canary.17 2021-07-19 18:31:57 -05:00
JJ Kasper
7644c17f43
v11.0.2-canary.16 2021-07-15 16:42:36 -05:00
Houssein Djirdeh
c46b405ba7
adds no duplicate head rule (#27179) 2021-07-15 13:04:17 -05:00
JJ Kasper
86e3ea8e33
v11.0.2-canary.15 2021-07-14 09:16:46 -05:00
JJ Kasper
8088416082
v11.0.2-canary.14 2021-07-13 09:35:56 -05:00
JJ Kasper
ae6b0a1b39
v11.0.2-canary.13 2021-07-12 17:18:45 -05:00
JJ Kasper
4e8c2a6aa3
v11.0.2-canary.12 2021-07-12 12:18:52 -05:00
Tim Neutkens
1c8a7d55c1 v11.0.2-canary.11 2021-07-11 16:10:30 +02:00
Tim Neutkens
ad56e81f4d v11.0.2-canary.10 2021-07-10 22:29:39 +02:00
JJ Kasper
17582014fc
v11.0.2-canary.9 2021-07-08 20:13:53 -05:00
JJ Kasper
ad3b7409c5
v11.0.2-canary.8 2021-07-08 15:44:44 -05:00
Tim Neutkens
1dd19f5776 v11.0.2-canary.7 2021-07-07 12:39:42 +02:00
JJ Kasper
697756f8ce
v11.0.2-canary.6 2021-07-06 18:11:34 -05:00
JJ Kasper
4fbf961c79
v11.0.2-canary.5 2021-07-02 18:27:50 -05:00
JJ Kasper
138b9ddf99
v11.0.2-canary.4 2021-07-01 17:45:55 -05:00
JJ Kasper
d11589d677
v11.0.2-canary.3 2021-06-28 10:50:14 -05:00
Tim Neutkens
2f03bfa66c v11.0.2-canary.2 2021-06-25 14:01:34 +02:00
Tim Neutkens
4da94a3f53 v11.0.2-canary.1 2021-06-25 11:12:59 +02:00
JJ Kasper
ccf189fbe1
v11.0.2-canary.0 2021-06-23 19:35:20 -05:00
JJ Kasper
e969d22699
v11.0.1 2021-06-22 14:51:49 -05:00
JJ Kasper
30ee9e71b7
v11.0.1-canary.8 2021-06-22 13:54:35 -05:00
JJ Kasper
9fefd3cc1f
v11.0.1-canary.7 2021-06-22 13:00:23 -05:00
Tim Neutkens
075139a23d v11.0.1-canary.6 2021-06-21 13:32:34 +02:00
Lee Robinson
ad5e9bd644
Remove period for ESLint passHref docs link. (#26402)
Due to the period at the end of this sentence, when clicking on the link it would 404. This PR simply removes the period from the message.
2021-06-20 22:55:03 +00:00
JJ Kasper
94f7bfca99
v11.0.1-canary.5 2021-06-18 15:00:12 -05:00
Houssein Djirdeh
ce4f1e889e
[ESLint] Adds --quiet flag, TypeScript resolver and bug fixes (#26280) 2021-06-18 15:17:53 +02:00
JJ Kasper
b4e0eb0bc4
v11.0.1-canary.4 2021-06-17 20:08:52 -05:00
JJ Kasper
a403c4cf95
v11.0.1-canary.3 2021-06-17 12:44:11 -05:00
JJ Kasper
2ac47d2193
v11.0.1-canary.2 2021-06-16 15:25:50 -05:00
JJ Kasper
3c65c34dc8
v11.0.1-canary.1 2021-06-16 11:07:06 -05:00
JJ Kasper
da204bd463
v11.0.1-canary.0 2021-06-15 13:50:12 -05:00
JJ Kasper
0ca24563be
v11.0.0 2021-06-15 09:51:13 -05:00
JJ Kasper
47b96d8ae5
v10.2.4-canary.19 2021-06-15 09:42:16 -05:00
JJ Kasper
7d339b6cd8
v10.2.4-canary.18 2021-06-15 09:24:31 -05:00
JJ Kasper
d19935c302
v10.2.4-canary.17 2021-06-14 20:39:08 -05:00
Tim Neutkens
3b8c2afbfe v10.2.4-canary.16 2021-06-12 13:36:41 +02:00
JJ Kasper
75fdad636e
v10.2.4-canary.15 2021-06-11 16:01:27 -05:00
JJ Kasper
e7ba3eb659
v10.2.4-canary.14 2021-06-11 09:45:36 -05:00
JJ Kasper
e6da19266c
v10.2.4-canary.13 2021-06-10 17:48:46 -05:00
JJ Kasper
9f9a3eeb84
v10.2.4-canary.12 2021-06-09 14:18:01 -05:00
Tim Neutkens
f5c5950f6b v10.2.4-canary.11 2021-06-09 19:39:43 +02:00
Tim Neutkens
a008d01c09 v10.2.4-canary.10 2021-06-09 16:52:25 +02:00
JJ Kasper
ce4e1afba4
v10.2.4-canary.9 2021-06-08 18:31:21 -05:00
Tim Neutkens
3f2379a9ff v10.2.4-canary.8 2021-06-08 20:19:34 +02:00
Tim Neutkens
23ca042c75 v10.2.4-canary.7 2021-06-08 09:10:26 +02:00
JJ Kasper
8c63d17c26
v10.2.4-canary.6 2021-06-07 19:02:46 -05:00
Tim Neutkens
4df4a25564 v10.2.4-canary.5 2021-06-07 14:49:03 +02:00
Houssein Djirdeh
8ae12db1e3
ESLint Plugin: Fix Document and Head import rules (#25730) 2021-06-07 12:40:28 +02:00
Tim Neutkens
dfc5907f10 v10.2.4-canary.4 2021-06-04 12:13:54 +02:00
Tim Neutkens
9184fc9cf2 v10.2.4-canary.3 2021-06-03 14:20:37 +02:00
Houssein Djirdeh
bbc28ccae0
next lint + ESLint in Create Next App (#25064)
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2021-06-03 14:01:24 +02:00
JJ Kasper
7456fcf30f
v10.2.4-canary.2 2021-06-02 11:05:37 -05:00
JJ Kasper
d5c2fe616c
v10.2.4-canary.1 2021-06-01 12:08:31 -05:00