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
{ | |
"scripts": { | |
"start": "react-scripts start", | |
"build": "react-scripts build", | |
"test:unit": "react-scripts test", | |
"test:lint": "eslint --ext .ts --ext .tsx .", | |
"test:lint:fix": "npm run lint -- --fix", | |
"test": "npm run test:lint && npm run test:unit" | |
} | |
} |
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
{ | |
"editor.formatOnSave": true, | |
"eslint.autoFixOnSave": true, | |
"eslint.validate": [ | |
"javascript", | |
"javascriptreact", | |
{ "language": "typescript", "autoFix": true }, | |
{ "language": "typescriptreact", "autoFix": true } | |
], | |
"editor.renderWhitespace": "boundary" |
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
module.exports = { | |
semi: true, | |
trailingComma: 'all', | |
singleQuote: true, | |
printWidth: 120, | |
tabWidth: 2, | |
}; |
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
module.exports = { | |
parser: '@typescript-eslint/parser', | |
extends: [ | |
'plugin:react/recommended', | |
'plugin:@typescript-eslint/recommended', | |
'prettier/@typescript-eslint', | |
'plugin:prettier/recommended', | |
], | |
parserOptions: { | |
ecmaVersion: 2018, |
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
src/serviceWorker.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
import { compose } from 'ramda'; | |
export type Omit<T, K> = Pick<T, Exclude<keyof T, K>>; | |
type ABCProps = { | |
a: string; | |
b: string; | |
c: string; | |
}; |
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
type Omit<T, K> = Pick<T, Exclude<keyof T, K>>; | |
type Theme = { | |
fontColor: string; | |
}; | |
const theme = { | |
fontColor: 'red', | |
}; |
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
type Omit<T, K> = Pick<T, Exclude<keyof T, K>>; | |
type Theme = { | |
fontColor: string; | |
}; | |
type WithThemeProps = { | |
theme: Theme; | |
}; |
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
type Omit<T, K> = Pick<T, Exclude<keyof T, K>>; | |
type ExampleProps = { | |
items: string[]; | |
providedByHOC: string; | |
alsoProvidedByHOC: number; | |
}; | |
type ExamplePropsWithoutHOCProps = Omit<ExampleProps, 'providedByHOC' | 'alsoProvidedByHOC'>; | |
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
type Omit<T, K> = Pick<T, Exclude<keyof T, K>>; | |
type Theme = { | |
fontColor: string; | |
}; | |
type WithThemeProps = { | |
theme: Theme; | |
}; | |