Commit graph

3 commits

Author SHA1 Message Date
Tim Neutkens
ed81a14922
Enable @typescript-eslint/no-use-before-define for examples dir (#39469)
Found that this rule was added but all options are set to `false` so it doesn't do anything. Started with enabling it for examples to ensure minimal breaking of existing PRs.

## 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
- [ ] 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 by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-08-10 16:30:36 +00:00
Amith Mihiranga
669cad9731
Fix: with-mongodb-mongoose example improper fetch error handling (#15856)
Correct the error handling for fetch API to check if the status is ok or not

FIxes #15808
2020-08-05 07:37:29 +00:00
MichelleLucero
3dbddfa02a
[ EXAMPLES ] Added with-mongodb example (#13028)
* created with-mongodb, Next.js + MongoDB

Co-authored-by: Shania Dhani <31454777+sdhani@users.noreply.github.com>
Co-authored-by: Michelle Lucero <31500626+MichelleLucero@users.noreply.github.com>
Co-authored-by: Chi Shing Lee <60354073+chislee0708@users.noreply.github.com>

* Update examples/with-mongodb/README.md

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>

* modified for dotenv and environment var setup

* removed extra instructions on readme, linked it to the MongoDB guides

* changes to environment var

* replaced document with react logic

* removed Pet header

* removed isomorphic-unfetch

* replaced getInitialProps with getStaticProps (SSG)

* removed console log

* deleted next.config.js file

* fixed prettier styling

* fixed link 404 server rendering issue

* modified server path for delete/edit

* fixed prettier styling

* fixed a typo

* change .env to .env.local

Co-authored-by: Joe Haddad <timer150@gmail.com>

* fixed typo, change .env to .env.local

Co-authored-by: Joe Haddad <timer150@gmail.com>

* change .env to .env.local

Co-authored-by: Joe Haddad <timer150@gmail.com>

* Update examples/with-mongodb/package.json

Co-authored-by: Joe Haddad <timer150@gmail.com>

* removed dotenv dev dependency

Co-authored-by: Joe Haddad <timer150@gmail.com>

* cleaned up code and instructions

* Update examples/with-mongodb/.gitignore

Co-authored-by: Luis Alvarez D. <luis@vercel.com>

* minor changes to code style and logic

* Updated index page and .env.local.example

* Updated new page

* Don't use SSG for the edit page

* Fixed revalidation issue

* Use es6 for the model

* Updated edit page

* Removed VERCEL_URL

* Updated readme and renamed env

* Added temporal vercel.json

* Removed seed until added with a script

* Updated package.json

* Renamed example in readme

* Renamed example

* Lint fix

Co-authored-by: liulanz <zhengliulan@gmail.com>
Co-authored-by: Shania Dhani <31454777+sdhani@users.noreply.github.com>
Co-authored-by: Chi Shing Lee <60354073+chislee0708@users.noreply.github.com>
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: sdhani <shania.dhani46@myhunter.cuny.edu>
Co-authored-by: liulanz <37808313+liulanz@users.noreply.github.com>
Co-authored-by: Joe Haddad <timer150@gmail.com>
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
2020-05-30 12:15:00 -05:00