Skip to content
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

fix example config #2

Open
dpinol opened this issue Nov 5, 2019 · 2 comments
Open

fix example config #2

dpinol opened this issue Nov 5, 2019 · 2 comments

Comments

@dpinol
Copy link

dpinol commented Nov 5, 2019

Instead of 'sha'

-   repo: git://github.com/awebdeveloper/pre-commit-tslint/
        sha: ''  # Use the sha or tag you want to point at

it should be 'rev'

-   repo: git://github.com/awebdeveloper/pre-commit-tslint/
        rev: ''  # Use the sha or tag you want to point at

In my case, I also had to add typescript to additional_dependencies
additional_dependencies: ['[email protected]', 'typescript]

Otherwise, I got:

tslint...................................................................Failed
hookid: tslint

internal/modules/cjs/loader.js:803
    throw err;
    ^

Error: Cannot find module 'typescript'
Require stack:
- /Users/dani/.cache/pre-commit/repo17lc0toy/node_env-default/lib/node_modules/tslint/lib/linter.js
- /Users/dani/.cache/pre-commit/repo17lc0toy/node_env-default/lib/node_modules/tslint/lib/tslintCli.js
- /Users/dani/.cache/pre-commit/repo17lc0toy/node_env-default/lib/node_modules/tslint/bin/tslint
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:800:15)
    at Function.Module._load (internal/modules/cjs/loader.js:693:27)
    at Module.require (internal/modules/cjs/loader.js:864:19)
@thomaskisler
Copy link

I also had the problem of the missing additional dependency.

@awebdeveloper
Copy link
Owner

@thomaskisler what missing dependency issue you had

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants