Skip to content

Commit

Permalink
Merge pull request #413 from bokuweb/typescript
Browse files Browse the repository at this point in the history
Typescript
  • Loading branch information
bokuweb authored Mar 12, 2019
2 parents a96eda9 + 0557017 commit e1a15d0
Show file tree
Hide file tree
Showing 89 changed files with 6,515 additions and 13,564 deletions.
54 changes: 0 additions & 54 deletions .babelrc

This file was deleted.

13 changes: 8 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

defaults: &defaults
working_directory: ~/react-resizable-box
working_directory: ~/re-resizable
docker:
- image: quramy/node-nightmare:latest@sha256:e527e87f8dc37634b953594ff3fe1302068e67129dcffca51ebfa786507c379a
- image: bokuweb/node-go-with-browser:latest
environment:
DISPLAY: ":99"

Expand All @@ -14,10 +14,13 @@ jobs:
- checkout
- run:
name: Install dependencies
command: yarn
command: yarn install --pure-lockfile
- run:
name: Lint
command: yarn run lint && yarn run flow
command: yarn run lint
- run:
name: Tsc
command: yarn run tsc
- run:
name: Test
command: |
Expand All @@ -30,7 +33,7 @@ jobs:
- checkout
- run:
name: Install dependencies
command: yarn
command: yarn install --pure-lockfile
- add-ssh-keys:
fingerprints:
- "45:1a:73:5c:53:97:cc:7d:ef:b0:75:48:93:9f:08:31"
Expand Down
52 changes: 0 additions & 52 deletions .eslintrc

This file was deleted.

13 changes: 0 additions & 13 deletions .flowconfig

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules/
example/dist/
lib/
npm-debug.log
.rpt2_cache
8 changes: 0 additions & 8 deletions .prettierrc

This file was deleted.

10 changes: 10 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
useTabs: false,
printWidth: 120,
tabWidth: 2,
singleQuote: true,
trailingComma: "all",
jsxBracketSameLine: false,
parser: "typescript",
semi: true
};
5 changes: 2 additions & 3 deletions .storybook/addons.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */
// import "@storybook/addon-options/register";
// import "@storybook/addon-actions/register";

import '@storybook/addon-actions/register';
import '@storybook/addon-links/register';
6 changes: 3 additions & 3 deletions .storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */

import { configure } from '@storybook/react';

const req = require.context('../stories', true, /.stories.(ts|tsx)$/);

function loadStories() {
require('../stories');
req.keys().forEach(filename => req(filename));
}

configure(loadStories, module);
11 changes: 11 additions & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<style>
html,
body {
min-height: 100%;
height: 100%;
}
.main,
#root {
min-height: 100%;
}
</style>
12 changes: 12 additions & 0 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const path = require("path");

module.exports = (baseConfig, env, defaultConfig) => {
defaultConfig.module.rules.push({
test: /.*\.(ts|tsx|js|jsx)$/,
loader: require.resolve("babel-loader")
});

defaultConfig.resolve.extensions.push(".ts", ".tsx");

return defaultConfig;
};
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ before_install:
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &

install:
- yarn install
- yarn install --pure-lockfile

script:
- yarn run flow
- yarn run tsc
- yarn run lint
- yarn run test
4 changes: 4 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
presets: ['@babel/preset-typescript', '@babel/preset-react'],
plugins: ['@babel/plugin-transform-modules-commonjs', '@babel/plugin-proposal-class-properties'],
};
Loading

0 comments on commit e1a15d0

Please sign in to comment.