-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chore/179551806/convert to ts #11
base: master
Are you sure you want to change the base?
Changes from all commits
ad62097
5ccfc5a
0dbb879
bf31a32
0e85fab
14ce022
7ee7281
cd19364
df3b753
cf550bb
9230399
6724119
0ace726
4f7200f
13f5d2c
7557d31
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.coverage/ | ||
lib/ | ||
node_modules/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ['plugin:goodeggs/recommended', 'plugin:goodeggs/typescript'], | ||
env: { | ||
node: true, | ||
}, | ||
parserOptions: { | ||
project: './tsconfig.json', | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['**/{*.,}test{.*,}.{js,jsx,ts,tsx}'], | ||
extends: ['plugin:goodeggs/jest'], | ||
env: { | ||
mocha: true, | ||
}, | ||
}, | ||
// Project configuration files | ||
{ | ||
files: ['*.config{.babel,}.js', '.*rc.js'], | ||
env: { | ||
node: true, | ||
}, | ||
rules: { | ||
'import/no-commonjs': 'off', | ||
}, | ||
}, | ||
], | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
node_modules/ | ||
npm-debug.log | ||
.DS_Store | ||
*.log | ||
.coverage/ | ||
lib/ | ||
node_modules/ | ||
.node_history | ||
.*cache |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
.gitignore | ||
.travis.yml | ||
test/ | ||
lib/ | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
registry=https://registry.npmjs.org/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('@goodeggs/toolkit/config/prettier'); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
language: node_js | ||
node_js: | ||
- '8' | ||
- "14" |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -4,24 +4,49 @@ formatters for good eggs | |||||
|
||||||
[![Build Status](http://img.shields.io/travis/goodeggs/goodeggs-formatters.svg?style=flat-square)](https://travis-ci.org/goodeggs/goodeggs-formatters) | ||||||
|
||||||
|
||||||
## Usage | ||||||
|
||||||
``` | ||||||
npm install goodeggs-formatters | ||||||
yarn install goodeggs-formatters | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No such thing!
Suggested change
|
||||||
``` | ||||||
|
||||||
```coffeescript | ||||||
goodeggsFormatters = require 'goodeggs-formatters' | ||||||
``` | ||||||
|
||||||
|
||||||
## Contributing | ||||||
|
||||||
``` | ||||||
$ git clone https://github.com/goodeggs/goodeggs-formatters && cd goodeggs-formatters | ||||||
$ npm install | ||||||
$ npm test | ||||||
``` | ||||||
|
||||||
To compile the project: | ||||||
|
||||||
```sh | ||||||
yarn run build | ||||||
``` | ||||||
|
||||||
To run tests: | ||||||
|
||||||
```sh | ||||||
yarn run test | ||||||
``` | ||||||
|
||||||
To build: | ||||||
|
||||||
```sh | ||||||
yarn build | ||||||
``` | ||||||
|
||||||
## Releasing | ||||||
|
||||||
To release a new version of this module, use yarn to bump the version | ||||||
in `package.json` and create a git tag, then push. This will automatically | ||||||
get published to the NPM registry via CI. | ||||||
|
||||||
```sh | ||||||
yarn version --new-version=<major|minor|patch|premajor|preminor|prepatch> | ||||||
git push --follow-tags | ||||||
Comment on lines
+41
to
+49
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same issue as in goodeggs-validators here: this is false. Can you include the same language here as from that PR? |
||||||
``` | ||||||
|
||||||
_Module scaffold generated by [generator-goodeggs-npm](https://github.com/goodeggs/generator-goodeggs-npm)._ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = { | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
targets: { | ||
node: 'current', | ||
}, | ||
}, | ||
], | ||
'@babel/typescript', | ||
], | ||
}; |
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -7,6 +7,10 @@ | |||||||
"Michael Kebbekus <[email protected]>", | ||||||||
"Michelle Becker <[email protected]>" | ||||||||
], | ||||||||
"publishConfig": { | ||||||||
"registry": "https://registry.npmjs.org/", | ||||||||
"access": "public" | ||||||||
}, | ||||||||
Comment on lines
+10
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like this repo was also strangely public but published to our private registry. It's weird, but let's not change that now. Please undo this change! |
||||||||
"license": "Private", | ||||||||
"main": "lib/index.js", | ||||||||
"repository": { | ||||||||
|
@@ -21,31 +25,47 @@ | |||||||
"fraction.js": "^1.3.0", | ||||||||
"getto": "0.0.2", | ||||||||
"inflect": "^0.3.0", | ||||||||
"lodash": "^4.17.21", | ||||||||
"moment": "^2.29.1", | ||||||||
"moment-timezone": "^0.5.33", | ||||||||
"node-clock": "^0.1.1", | ||||||||
"underscore": "^1.7.0" | ||||||||
}, | ||||||||
"devDependencies": { | ||||||||
"babel-cli": "^6.26.0", | ||||||||
"babel-core": "^6.26.3", | ||||||||
"babel-preset-es2015": "^6.24.1", | ||||||||
"@babel/cli": "^7.15.7", | ||||||||
"@babel/core": "^7.15.8", | ||||||||
"@babel/node": "^7.15.8", | ||||||||
"@babel/plugin-transform-runtime": "^7.15.8", | ||||||||
"@babel/polyfill": "^7.12.1", | ||||||||
"@babel/preset-env": "^7.15.8", | ||||||||
"@babel/preset-typescript": "^7.15.0", | ||||||||
"@babel/register": "^7.15.3", | ||||||||
"@goodeggs/toolkit": "^4.0.4", | ||||||||
"@goodeggs/tsconfig": "^1.0.0", | ||||||||
"@types/accounting": "^0.4.2", | ||||||||
"@types/jest": "^27.0.2", | ||||||||
"@types/lodash": "^4.14.176", | ||||||||
"@types/node": "^16.10.2", | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're testing on node 14 so maybe use 14 here? |
||||||||
"@types/sinon": "^10.0.4", | ||||||||
"@types/underscore": "^1.11.3", | ||||||||
"babel-jest": "^27.2.4", | ||||||||
"chai": "^1.10.0", | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove? you switched to jest, so should be unused now |
||||||||
"jest": "^27.2.4", | ||||||||
"mocha": "~1.x.x", | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here, remove? |
||||||||
"sinon": "^1.12.2" | ||||||||
}, | ||||||||
"babel": { | ||||||||
"sourceMaps": "inline", | ||||||||
"presets": [ | ||||||||
"es2015" | ||||||||
] | ||||||||
"sinon": "^11.1.2", | ||||||||
"typescript": "^4.4.3" | ||||||||
}, | ||||||||
"scripts": { | ||||||||
"compile": "babel -d lib/ src/", | ||||||||
"prepublish": "npm run compile", | ||||||||
"pretest": "npm run compile", | ||||||||
"test": "mocha" | ||||||||
}, | ||||||||
"publishConfig": { | ||||||||
"registry": "https://npm.goodeggs.com/", | ||||||||
"always-auth": true | ||||||||
"build": "yarn run build:clean && yarn run build:es && yarn run build:types", | ||||||||
"build:clean": "rm -rf lib", | ||||||||
"build:es": "babel src --out-dir lib --copy-files --extensions=.ts,.js,.jsx,.tsx", | ||||||||
"build:types": "tsc --project tsconfig.declarations.json", | ||||||||
"lint": "yarn run lint:es", | ||||||||
"lint:es": "getk run lint-es", | ||||||||
"lint:fix": "yarn run lint:fix:es", | ||||||||
"lint:fix:es": "getk run fix-es", | ||||||||
"prepublishOnly": "yarn lint && yarn test && yarn run build", | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We only need to build the code before publishing. We don't usually run tests here.
Suggested change
|
||||||||
"test": "jest src/", | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't running linting or typechecking in CI.
Suggested change
|
||||||||
"typecheck": "tsc" | ||||||||
} | ||||||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we do this, we'll publish an unusable package that doesn't include the built code, which is the only useful thing to include!