Skip to content

Commit 7f79b3d

Browse files
authored
upgrade infra (#91)
* initial upgrade commit * initial working migration * migrarte from travis to azure pipelines * refactor renovate config * rermove @babel/helper-plugin-utils * add flow to tests * add flow to tests * misc fixes * support node >= 10 * eslint rules cleanup
1 parent 5be5f16 commit 7f79b3d

File tree

71 files changed

+7591
-6087
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+7591
-6087
lines changed

.babelrc

Lines changed: 0 additions & 14 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 14 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,20 @@ babel-plugin-fail-explicit
1010

1111
![demo](https://raw.githubusercontent.com/amilajack/babel-plugin-fail-explicit-demo/7ed9a29ec61d505f2b3ce6be18145c74eb3bc5f5/demo.gif)
1212

13-
**⚠️ Experimental ⚠️**
14-
1513
## Roadmap
1614
- [x] Fail on unsafe coercion
1715
- [x] Fail on unsafe property access
1816
- [x] Do not fail inside conditional expressions or default statements (`||`), on by default
1917
- [ ] Allow unsafe access in if statement by default
2018
- [ ] Allow for configuration of strictness
2119

22-
**⚠️ This doesn't work as expected with `"transform-es2015-modules-umd"` and **hot-reloading** at the moment ⚠️**
23-
2420
## Installation
2521
```bash
2622
npm install --save-dev babel-plugin-fail-explicit
2723
```
2824

2925
## Setup
30-
```js
26+
```json
3127
// .babelrc
3228
{
3329
"plugins": [
@@ -73,14 +69,12 @@ null > undefined
7369
// ------------------------------------------------
7470
const obj = {
7571
foo: {
76-
bar: {
77-
baz: false
78-
}
72+
bar: {}
7973
}
8074
}
8175

82-
obj.foo.bar._MOO_.baz;
83-
// TypeError: Property "_MOO_" does not exist in "Object.foo._MOO_"
76+
obj.foo.bar.baz;
77+
// TypeError: Property "baz" does not exist in "Object.foo.bar"
8478

8579

8680
// ------------------------------------------------

azure-pipelines.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
variables:
2+
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
3+
4+
strategy:
5+
matrix:
6+
node_current_10:
7+
nodeVersion: '10.x'
8+
node_current_13:
9+
nodeVersion: '13.x'
10+
11+
steps:
12+
- task: NodeTool@0
13+
inputs:
14+
versionSpec: $(nodeVersion)
15+
- task: Cache@2
16+
inputs:
17+
key: 'yarn | "$(Agent.OS)" | yarn.lock'
18+
restoreKeys: |
19+
yarn | "$(Agent.OS)"
20+
yarn
21+
path: $(YARN_CACHE_FOLDER)
22+
displayName: Cache Yarn packages
23+
- script: yarn --frozen-lockfile && yarn test
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
// flow-typed signature: fcde28fcfc1a149fbba7109df103dd59
2+
// flow-typed version: <<STUB>>/@babel/cli_v^7.0.0/flow_v0.121.0
3+
4+
/**
5+
* This is an autogenerated libdef stub for:
6+
*
7+
* '@babel/cli'
8+
*
9+
* Fill this stub out by replacing all the `any` types.
10+
*
11+
* Once filled out, we encourage you to share your work with the
12+
* community by sending a pull request to:
13+
* https://github.com/flowtype/flow-typed
14+
*/
15+
16+
declare module '@babel/cli' {
17+
declare module.exports: any;
18+
}
19+
20+
/**
21+
* We include stubs for each file inside this npm package in case you need to
22+
* require those files directly. Feel free to delete any files that aren't
23+
* needed.
24+
*/
25+
declare module '@babel/cli/bin/babel-external-helpers' {
26+
declare module.exports: any;
27+
}
28+
29+
declare module '@babel/cli/bin/babel' {
30+
declare module.exports: any;
31+
}
32+
33+
declare module '@babel/cli/lib/babel-external-helpers' {
34+
declare module.exports: any;
35+
}
36+
37+
declare module '@babel/cli/lib/babel/dir' {
38+
declare module.exports: any;
39+
}
40+
41+
declare module '@babel/cli/lib/babel/file' {
42+
declare module.exports: any;
43+
}
44+
45+
declare module '@babel/cli/lib/babel' {
46+
declare module.exports: any;
47+
}
48+
49+
declare module '@babel/cli/lib/babel/options' {
50+
declare module.exports: any;
51+
}
52+
53+
declare module '@babel/cli/lib/babel/util' {
54+
declare module.exports: any;
55+
}
56+
57+
// Filename aliases
58+
declare module '@babel/cli/bin/babel-external-helpers.js' {
59+
declare module.exports: $Exports<'@babel/cli/bin/babel-external-helpers'>;
60+
}
61+
declare module '@babel/cli/bin/babel.js' {
62+
declare module.exports: $Exports<'@babel/cli/bin/babel'>;
63+
}
64+
declare module '@babel/cli/index' {
65+
declare module.exports: $Exports<'@babel/cli'>;
66+
}
67+
declare module '@babel/cli/index.js' {
68+
declare module.exports: $Exports<'@babel/cli'>;
69+
}
70+
declare module '@babel/cli/lib/babel-external-helpers.js' {
71+
declare module.exports: $Exports<'@babel/cli/lib/babel-external-helpers'>;
72+
}
73+
declare module '@babel/cli/lib/babel/dir.js' {
74+
declare module.exports: $Exports<'@babel/cli/lib/babel/dir'>;
75+
}
76+
declare module '@babel/cli/lib/babel/file.js' {
77+
declare module.exports: $Exports<'@babel/cli/lib/babel/file'>;
78+
}
79+
declare module '@babel/cli/lib/babel/index' {
80+
declare module.exports: $Exports<'@babel/cli/lib/babel'>;
81+
}
82+
declare module '@babel/cli/lib/babel/index.js' {
83+
declare module.exports: $Exports<'@babel/cli/lib/babel'>;
84+
}
85+
declare module '@babel/cli/lib/babel/options.js' {
86+
declare module.exports: $Exports<'@babel/cli/lib/babel/options'>;
87+
}
88+
declare module '@babel/cli/lib/babel/util.js' {
89+
declare module.exports: $Exports<'@babel/cli/lib/babel/util'>;
90+
}

0 commit comments

Comments
 (0)