Skip to content

Commit

Permalink
feat: add TS type defs
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards1211 committed Feb 10, 2021
1 parent 8d42ff0 commit 9626626
Show file tree
Hide file tree
Showing 45 changed files with 7,482 additions and 8,904 deletions.
8 changes: 2 additions & 6 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
module.exports = function(api) {
module.exports = function (api) {
const plugins = [
'@babel/plugin-transform-flow-strip-types',
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-export-default-from',
'@babel/plugin-proposal-export-namespace-from',
'@babel/plugin-proposal-object-rest-spread',
]
const presets = [
[
'@babel/preset-env',
api.env('es5')
? { forceAllTransforms: true }
: { targets: { node: 'current' } },
: { targets: { node: '12' } },
],
'@babel/preset-flow',
]
Expand Down
26 changes: 11 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,33 @@ version: 2
jobs:
build:
docker:
- image: circleci/node:8
- image: circleci/node:14

steps:
- checkout
- restore_cache:
name: Restore Yarn Package Cache
keys:
- v1-yarn-packages-{{ checksum "yarn.lock" }}

- run:
name: Setup NPM Token
command: |
yarn config set registry "https://registry.npmjs.org/"
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
echo "registry=https://registry.npmjs.org/" >> .npmrc
yarn config set registry "https://registry.npmjs.org/"
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
echo "registry=https://registry.npmjs.org/" >> .npmrc
# https://github.com/atlassian/react-beautiful-dnd/issues/1007#issuecomment-446415426
- run:
name: Workaround for Flow crashing
command: echo "server.max_workers=1" >> .flowconfig

- run:
name: Install Dependencies
command: yarn install --frozen-lockfile
- save_cache:
name: Save Yarn Package Cache
key: v1-yarn-packages-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn

- run:
name: build
command: yarn run prepublishOnly
- run:
name: upload test coverage
command: yarn codecov || true
command: yarn codecov
- run:
name: release
command: yarn run semantic-release || true
command: yarn run semantic-release
12 changes: 5 additions & 7 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
"extends": [
"@jedwards1211/eslint-config",
"@jedwards1211/eslint-config-flow",
"eslint-config-prettier"
"prettier",
"prettier/babel",
"prettier/flowtype"
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"parser": "@babel/eslint-parser",
"env": {
"es6": true,
"es2017": true,
"node": true
}
}
3 changes: 0 additions & 3 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@
[libs]

[options]
module.system=node
esproposal.class_static_fields=enable
esproposal.class_instance_fields=enable
17 changes: 13 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
coverage
.nyc_output
/coverage
/.nyc_output
node_modules
lib
es
/lib
/es
.eslintcache
<<<<<<< HEAD
/*.js
/*.js.flow
/util
=======
*.js
*.js.flow
*.ts
!/src/**/*.js
!/src/**/*.ts
!/test/**/*.js
>>>>>>> 83ad9ee590a593dc104a8c91f9b421e9a3437be8
!/.babelrc.js
3 changes: 1 addition & 2 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
**
!**/*.js
!**/*.js.flow
!**/*.d.ts
!/*.md
!yarn.lock
/src
/test
/coverage
/flow-typed
__tests__
/.*
!/.flowconfig
117 changes: 20 additions & 97 deletions flow-typed/npm/@commitlint/cli_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 6b3e411701babc2e6f6520580da2616a
// flow-typed version: <<STUB>>/@commitlint/cli_v^5.2.5/flow_v0.61.0
// flow-typed signature: 9a34abf4a0002985fcc07915460f635b
// flow-typed version: <<STUB>>/@commitlint/cli_v^11.0.0/flow_v0.143.1

/**
* This is an autogenerated libdef stub for:
Expand All @@ -14,123 +14,46 @@
*/

declare module '@commitlint/cli' {
declare module.exports: any;
declare module.exports: any
}

/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module '@commitlint/cli/fixtures/empty/commitlint.config' {
declare module.exports: any;
declare module '@commitlint/cli/cli' {
declare module.exports: any
}

declare module '@commitlint/cli/fixtures/extends-root/extended' {
declare module.exports: any;
}

declare module '@commitlint/cli/fixtures/inner-scope/commitlint.config' {
declare module.exports: any;
}

declare module '@commitlint/cli/fixtures/inner-scope/inner-scope/commitlint.config' {
declare module.exports: any;
}

declare module '@commitlint/cli/fixtures/outer-scope/commitlint.config' {
declare module.exports: any;
}

declare module '@commitlint/cli/fixtures/parser-preset/commitlint.config' {
declare module.exports: any;
}

declare module '@commitlint/cli/fixtures/parser-preset/parser-preset' {
declare module.exports: any;
}

declare module '@commitlint/cli/fixtures/signoff/commitlint.config' {
declare module.exports: any;
}

declare module '@commitlint/cli/fixtures/simple/commitlint.config' {
declare module.exports: any;
declare module '@commitlint/cli/lib/cli-error' {
declare module.exports: any
}

declare module '@commitlint/cli/lib/cli' {
declare module.exports: any;
}

declare module '@commitlint/cli/lib/cli.test' {
declare module.exports: any;
}

declare module '@commitlint/cli/lib/help' {
declare module.exports: any;
declare module.exports: any
}

declare module '@commitlint/cli/src/cli' {
declare module.exports: any;
}

declare module '@commitlint/cli/src/cli.test' {
declare module.exports: any;
}

declare module '@commitlint/cli/src/help' {
declare module.exports: any;
declare module '@commitlint/cli/lib/types' {
declare module.exports: any
}

// Filename aliases
declare module '@commitlint/cli/fixtures/empty/commitlint.config.js' {
declare module.exports: $Exports<'@commitlint/cli/fixtures/empty/commitlint.config'>;
}
declare module '@commitlint/cli/fixtures/extends-root/extended.js' {
declare module.exports: $Exports<'@commitlint/cli/fixtures/extends-root/extended'>;
}
declare module '@commitlint/cli/fixtures/inner-scope/commitlint.config.js' {
declare module.exports: $Exports<'@commitlint/cli/fixtures/inner-scope/commitlint.config'>;
}
declare module '@commitlint/cli/fixtures/inner-scope/inner-scope/commitlint.config.js' {
declare module.exports: $Exports<'@commitlint/cli/fixtures/inner-scope/inner-scope/commitlint.config'>;
}
declare module '@commitlint/cli/fixtures/outer-scope/commitlint.config.js' {
declare module.exports: $Exports<'@commitlint/cli/fixtures/outer-scope/commitlint.config'>;
}
declare module '@commitlint/cli/fixtures/parser-preset/commitlint.config.js' {
declare module.exports: $Exports<'@commitlint/cli/fixtures/parser-preset/commitlint.config'>;
}
declare module '@commitlint/cli/fixtures/parser-preset/parser-preset.js' {
declare module.exports: $Exports<'@commitlint/cli/fixtures/parser-preset/parser-preset'>;
}
declare module '@commitlint/cli/fixtures/signoff/commitlint.config.js' {
declare module.exports: $Exports<'@commitlint/cli/fixtures/signoff/commitlint.config'>;
}
declare module '@commitlint/cli/fixtures/simple/commitlint.config.js' {
declare module.exports: $Exports<'@commitlint/cli/fixtures/simple/commitlint.config'>;
declare module '@commitlint/cli/cli.js' {
declare module.exports: $Exports<'@commitlint/cli/cli'>
}
declare module '@commitlint/cli/index' {
declare module.exports: $Exports<'@commitlint/cli'>;
declare module.exports: $Exports<'@commitlint/cli'>
}
declare module '@commitlint/cli/index.js' {
declare module.exports: $Exports<'@commitlint/cli'>;
}
declare module '@commitlint/cli/lib/cli.js' {
declare module.exports: $Exports<'@commitlint/cli/lib/cli'>;
}
declare module '@commitlint/cli/lib/cli.test.js' {
declare module.exports: $Exports<'@commitlint/cli/lib/cli.test'>;
declare module.exports: $Exports<'@commitlint/cli'>
}
declare module '@commitlint/cli/lib/help.js' {
declare module.exports: $Exports<'@commitlint/cli/lib/help'>;
declare module '@commitlint/cli/lib/cli-error.js' {
declare module.exports: $Exports<'@commitlint/cli/lib/cli-error'>
}
declare module '@commitlint/cli/src/cli.js' {
declare module.exports: $Exports<'@commitlint/cli/src/cli'>;
}
declare module '@commitlint/cli/src/cli.test.js' {
declare module.exports: $Exports<'@commitlint/cli/src/cli.test'>;
declare module '@commitlint/cli/lib/cli.js' {
declare module.exports: $Exports<'@commitlint/cli/lib/cli'>
}
declare module '@commitlint/cli/src/help.js' {
declare module.exports: $Exports<'@commitlint/cli/src/help'>;
declare module '@commitlint/cli/lib/types.js' {
declare module.exports: $Exports<'@commitlint/cli/lib/types'>
}
11 changes: 5 additions & 6 deletions flow-typed/npm/@commitlint/config-conventional_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 211481ade58a5d1b48d157e08d068cc3
// flow-typed version: <<STUB>>/@commitlint/config-conventional_v^5.2.3/flow_v0.61.0
// flow-typed signature: 2bf85954b2f8e045350ae8342f86cbc2
// flow-typed version: <<STUB>>/@commitlint/config-conventional_v^11.0.0/flow_v0.143.1

/**
* This is an autogenerated libdef stub for:
Expand All @@ -14,7 +14,7 @@
*/

declare module '@commitlint/config-conventional' {
declare module.exports: any;
declare module.exports: any
}

/**
Expand All @@ -23,11 +23,10 @@ declare module '@commitlint/config-conventional' {
* needed.
*/


// Filename aliases
declare module '@commitlint/config-conventional/index' {
declare module.exports: $Exports<'@commitlint/config-conventional'>;
declare module.exports: $Exports<'@commitlint/config-conventional'>
}
declare module '@commitlint/config-conventional/index.js' {
declare module.exports: $Exports<'@commitlint/config-conventional'>;
declare module.exports: $Exports<'@commitlint/config-conventional'>
}
11 changes: 5 additions & 6 deletions flow-typed/npm/@jedwards1211/eslint-config-flow_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 7be3f328e60a5bb311c142ba0bf1e16d
// flow-typed version: <<STUB>>/@jedwards1211/eslint-config-flow_v^1.0.0/flow_v0.61.0
// flow-typed signature: 96e95672a8479aaf556c03d9e58bc958
// flow-typed version: <<STUB>>/@jedwards1211/eslint-config-flow_v^3.0.0/flow_v0.143.1

/**
* This is an autogenerated libdef stub for:
Expand All @@ -14,7 +14,7 @@
*/

declare module '@jedwards1211/eslint-config-flow' {
declare module.exports: any;
declare module.exports: any
}

/**
Expand All @@ -23,11 +23,10 @@ declare module '@jedwards1211/eslint-config-flow' {
* needed.
*/


// Filename aliases
declare module '@jedwards1211/eslint-config-flow/index' {
declare module.exports: $Exports<'@jedwards1211/eslint-config-flow'>;
declare module.exports: $Exports<'@jedwards1211/eslint-config-flow'>
}
declare module '@jedwards1211/eslint-config-flow/index.js' {
declare module.exports: $Exports<'@jedwards1211/eslint-config-flow'>;
declare module.exports: $Exports<'@jedwards1211/eslint-config-flow'>
}
11 changes: 5 additions & 6 deletions flow-typed/npm/@jedwards1211/eslint-config_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 6be0a15102c7305fbc30e7744c9e0e60
// flow-typed version: <<STUB>>/@jedwards1211/eslint-config_v^1.0.0/flow_v0.61.0
// flow-typed signature: 0aa06c4e27f7ffc928e3deeaeb373387
// flow-typed version: <<STUB>>/@jedwards1211/eslint-config_v^2.0.2/flow_v0.143.1

/**
* This is an autogenerated libdef stub for:
Expand All @@ -14,7 +14,7 @@
*/

declare module '@jedwards1211/eslint-config' {
declare module.exports: any;
declare module.exports: any
}

/**
Expand All @@ -23,11 +23,10 @@ declare module '@jedwards1211/eslint-config' {
* needed.
*/


// Filename aliases
declare module '@jedwards1211/eslint-config/index' {
declare module.exports: $Exports<'@jedwards1211/eslint-config'>;
declare module.exports: $Exports<'@jedwards1211/eslint-config'>
}
declare module '@jedwards1211/eslint-config/index.js' {
declare module.exports: $Exports<'@jedwards1211/eslint-config'>;
declare module.exports: $Exports<'@jedwards1211/eslint-config'>
}
Loading

0 comments on commit 9626626

Please sign in to comment.