-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* TASK Add typescript dependencies to package.json * TASK Add typescript to build process and npm scripts and TASK Move example components to typescript and add an example definition file. * TASK Move back to ts-loader instead of babel typescript preset * FIX Remove unnecessary changes * FIX Explicitly mention tsconfig file in webpack.config.js to avoid `error while parsing tsconfig.json, The 'files' list in config file 'tsconfig.json' is empty` See (TypeStrong/ts-loader#405 (comment)) * FIX Move tsconfig to client subdirectory to make it accessible in docker container (only webpack.config.js is copied over from root folder in Dockerfile) * TASK Move from ts-loader to babel to reduce compatibility issues between ES6/7 and typescript compilation. * TASK Add types for classnames, hoist-non-react-statics and lodash. Fix default export of DashboardList and run prettier on eslintrc * Run npm install * Trigger tests * Run npm install 2 * Trigger tests
- Loading branch information
1 parent
41a6913
commit 48924de
Showing
9 changed files
with
2,911 additions
and
510 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 |
---|---|---|
@@ -1,17 +1,40 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ["react-app", "plugin:compat/recommended", "prettier"], | ||
plugins: ["jest", "compat", "no-only-tests"], | ||
parser: "@typescript-eslint/parser", | ||
extends: [ | ||
"react-app", | ||
"plugin:compat/recommended", | ||
"prettier", | ||
// Remove any typescript-eslint rules that would conflict with prettier | ||
"prettier/@typescript-eslint", | ||
], | ||
plugins: ["jest", "compat", "no-only-tests", "@typescript-eslint"], | ||
settings: { | ||
"import/resolver": "webpack" | ||
"import/resolver": "webpack", | ||
}, | ||
env: { | ||
browser: true, | ||
node: true | ||
node: true, | ||
}, | ||
rules: { | ||
// allow debugger during development | ||
"no-debugger": process.env.NODE_ENV === "production" ? 2 : 0, | ||
"jsx-a11y/anchor-is-valid": "off", | ||
} | ||
}, | ||
overrides: [ | ||
{ | ||
// Only run typescript-eslint on TS files | ||
files: ["*.ts", "*.tsx", ".*.ts", ".*.tsx"], | ||
extends: ["plugin:@typescript-eslint/recommended"], | ||
rules: { | ||
// Do not require functions (especially react components) to have explicit returns | ||
"@typescript-eslint/explicit-function-return-type": "off", | ||
// Do not require to type every import from a JS file to speed up development | ||
"@typescript-eslint/no-explicit-any": "off", | ||
// Do not complain about useless contructors in declaration files | ||
"no-useless-constructor": "off", | ||
"@typescript-eslint/no-useless-constructor": "error", | ||
}, | ||
}, | ||
], | ||
}; |
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,18 @@ | ||
import React from "react"; | ||
|
||
export interface EmptyStateProps { | ||
header?: string; | ||
icon?: string; | ||
description: string; | ||
illustration: string; | ||
helpLink: string; | ||
|
||
onboardingMode?: boolean; | ||
showAlertStep?: boolean; | ||
showDashboardStep?: boolean; | ||
showInviteStep?: boolean; | ||
} | ||
|
||
declare const EmptyState: React.FunctionComponent<EmptyStateProps>; | ||
|
||
export default EmptyState; |
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,35 @@ | ||
{ | ||
"compilerOptions": { | ||
// Target latest version of ECMAScript. | ||
"target": "esnext", | ||
// Search under node_modules for non-relative imports. | ||
"moduleResolution": "node", | ||
// Process & infer types from .js files. | ||
"allowJs": true, | ||
// Don't emit; allow Babel to transform files. | ||
"noEmit": true, | ||
// Enable strictest settings like strictNullChecks & noImplicitAny. | ||
"strict": true, | ||
// Import non-ES modules as default imports. | ||
"esModuleInterop": true, | ||
"jsx": "react", | ||
"allowSyntheticDefaultImports": true, | ||
"noUnusedLocals": true, | ||
"lib": [ | ||
"dom", | ||
"dom.iterable", | ||
"esnext" | ||
], | ||
"forceConsistentCasingInFileNames": true, | ||
"baseUrl": "./", | ||
"paths": { | ||
"@/*": ["./app/*"] | ||
} | ||
}, | ||
"include": [ | ||
"app/**/*" | ||
], | ||
"exclude": [ | ||
"dist" | ||
] | ||
} |
Oops, something went wrong.