Commit graph

867 commits

Author SHA1 Message Date
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
7a1c9eb17e
[ESLint] Introduce a new setup process when next lint is run for the first time (#26584)
This PR introduces an improved developer experience when `next lint` is run for the first time.

### Current behavior

`eslint-config-next` is a required package that must be installed before proceeding with `next lint` or `next build`:

![image](https://user-images.githubusercontent.com/12476932/123468791-43088100-d5c0-11eb-9ad0-5beb80b6c968.png)

Although this has helped many developers start using the new ESLint config, this has also resulted in a few issues:

- Users are required to install the full config (`eslint-config-next`) even if they do not use it or use the Next.js plugin directly (`eslint-plugin-next`).
  - #26348

- There's some confusion  on why `eslint-config-next` needs to be installed or how it should be used instead of `eslint-plugin-next`.
  - #26574
  - #26475
  - #26438

### New behavior

Instead of enforcing `eslint-config-next` as a required package, this PR prompts the user by asking what config they would like to start. This happens when `next lint` is run for the first time **and** if no ESLint configuration is detected in the application.

<img src="https://user-images.githubusercontent.com/12476932/124331177-e1668a80-db5c-11eb-8915-38d3dc20f5d4.gif" width="800" />

- The CLI will take care of installing `eslint` or `eslint-config-next` if either is not already installed
- Users now have the option to choose between a strict configuration (`next/core-web-vitals`) or just the base configuration (`next`)
- For users that decide to create their own ESLint configuration, or already have an existing one, **installing `eslint-config-next` will not be a requirement for `next lint` or `next build` to run**. A warning message will just show if the Next.js ESLint plugin is not detected in an ESLint config. 

  <img width="682" alt="Screen Shot 2021-06-25 at 3 02 12 PM" src="https://user-images.githubusercontent.com/12476932/123473329-6cc4a680-d5c6-11eb-9a57-d5c0b89a2732.png">

---

In addition, this PR also:

- Fixes #26348
- Updates documentation to make it more clear what approach to take for new and existing ESLint configurations
2021-08-04 21:53:15 +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
Noah Weingand
84b71c3a6a
change ts template readme api/index file extension from tsx to ts (#27485)
## Documentation / Examples

- [x] Make sure the linting passes

### Changes
* Corrected the file extension reference from .tsx to .ts for ```packages/create-next-app/templates/typescript/README-template.md```. 
This matches the actual file extension and avoids confusion for new users.
2021-07-25 18:56:35 +00:00
JJ Kasper
2cf9b462ae
v11.0.2-canary.21 2021-07-24 12:10:01 -05: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
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
Yubin
736db42352
Add NextPage type to create-next-app typescript template (#27246)
## Documentation / Examples

- [x] Make sure the linting passes
2021-07-16 19:55:09 +00:00
JJ Kasper
7644c17f43
v11.0.2-canary.16 2021-07-15 16:42:36 -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
Anindya Dey
caca389cc1
fix error message during create-next-app (#26980)
Fixes [issue #19588](https://github.com/vercel/next.js/issues/19588)

Here's a screenshot of the error message:
![image](https://user-images.githubusercontent.com/30517208/124733436-d1babd80-df31-11eb-96e4-513505ba07a0.png)
2021-07-07 11:12:58 +00: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
Sachin Raja
ba88bfde3e
include image types in create-next-app next-env.d.ts (#26890)
Previous TypeScript template in `create-next-app` only had the following in `next-env.d.ts`
```ts
/// <reference types="next" />
/// <reference types="next/types/global" />
```

New `next-env.d.ts` has this:
```ts
/// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" />
```

Next.js automatically adds the `image-types` reference, but it won't be included in the initial commit. 
## Documentation / Examples

- [x] Make sure the linting passes
2021-07-04 17:21:16 +00: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
Peter Mekhaeil
005a6e4c85
chore: Add Alex to lint documentation (#26354)
This Pull Request adds [Alex](https://alexjs.com/) to our documentation. It catches insensitive, inconsiderate writing. 

The original PR (https://github.com/vercel/next.js/pull/25821) is too large so I have decided to break it down into smaller PRs. This PR is the first part. Then I will continue to add the rest of the documentation in smaller PRs.

## More Information on Alex:
https://alexjs.com/
https://github.com/get-alex/alex

## Documentation / Examples

- [x] Make sure the linting passes
2021-06-22 16:03:12 +00:00
Tim Neutkens
075139a23d v11.0.1-canary.6 2021-06-21 13:32:34 +02:00
Paco
d0f41f3b49
Update create-next-app template favicons (#26289) 2021-06-18 15:29:11 -05:00
JJ Kasper
94f7bfca99
v11.0.1-canary.5 2021-06-18 15:00:12 -05:00
JJ Kasper
b4e0eb0bc4
v11.0.1-canary.4 2021-06-17 20:08:52 -05:00
JJ Kasper
76f0b3585f
Update to latest TypeScript version and de-dupe versions (#26285)
* Update to latest TypeScript version and de-dupe versions

* Update version test
2021-06-17 17:43:25 -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
de08b1fff1
Remove unsupported examples (#26075)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-06-14 20:27:06 +02: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
C. Lewis
eddf5e0de9
docs: advise users of create-next-app --ts, --typescript (#25349)
Since #24655 landed in 10.2.1, I wanted to update the documentation, especially for the top Google results for "next typescript", so that users know how to create a TS project.

Please feel free to change anything you feel is appropriate.
2021-06-11 02:48:06 +00: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
matamatanot
ca2921fca3
Update CNA build target in tsconfig (#25780) 2021-06-08 09:32:29 +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
Matt Gleich
7d02abc7ce
feat: have .tsx be in ts template for create-next-app (#25820)
Signed-off-by: Matthew Gleich <git@mattglei.ch>

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
2021-06-07 18:22:55 +02:00
Tim Neutkens
4df4a25564 v10.2.4-canary.5 2021-06-07 14:49:03 +02:00
Tim Neutkens
dfc5907f10 v10.2.4-canary.4 2021-06-04 12:13:54 +02:00
Steven
3ae27a87e3
Bump "engines" to node >= 12.0.0 (#25761)
* Bump "engines" to node >= 12.0.0

* Bump next-stats-action

* Rename azure groups
2021-06-03 17:21:16 -05: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
Gerald Monaco
1ee97b3c5d
Enable Strict Mode in new create-next-app projects (#25696) 2021-06-02 12:08:54 +02:00
JJ Kasper
d5c2fe616c
v10.2.4-canary.1 2021-06-01 12:08:31 -05:00
JJ Kasper
39181c4073
v10.2.4-canary.0 2021-05-27 23:25:39 -05:00
JJ Kasper
4f32a03ffa
v10.2.3 2021-05-24 14:20:31 -05:00
JJ Kasper
1745cf6566
v10.2.3-canary.1 2021-05-24 13:29:16 -05:00
Tim Neutkens
c7596be786 v10.2.3-canary.0 2021-05-24 10:54:20 +02:00
JJ Kasper
24c3929ec4
v10.2.2 2021-05-19 20:32:11 -05:00
JJ Kasper
2482520cc2
v10.2.2-canary.1 2021-05-19 17:56:06 -05:00
JJ Kasper
42a62f4c23
v10.2.2-canary.0 2021-05-19 15:58:06 -05:00
JJ Kasper
c0a07aa9e0
Ensure CNA install succeeds with npm and example flags (#25267)
* Ensure CNA install succeeds with npm and example flags
2021-05-19 15:27:41 -05:00
JJ Kasper
9513572755
v10.2.1 2021-05-19 11:24:49 -05:00
JJ Kasper
7452567325
v10.2.1-canary.12 2021-05-19 10:50:08 -05:00
JJ Kasper
25096df801
v10.2.1-canary.11 2021-05-18 16:58:00 -05:00
JJ Kasper
218c6114c9
v10.2.1-canary.10 2021-05-17 15:25:08 -05:00
Tim Neutkens
d746db6f5c v10.2.1-canary.9 2021-05-17 14:16:14 +02:00
James George
9b27d31d36
chore(create-next-app): remove stub type definitions (#25139)
[@types/next](https://www.npmjs.com/package/@types/next) is a stub types definition.
2021-05-16 05:29:50 +00:00
JJ Kasper
659dae0425
v10.2.1-canary.8 2021-05-14 15:41:49 -05:00
Tim Neutkens
d9000d073b v10.2.1-canary.7 2021-05-14 16:41:54 +02:00
Tim Neutkens
7d75bc3ed1 v10.2.1-canary.6 2021-05-13 16:32:33 +02:00
Marcos Taron
1cb83c1b35
update create-next-app documentation (#25079)
Update `create-next-app` documentation based in #25010 issue. 


## Documentation / Examples

- [X] Make sure the linting passes
2021-05-13 10:39:21 +00:00
Tim Neutkens
30462ebf2c v10.2.1-canary.5 2021-05-11 09:24:55 +02:00
Tim Neutkens
da97a18daf v10.2.1-canary.4 2021-05-10 14:43:02 +02:00
Tim Neutkens
8218d5d508 v10.2.1-canary.3 2021-05-07 19:40:20 +02:00
C. Lewis
9c77cda6c5
feat(create-next-app): add --ts, --typescript support (#24655)
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2021-05-07 10:08:16 +02:00
JJ Kasper
9c47ca2cfd
v10.2.1-canary.2 2021-04-30 13:27:54 -05:00
JJ Kasper
49cd08da17
v10.2.1-canary.1 2021-04-29 19:52:43 -05:00
JJ Kasper
f9faf3f96a
v10.2.1-canary.0 2021-04-29 12:55:54 -05:00
JJ Kasper
6b97bcea5b
v10.2.0 2021-04-28 09:32:18 -05:00
JJ Kasper
0abbb75b29
v10.1.4-canary.18 2021-04-28 08:58:39 -05:00