question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Doesn't work in angular/cli 7 project

See original GitHub issue

Description

Linting does not work in an angular/cli 7 project

Steps to reproduce

Create a project with the angular cli 7. This is my config in project.json

  "lint-staged": {
    "linters": {
      "*.ts": "ng lint PROJECTNAME --files"
    },
    "relative": true
  },
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },

Debug Logs

× ng lint PROJECTNAME --files found some errors. Please fix them and try committing again.
Linting "PROJECTNAME "...

Unknown option: 'src\app\myservice\my.service.ts'
``

### Environment

- **OS:** Windows 10
- **Node.js:** v10.13.0
- **`lint-staged`:** v8.1.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:35 (5 by maintainers)

github_iconTop GitHub Comments

7reactions
saiprasad2595commented, May 20, 2019

Hi @whiteblackkeys I realized late sorry for that. I changed to this and its working.

"lint-staged": { "linters": { "*.ts": [ "tslint --fix", "git add" ], "ignore": [ "**/dist/*.min.js" ] }, "relative": true },

5reactions
manueledonescommented, Dec 4, 2018

@okonet I think this issue should be reopened 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues when creating new angular 7 project - node.js
Just create new project as: ng new testapp Then remove your angular cli and clear cache and please again npm install -g @angular/cli....
Read more >
Setting up the local environment and workspace - Angular
This guide explains how to set up your environment for Angular development using the Angular CLI tool. It includes information about prerequisites, ...
Read more >
Identify and Fix Build and Deployment Errors in Your Angular ...
Project Not Found · Ensure that you have installed the Angular CLI globally on your machine via npm install -g @angular/cli · Ensure...
Read more >
Angular CLI update issues: Manually Update your ... - Medium
This is where the first issue rears its head — While the NPM environment shows the latest version (7.x.x), generating a new project...
Read more >
Angular CLI | Angular Project Setup - GeeksforGeeks
Step-1: Install angular cli npm install - g @angular/cli · Step-2: Create new project by this command. Choose yes for routing option and,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found