Skip to content

Commit

Permalink
Add typescript to linter
Browse files Browse the repository at this point in the history
  • Loading branch information
tschumpr committed Dec 17, 2024
1 parent fde22d9 commit 71330aa
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 23 deletions.
4 changes: 2 additions & 2 deletions src/Geopilot.Frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"scripts": {
"dev": "vite",
"build": "vite build",
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0",
"lint:fix": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0 --fix",
"lint": "eslint . --ext js,jsx,ts,tsx,json --report-unused-disable-directives --max-warnings 0",
"lint:fix": "eslint . --ext js,jsx,ts,tsx,json --report-unused-disable-directives --max-warnings 0 --fix",
"preview": "vite preview",
"predev": "node aspnetcore-https.js",
"test": "cypress run",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const ApiAuthConfigurationProvider: FC<PropsWithChildren> = ({ children }
const [apiAuthSettings, setApiAuthSettings] = useState<AuthSettings>();
const { fetchApi } = useApi();

// eslint-disable-next-line react-hooks/exhaustive-deps
const loadAuthSettings = () => {
fetchApi<AuthSettings>("/api/v1/user/auth").then(setApiAuthSettings);
};
Expand Down
35 changes: 14 additions & 21 deletions src/Geopilot.Frontend/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
{
"compilerOptions": {
/* Visit https://aka.ms/tsconfig to read more about this file */
"target": "ESNext" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
"lib": [
"dom",
"dom.iterable",
"esnext"
] /* Specify a set of bundled library declaration files that describe the target runtime environment. */,
"jsx": "react-jsx" /* Specify what JSX code is generated. */,
"module": "ESNext" /* Specify what module code is generated. */,
"moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */,
"types": [
"vite/client",
] /* Specify type package names to be included without being referenced in a source file. */,
"allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
"allowJs": true /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */,
"noEmit": true /* Disable emitting files from a compilation. */,
"isolatedModules": true /* Ensure that each file can be safely transpiled without relying on other imports. */,
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
"strict": true /* Enable all strict type-checking options. */,
"skipLibCheck": true /* Skip type checking all .d.ts files. */
"target": "ESNext",
"lib": ["dom", "dom.iterable", "esnext"],
"jsx": "react-jsx",
"module": "ESNext",
"moduleResolution": "node",
"types": ["vite/client"],
"allowImportingTsExtensions": true,
"allowJs": true,
"noEmit": true,
"isolatedModules": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true
},
"exclude": ["src/Geopilot.Frontend/cypress"]
}

0 comments on commit 71330aa

Please sign in to comment.