ng-socket-io icon indicating copy to clipboard operation
ng-socket-io copied to clipboard

tslint warn about *.ts files

Open waitingsong opened this issue 6 years ago • 1 comments

npm run lint got:

[17:40:08] tslint: .../node_modules/ng-socket-io/socket-io.service.ts, line: 57 Expected indentation of 18 spaces but found 20. L56: if (this.subscribersCounter === 1) { L57: this.ioSocket.removeListener(eventName);

my tslint.json:

{
  .....,
  "rulesDirectory": [
    "node_modules/tslint-eslint-rules/dist/rules"
  ]
}

There's no warning if i remove "rulesDirectory", or remove all ts file (not include d.ts) under node_modules/ng-socket-io , such as index.d.ts, socket-io.service.d.ts.

I prefer to put project into src folder and build output to dist folder. and set .npmignore:

src/
node_modules/
node_modules*/
npm-shrinkwrap.json
tsconfig.json
tslint.json
.eslintignore
.eslintrc.json
.travis.yml
appveyor.yml
*.swp
*.bak
demo/
test/
coverage/
.nyc_output/ 

so there's no ts files in the npm package

waitingsong avatar Dec 27 '17 09:12 waitingsong

this is fixed in #45 you usually shouldn't be linting anything in the node_modules directory. You can fix this temporarily with a simple rm -f node_modules/ng-socket-io/tslint.json which deletes that file.

PhilThurston avatar Jan 16 '18 10:01 PhilThurston