-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix tsconfig.json and Lint errors #290
Open
derekvmcintire
wants to merge
3
commits into
codeforboston:main
Choose a base branch
from
derekvmcintire:ts_config_updates
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 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,12 +1,13 @@ | ||
import { createId as cuid } from '@paralleldrive/cuid2' | ||
import { redirect } from '@remix-run/node' | ||
import { GitHubStrategy } from 'remix-auth-github' | ||
import { type Strategy } from 'remix-auth' | ||
import { GitHubStrategy, type GitHubStrategyOptions } from 'remix-auth-github' | ||
import { z } from 'zod' | ||
import { cache, cachified } from '../cache.server.ts' | ||
import { connectionSessionStorage } from '../connections.server.ts' | ||
import { type Timings } from '../timing.server.ts' | ||
import { MOCK_CODE_GITHUB_HEADER, MOCK_CODE_GITHUB } from './constants.ts' | ||
import { type AuthProvider } from './provider.ts' | ||
import { type ProviderUser, type AuthProvider } from './provider.ts' | ||
|
||
const GitHubUserSchema = z.object({ login: z.string() }) | ||
const GitHubUserParseResult = z | ||
|
@@ -25,20 +26,20 @@ const shouldMock = | |
process.env.NODE_ENV === 'test' | ||
|
||
export class GitHubProvider implements AuthProvider { | ||
getAuthStrategy() { | ||
getAuthStrategy(): Strategy<ProviderUser, any> { // @TODO double check the types here | ||
return new GitHubStrategy( | ||
{ | ||
clientID: process.env.GITHUB_CLIENT_ID, | ||
clientSecret: process.env.GITHUB_CLIENT_SECRET, | ||
callbackURL: '/auth/github/callback', | ||
}, | ||
} as unknown as GitHubStrategyOptions, // @TODO fix types here, clientID and callbackURL do not exist on GitHubStrategyOptions | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @todo here because clientID and callbackURL do not exist on type GitHubStrategyOptions, so we either need to figure out what type we should be using, or potentially update the code here |
||
async ({ profile }) => { | ||
const email = profile.emails[0]?.value.trim().toLowerCase() | ||
if (!email) { | ||
throw new Error('Email not found') | ||
} | ||
const username = profile.displayName | ||
const imageUrl = profile.photos[0].value | ||
const imageUrl = profile.photos?.[0]?.value || ''; | ||
return { | ||
email, | ||
id: profile.id, | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,28 @@ | ||
{ | ||
"include": ["**/*.ts", "**/*.tsx"], | ||
"extends": ["@epic-web/config/typescript"], | ||
"extends": ["@epic-web/config/typescript"], // Uses a shared TypeScript configuration provided by the @epic-web package as the base. | ||
"compilerOptions": { | ||
// "lib": ["DOM", "DOM.Iterable", "ES2022"], | ||
// "isolatedModules": true, | ||
// "esModuleInterop": true, | ||
// "jsx": "react-jsx", | ||
// "module": "ES2022", | ||
// "target": "ES2022", | ||
// "moduleResolution": "bundler", | ||
// "resolveJsonModule": true, | ||
// "strict": true, | ||
// "noImplicitAny": true, | ||
// "allowJs": true, | ||
// "forceConsistentCasingInFileNames": true, | ||
"paths": { | ||
"#*": ["./*"], | ||
"#app/*": ["./app/*"], | ||
"#tests/*": ["./tests/*"], | ||
"@/icon-name": [ | ||
"./app/components/ui/icons/name.d.ts", | ||
"./types/icon-name.d.ts" | ||
"target": "ES2018", // Compile TypeScript code to ECMAScript 2018. | ||
"lib": ["DOM", "DOM.Iterable", "ESNext"], // Includes type definitions for the DOM, DOM iterables, and modern ECMAScript features. | ||
"allowJs": true, // Enables the inclusion of .js files in the project. | ||
"skipLibCheck": true, // Skip type checking of all declaration files (*.d.ts). | ||
"esModuleInterop": true, // Enables compatibility with CommonJS modules. | ||
"allowSyntheticDefaultImports": true, // Allows default imports from modules with no default export. | ||
"strict": true, // Enables all strict type-checking options. | ||
"forceConsistentCasingInFileNames": true, // Enforces a consistent casing in file names. | ||
"module": "NodeNext", // Uses Node.js-style ES Module resolution for compatibility with modern Node.js versions. | ||
"moduleResolution": "nodenext", // Uses Node.js ES Module resolution logic. | ||
"resolveJsonModule": true, // Allows importing JSON files as modules. | ||
"isolatedModules": true, // Disallows the use of global modules and global side-effects. | ||
"noEmit": true, // Disables emitting output files. | ||
"jsx": "react-jsx", // Enables JSX support with React JSX. | ||
"paths": { // Maps paths to different directories or files. | ||
"#*": ["./*"], // Maps all paths starting with # to the root directory. | ||
"#app/*": ["./app/*"], // Maps all paths starting with #app to the app directory. | ||
"#tests/*": ["./tests/*"], // Maps all paths starting with #tests to the tests directory. | ||
"@/icon-name": [ // Maps the @/icon-name path to the icon-name.d.ts file. | ||
"./app/components/ui/icons/name.d.ts", // Maps the @/icon-name path to the | ||
"./types/icon-name.d.ts" // icon-name.d.ts file in the types directory. | ||
] | ||
} | ||
// ,"skipLibCheck": true, | ||
// "allowImportingTsExtensions": true, | ||
// "noEmit": true, | ||
} | ||
} |
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 @@ | ||
declare module 'vite-env-only'; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
added @todo here for someone to double check the types