Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'canary' into feat-next-binding
- Loading branch information
Showing
75 changed files
with
1,626 additions
and
409 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
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,24 @@ | ||
{ | ||
"recommendations": [ | ||
// Linting / Formatting | ||
"rust-lang.rust-analyzer", | ||
"esbenp.prettier-vscode", | ||
"dbaeumer.vscode-eslint", | ||
"usernamehw.errorlens", | ||
|
||
// Testing | ||
"orta.vscode-jest", | ||
|
||
// PR management / Reviewing | ||
"github.vscode-pull-request-github", | ||
|
||
// Showing todo comments | ||
"gruntfuggly.todo-tree", | ||
|
||
// Collaborating | ||
"ms-vsliveshare.vsliveshare", | ||
|
||
// Debugging | ||
"ms-vscode.vscode-js-profile-flame" | ||
] | ||
} |
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,15 +1,54 @@ | ||
{ | ||
// Formatting using Prettier by default for all languages | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
// Formatting using Prettier for JavaScript, overrides VSCode default. | ||
"[javascript]": { | ||
"editor.defaultFormatter": "esbenp.prettier-vscode" | ||
}, | ||
// Formatting using Rust-Analyzer for Rust. | ||
"[rust]": { | ||
"editor.defaultFormatter": "rust-lang.rust-analyzer" | ||
}, | ||
// Linting using ESLint. | ||
"eslint.validate": [ | ||
"javascript", | ||
"javascriptreact", | ||
{ "language": "typescript", "autoFix": true }, | ||
{ "language": "typescriptreact", "autoFix": true } | ||
"typescript", | ||
"typescriptreact" | ||
], | ||
"debug.javascript.unmapMissingSources": true, | ||
// Disable Jest autoRun as otherwise it will start running all tests the first time. | ||
"jest.autoRun": "off", | ||
|
||
// Debugging. | ||
"debug.javascript.unmapMissingSources": true, | ||
|
||
"files.exclude": { | ||
"**/node_modules": false, | ||
"node_modules": true, | ||
"*[!test]**/node_modules": true | ||
} | ||
}, | ||
|
||
// Ensure enough terminal history is preserved when running tests. | ||
"terminal.integrated.scrollback": 10000, | ||
|
||
// Configure todo-tree to exclude node_modules, dist, and compiled. | ||
"todo-tree.filtering.excludeGlobs": [ | ||
"**/node_modules", | ||
"**/dist", | ||
"**/compiled" | ||
], | ||
// Match TODO-APP in addition to other TODOs. | ||
"todo-tree.general.tags": [ | ||
"BUG", | ||
"HACK", | ||
"FIXME", | ||
"TODO", | ||
"XXX", | ||
"[ ]", | ||
"[x]", | ||
"TODO-APP" | ||
], | ||
|
||
// Disable TypeScript surveys. | ||
"typescript.surveys.enabled": false | ||
} |
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
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,30 @@ | ||
# createContext in a Server Component | ||
|
||
#### Why This Error Occurred | ||
|
||
You are using `createContext` in a Server Component but it only works in Client Components. | ||
|
||
#### Possible Ways to Fix It | ||
|
||
Mark the component using `createContext` as a Client Component by adding `'use client'` at the top of the file. | ||
|
||
##### Before | ||
|
||
```jsx | ||
import { createContext } from 'react' | ||
|
||
const Context = createContext() | ||
``` | ||
|
||
##### After | ||
|
||
```jsx | ||
'use client' | ||
import { createContext } from 'react' | ||
|
||
const Context = createContext() | ||
``` | ||
|
||
### Useful Links | ||
|
||
[Server and Client Components](https://beta.nextjs.org/docs/rendering/server-and-client-components#context) |
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
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
import type { AppProps } from 'next/app' | ||
import '../App.scss' | ||
|
||
function MyApp({ Component, pageProps }: AppProps) { | ||
return <Component {...pageProps} /> | ||
} | ||
|
||
export default MyApp |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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,20 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"strict": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"noEmit": true, | ||
"esModuleInterop": true, | ||
"module": "esnext", | ||
"moduleResolution": "node", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"jsx": "preserve", | ||
"incremental": true | ||
}, | ||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], | ||
"exclude": ["node_modules"] | ||
} |
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,8 @@ | ||
declare namespace NodeJS { | ||
export interface ProcessEnv { | ||
readonly NEXT_PUBLIC_MQTT_URI: string | ||
readonly NEXT_PUBLIC_MQTT_USERNAME: string | ||
readonly NEXT_PUBLIC_MQTT_PASSWORD: string | ||
readonly NEXT_PUBLIC_MQTT_CLIENTID: string | ||
} | ||
} |
Oops, something went wrong.