Skip to content

Commit

Permalink
fix: tests wip
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinDepuydt committed May 15, 2019
1 parent ad6af60 commit 1456d9e
Show file tree
Hide file tree
Showing 89 changed files with 412 additions and 23,097 deletions.
21 changes: 10 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,18 @@ jobs:
steps:
- checkout
# Download and cache dependencies
# - restore_cache:
# keys:
# - v1-dependencies-{{ checksum "package.json" }}
# - v1-dependencies-
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run: npm install
- run: npm run bootstrap
# - save_cache:
# paths:
# - node_modules
# keys:
# - v1-dependencies-{{ checksum "package.json" }}
# - v1-dependencies-
- save_cache:
paths:
- node_modules
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run: npm run style
- run: npm run type-check
- run: npm test
- run: bash <(curl -s https://codecov.io/bash)
17 changes: 0 additions & 17 deletions .flowconfig

This file was deleted.

17 changes: 2 additions & 15 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,23 +211,10 @@ If the new version number is incorrect (for example, a breaking change tag was a
* Test and compile as `npm publish` would do
* Use `lerna publish`.

## Type checking

We use Facebook Flow as our type-checking solution. We prefer Flow over TypeScript because Flow works with lightweight changes to the code. Integration with Babel is also better for Flow.

To avoid duplications, JSdoc comments should not contain type annotations.

### Caveats

* Flow has still a lot of open issues with exact types. They should be used only when necessary.
* The spread operator is not handled very well.

### Integration with VSCode

First, disable the buildtin JavaScript validation. In the workspace settings: `"javascript.validate.enable": false`. Indeed, Flow annotations are not valid JavaScript.
First, disable the buildtin JavaScript validation. In the workspace settings: `"javascript.validate.enable": false`.

This combination of plugins work together:

* dbaeumer.vscode-eslint: ESLint integration in VSCode. Not specific to Flow.
* joshpeng.sublime-babel-vscode: Syntax highlighter that handles Flow annotations. The default syntax highlighter breaks on some cases (Flow annotation inside a string template for example).
* flowtype.flow-for-vscode: Flow integration to VSCode.
* dbaeumer.vscode-eslint: ESLint integration in VSCode.
11 changes: 11 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
babelrcRoots: [".", "./packages/*"],
presets: [
"@babel/preset-env"
],
plugins: [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-syntax-dynamic-import"
],
sourceType: "unambiguous"
};
108 changes: 0 additions & 108 deletions flow-typed/npm/babel-cli_vx.x.x.js

This file was deleted.

Loading

0 comments on commit 1456d9e

Please sign in to comment.