-
Notifications
You must be signed in to change notification settings - Fork 79
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
Match pact js lint #425
Match pact js lint #425
Conversation
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.
🎉
"@typescript-eslint/ban-ts-comment": "off", | ||
"@typescript-eslint/dot-notation": [ | ||
"error", | ||
{ "allowPattern": "RouteGuide" } |
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.
What does this mean? I don't seem to be able to google this or find it on the eslint website?
@@ -1,4 +1,6 @@ | |||
#!/bin/bash -e | |||
set -e # Windows bash does not read the #! line above |
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.
Of course it doesn't, why would it?
This PR is like pact-foundation/pact-js#1027 , except for pact-js-core.
Unfortunately, it's not as well-separated as the previous one. Some key points:
expect(instance.options.foo).to.equal(options.foo)
is comparing the object with itself.tsconfig.spec.ts
. Unfortunately, this means that the mocha types need to be available to typescript during the main build - although the spec and test files aren't outputted.src/ffi/types.ts
, the recommended lint settings complain about my pattern of merging types and constants (the pattern exists to get around some enum unpleasantness). There's no nice way to whitelist this type of redeclaring, and the docs for the no-redeclare rule say this is intentional. Probably the right fix is to use an enum instead :(types.ts
to prevent circular dependencies. The pattern is -types.ts
and not in any other filestypes.ts
files. No internal code (except tests) imports from the root (otherwise you get circular dependencies).