-
-
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
Merged
plocket
merged 16 commits into
codeforboston:main
from
derekvmcintire:ts_config_updates
Jan 22, 2025
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
7337558
fixed all ts errors and lint warnings
derekvmcintire 3be08f1
Add comments to tsconfig
derekvmcintire 0227873
Don't override includes
derekvmcintire e30499f
add stuff
derekvmcintire 20d36e9
change target to ES2020
derekvmcintire 7761e69
add exclude list
derekvmcintire 2d3224f
remove commented out lines
derekvmcintire 7762161
More explicit exclude
derekvmcintire cb18d3e
try include as well as exclude
derekvmcintire b0664c9
Letting claude give it a try
derekvmcintire 6b138e8
I dont think build is a hidden directory
derekvmcintire c8deaa0
undo claude
derekvmcintire f597432
Merge remote-tracking branch 'origin/main' into ts_config_updates
derekvmcintire 8a39b10
Type check working now
derekvmcintire 4c8c303
fix eslint comment as well
derekvmcintire 13fc701
Add noUncheckedIndexAccess
derekvmcintire 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
2 changes: 1 addition & 1 deletion
2
heat-stack/app/components/ui/heat/CaseSummaryComponents/Graphs/HeatLoadGraphLegend.tsx
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
1 change: 0 additions & 1 deletion
1
heat-stack/app/components/ui/heat/CaseSummaryComponents/HeatLoadAnalysis.tsx
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
4 changes: 2 additions & 2 deletions
4
...-stack/app/components/ui/heat/CaseSummaryComponents/utility/build-heat-load-graph-data.ts
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
2 changes: 1 addition & 1 deletion
2
heat-stack/app/components/ui/heat/CaseSummaryComponents/utility/heat-load-calculations.ts
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,40 @@ | ||
{ | ||
"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).q | ||
"esModuleInterop": true, // Enables compatibility with CommonJS modules. | ||
"noUncheckedIndexedAccess": true, // https://www.totaltypescript.com/tips/make-accessing-objects-safer-by-enabling-nouncheckedindexedaccess-in-tsconfig | ||
"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, | ||
} | ||
}, | ||
"include": [ | ||
"**/*.ts", | ||
"**/*.tsx" | ||
], | ||
"exclude": [ | ||
"node_modules", | ||
"/build", | ||
"/build/**/*", | ||
"dist", | ||
".cache" | ||
] | ||
} |
Oops, something went wrong.
Oops, something went wrong.
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