You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
$ npm run unquoted
> tslint-windows-path-inconsistency@1.0.0 unquoted D:\github\tslint-windows-path-inconsistency
> tslint src/**/*.ts
src/FirstLevel.ts[1, 12]: " should be 'src/second/SecondLevel.ts[1, 12]: " should be 'src/second/third/ThirdLevel.ts[1, 12]: " should be '
npm ERR! Windows_NT 10.0.14393
...
[box@box tslint-windows-path-inconsistency]$ npm run quoted
> tslint-windows-path-inconsistency@1.0.0 quoted /box/github/tslint-windows-path-inconsistency
> tslint 'src/**/*.ts'
src/FirstLevel.ts[1, 12]: " should be 'src/second/SecondLevel.ts[1, 12]: " should be 'src/second/third/ThirdLevel.ts[1, 12]: " should be '
npm ERR! Linux 3.10.0-229.el7.x86_64
...
The text was updated successfully, but these errors were encountered:
acdcjunior
changed the title
using tslint as npm script has inconsistent path behavior for windows and linux
using tslint cli as npm script has inconsistent path behavior for windows and linux
Oct 18, 2016
@acdcjunior you can use double quotes " (escaped) as workaround to ensure consistency between platforms.
"scripts": {
"lint": "tslint \"src/**/*.ts\""
},
I have idea how to fix it, but need more time to ensure that fix for running TSLint from npm scripts won't break anything when it is used directly from terminal.
When running in centos unquoted, perhaps you don't have the globstar option enabled in your shell and thus the glob isn't matching the files you expect. @IllusionMH's recommendation is good, use double-quotes so that node-glob processes the glob.
I actually don't think this is a bug, it's just how shells work, so I'm going to close this. If you have an idea to change stuff for the better @IllusionMH, happy to reopen / accept that change.
Bug Report
~3.15.1
~2.0.3
TypeScript code being linted: (irrelevant)
with
tslint.json
configuration: (irrelevant)package.json
configuration:Actual behavior
Unconsistend behavior when running @ windows or linux (and not working at all on windows).
Expected behavior
Consistent behavior across platforms.
Workaround
Use both, I guess:
How to reproduce:
Check readme and files: https://github.com/acdcjunior/tslint-windows-path-inconsistency
(pasting README here for reference:)
Unquoted path (
npm run unquoted
)@windows 10
@CentOS 7
Quoted path (
npm run quoted
)@windows 10
@CentOS 7
The text was updated successfully, but these errors were encountered: