-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(examples): fix basic lint (#5775)
- Loading branch information
Showing
27 changed files
with
1,774 additions
and
654 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ["custom"], | ||
extends: ["eslint-config-custom/next"], | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ["custom"], | ||
extends: ["eslint-config-custom/next"], | ||
}; |
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 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,3 @@ | ||
# `@turbo/eslint-config` | ||
|
||
Collection of internal eslint configurations. |
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,34 @@ | ||
const { resolve } = require("node:path"); | ||
|
||
const project = resolve(process.cwd(), "tsconfig.json"); | ||
|
||
/* | ||
* This is a custom ESLint configuration for use with | ||
* typescript packages. | ||
* | ||
* This config extends the Vercel Engineering Style Guide. | ||
* For more information, see https://github.com/vercel/style-guide | ||
* | ||
*/ | ||
|
||
module.exports = { | ||
extends: [ | ||
"@vercel/style-guide/eslint/node", | ||
"@vercel/style-guide/eslint/typescript", | ||
].map(require.resolve), | ||
parserOptions: { | ||
project, | ||
}, | ||
globals: { | ||
React: true, | ||
JSX: true, | ||
}, | ||
settings: { | ||
"import/resolver": { | ||
typescript: { | ||
project, | ||
}, | ||
}, | ||
}, | ||
ignorePatterns: ["node_modules/", "dist/"], | ||
}; |
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,41 @@ | ||
const { resolve } = require("node:path"); | ||
|
||
const project = resolve(process.cwd(), "tsconfig.json"); | ||
|
||
/* | ||
* This is a custom ESLint configuration for use with | ||
* Next.js apps. | ||
* | ||
* This config extends the Vercel Engineering Style Guide. | ||
* For more information, see https://github.com/vercel/style-guide | ||
* | ||
*/ | ||
|
||
module.exports = { | ||
extends: [ | ||
"@vercel/style-guide/eslint/typescript", | ||
"@vercel/style-guide/eslint/browser", | ||
"@vercel/style-guide/eslint/react", | ||
"@vercel/style-guide/eslint/next", | ||
"eslint-config-turbo", | ||
].map(require.resolve), | ||
parserOptions: { | ||
project, | ||
}, | ||
globals: { | ||
React: true, | ||
JSX: true, | ||
}, | ||
settings: { | ||
"import/resolver": { | ||
typescript: { | ||
project, | ||
}, | ||
}, | ||
}, | ||
ignorePatterns: ["node_modules/", "dist/"], | ||
// add rules configurations here | ||
rules: { | ||
"import/no-default-export": "off", | ||
}, | ||
}; |
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 @@ | ||
{ | ||
"name": "eslint-config-custom", | ||
"license": "MIT", | ||
"version": "0.0.0", | ||
"private": true, | ||
"devDependencies": { | ||
"@vercel/style-guide": "^4.0.2", | ||
"eslint-config-turbo": "^1.10.12" | ||
} | ||
} |
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,39 @@ | ||
const { resolve } = require("node:path"); | ||
|
||
const project = resolve(process.cwd(), "tsconfig.json"); | ||
|
||
/* | ||
* This is a custom ESLint configuration for use with | ||
* internal (bundled by their consumer) libraries | ||
* that utilize React. | ||
* | ||
* This config extends the Vercel Engineering Style Guide. | ||
* For more information, see https://github.com/vercel/style-guide | ||
* | ||
*/ | ||
|
||
module.exports = { | ||
extends: [ | ||
"@vercel/style-guide/eslint/browser", | ||
"@vercel/style-guide/eslint/typescript", | ||
"@vercel/style-guide/eslint/react", | ||
].map(require.resolve), | ||
parserOptions: { | ||
project, | ||
}, | ||
globals: { | ||
JSX: true, | ||
}, | ||
settings: { | ||
"import/resolver": { | ||
typescript: { | ||
project, | ||
}, | ||
}, | ||
}, | ||
ignorePatterns: ["node_modules/", "dist/", ".eslintrc.js"], | ||
// add rules configurations here | ||
rules: { | ||
"import/no-default-export": "off", | ||
}, | ||
}; |
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,3 @@ | ||
module.exports = { | ||
extends: ["eslint-config-custom/react-internal"], | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
"use client"; | ||
|
||
export function Button(): JSX.Element { | ||
return ( | ||
// eslint-disable-next-line no-alert | ||
<button onClick={(): void => alert("booped")} type="button"> | ||
Boop | ||
</button> | ||
); | ||
} |
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,3 @@ | ||
export function Header({ text }: { text: string }): JSX.Element { | ||
return <h1>{text}</h1>; | ||
} |
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,5 +1,3 @@ | ||
import * as React from "react"; | ||
|
||
// component exports | ||
export * from "./Button"; | ||
export * from "./Header"; | ||
export * from "./button"; | ||
export * from "./header"; |
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
Oops, something went wrong.
cb6105a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
examples-basic-web – ./examples/basic/apps/web
turborepo-examples-basic-web.vercel.sh
examples-basic-web-git-main.vercel.sh
examples-basic-web.vercel.sh