Skip to content
This repository was archived by the owner on Jun 5, 2019. It is now read-only.

🔨 Adds stricter type checking and linting. #104

Merged
merged 1 commit into from
Dec 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
"ts-loader": "^3.2.0",
"ts-node": "^3.3.0",
"tslint": "^5.8.0",
"tslint-config-prettier": "^1.6.0",
"typescript": "~2.6.2"
},
"jest": {
Expand Down
1 change: 1 addition & 0 deletions src/main/main-window/main-window.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { createMainWindow } from './main-window'
// @ts-ignore
import * as containDeep from 'jest-expect-contain-deep'
import { BrowserWindow } from 'electron'
const WindowStateManager = require('electron-window-state-manager')
Expand Down
21 changes: 12 additions & 9 deletions src/renderer/platform/components/tab/tab.story.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
import * as React from 'react'
import { StorybookStory as Story, StorybookGroup as Group } from '../storybook'

import { storiesOf } from '@storybook/react'
import { Tab } from './index'
// @ts-ignore
import { Value } from 'react-powerplug'

storiesOf('Tab', module).add('Tab', () => (
<Story>
<Group title='inactive'>
<Value initial='three'>
{({ value, setValue }) => (
<div style={{ flexDirection: 'row', display: 'flex' }}>
<Tab text='One' active={value === 'one'} onClick={() => setValue('one')} />
<Tab text='Two' active={value === 'two'} onClick={() => setValue('two')} />
<Tab text='Three' active={value === 'three'} onClick={() => setValue('three')} />
<Tab text='Four' active={value === 'four'} onClick={() => setValue('four')} />
</div>
)}
{(arg: any) => {
const { value, setValue } = arg
return (
<div style={{ flexDirection: 'row', display: 'flex' }}>
<Tab text='One' active={value === 'one'} onClick={() => setValue('one')} />
<Tab text='Two' active={value === 'two'} onClick={() => setValue('two')} />
<Tab text='Three' active={value === 'three'} onClick={() => setValue('three')} />
<Tab text='Four' active={value === 'four'} onClick={() => setValue('four')} />
</div>
)
}}
</Value>
</Group>
</Story>
Expand Down
12 changes: 5 additions & 7 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
"jsx": "react",
"experimentalDecorators": true,
"allowSyntheticDefaultImports": false,
"strict": false,
"noUnusedLocals": true,
"inlineSourceMap": true
"inlineSourceMap": true,
"strictNullChecks": true,
"noImplicitReturns": true,
"noImplicitAny": true
},
"include": [
"src",
"typings",
"fuse.ts"
]
"include": ["src", "typings", "fuse.ts"]
}
1 change: 1 addition & 0 deletions tslint.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"extends": "tslint-config-prettier",
"rules": {
"ordered-imports": [false],
"quotemark": [true, "single", "jsx-single", "avoid-escape"],
Expand Down
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7338,6 +7338,10 @@ tslib@^1.7.1:
version "1.8.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.8.1.tgz#6946af2d1d651a7b1863b531d6e5afa41aa44eac"

tslint-config-prettier@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.6.0.tgz#fec1ee8fb07e8f033c63fed6b135af997f31962a"

tslint@^5.8.0:
version "5.8.0"
resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.8.0.tgz#1f49ad5b2e77c76c3af4ddcae552ae4e3612eb13"
Expand Down