-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #6963
- Loading branch information
Anand Thakker
committed
Aug 3, 2018
1 parent
a7331de
commit 29ab46b
Showing
8 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// @flow | ||
/* eslint-disable */ | ||
export * from '../src/index.js'; |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[ignore] | ||
.*/node_modules/@mapbox/jsonlint-lines-primitives/.* | ||
.*/node_modules/stylelint/.* | ||
.*/node_modules/unflowify/.* | ||
.*/node_modules/flow-coverage-report/.* | ||
.*/node_modules/babel-plugin-transform-react-remove-prop-types/.* | ||
.*/node_modules/conventional-changelog-core/.* | ||
.*/node_modules/htmltojsx/.* | ||
.*/node_modules/documentation/.* | ||
.*/node_modules/module-deps/.* | ||
.*/node_modules/@mapbox/geojson-types/fixtures/.* | ||
.*/test/unit/style-spec/fixture/invalidjson.input.json | ||
.*/test/integration/render-tests/.* | ||
|
||
[include] | ||
../../.. | ||
|
||
[libs] | ||
../../../flow-typed | ||
|
||
[lints] | ||
|
||
[options] | ||
|
||
[strict] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// @flow | ||
/* eslint-disable */ | ||
import mapboxgl from '../../..'; | ||
const Map = mapboxgl.Map; | ||
const map = new Map({}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// @flow | ||
/* eslint-disable */ | ||
import mapboxgl from '../../..'; | ||
const Map = mapboxgl.Map; | ||
const map = new Map({ | ||
container: document.getElementById('map') | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { test } from 'mapbox-gl-js-test'; | ||
import cp from 'child_process'; | ||
|
||
test('downstream projects can consume published flow types', (t) => { | ||
cp.exec(`${__dirname}/../../node_modules/.bin/flow check --strip-root --json ${__dirname}/downstream-flow-fixture`, {}, (error, stdout) => { | ||
const result = JSON.parse(stdout); | ||
t.equal(result.errors.length, 1); | ||
for (const error of result.errors) { | ||
for (const message of error.message) { | ||
t.notEqual(message.path, 'valid.js'); | ||
} | ||
} | ||
t.end(); | ||
}); | ||
}); |