Skip to content

Commit

Permalink
chore: Replace Flowtype with Typescript (#3)
Browse files Browse the repository at this point in the history
Setting up the repo to run with Typescript instead of Flowtype. This required changing the initial code, updating Jest & updating ESLint.

Also:
- Set up .travis.yml
- Move eslint configuration into its own `.eslintrc.json`
- Removing Babel as its replaced by Typescript (except `babel-eslint` which is needed by `eslint-config-eventbrite`)
  • Loading branch information
benmvp authored and BenAtEventbrite committed Feb 21, 2018
1 parent 045d95e commit 98d06d7
Show file tree
Hide file tree
Showing 16 changed files with 152 additions and 7,364 deletions.
17 changes: 0 additions & 17 deletions .babelrc

This file was deleted.

12 changes: 0 additions & 12 deletions .flowconfig

This file was deleted.

12 changes: 5 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
Expand All @@ -28,9 +25,6 @@ build/Release
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

Expand All @@ -50,4 +44,8 @@ typings/
.env

# Editor configurations
.vscode
.vscode/

# Target files
lib/
dist/
20 changes: 20 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Configuration files
tsconfig.json
config

# Source code
src

# Dependency directories
node_modules
yarn.lock

# Editor settings
.vscode

# Logs
logs
*.log

# Test files
**/*.spec.*
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: node_js
node_js:
- "node"
- "8"
- "6"

# Cache dependencies in $HOME/.yarn-cache across builds
cache: yarn

# Run the the validate script with code coverage
script: yarn run validate
12 changes: 12 additions & 0 deletions config/jest-preprocess-typescript.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const path = require("path");
const tsc = require("typescript");
const tsConfig = require("../tsconfig.json");

module.exports = {
process(src, fullPath) {
if (path.extname(fullPath) === ".ts") {
return tsc.transpile(src, tsConfig.compilerOptions, fullPath, []);
}
return src;
}
};
7 changes: 0 additions & 7 deletions flow-typed/npm/isomorphic-fetch_v2.x.x.js

This file was deleted.

Loading

0 comments on commit 98d06d7

Please sign in to comment.