Skip to content

Lint script in package.json is ignored #3317

Closed
@rodrijuarez

Description

@rodrijuarez

OS?

OSX Sierra

Versions.

Could not start watchman; falling back to NodeWatcher for file system events.
Visit http://ember-cli.com/user-guide/#watchman for more info.
angular-cli: 1.0.0-beta.16
node: 6.8.1
os: darwin x64

Repro steps.

I've tried to change the way tslint runs when we run the command ng test in the scripts section of the file package.json but it seems to be ignored no matter what I change. At least that's what I understood here

Mention any other details that might be useful.

When I run npm run lint or ng lint (the same goes when I run tslint) it works as expected using the overriden config of the package.json, but when I run ng test, maybe it takes another configuration
This is the scripts section in the package.json:

  "scripts": {
    "start": "ng serve",
    "lint": "tslint \"src/**/*.ts\" -e \"src/**/assets/**\"",
    "tslint": "tslint \"src/**/*.ts\" -e \"src/**/assets/**\"",
    "test": "ng test",
    "pree2e": "webdriver-manager update",
    "e2e": "protractor"
  }

This is the angular-cli.json:

{
  "project": {
    "version": "1.0.0-beta.16",
    "name": "node-ui"
  },
  "apps": [
    {
      "root": "src",
      "outDir": "dist",
      "assets": "assets",
      "index": "index.html",
      "main": "main.ts",
      "test": "test.ts",
      "tsconfig": "tsconfig.json",
      "prefix": "app",
      "mobile": false,
      "styles": [
        "styles.scss"
      ],
      "scripts": [],
      "environments": {
        "source": "environments/environment.ts",
        "dev": "environments/environment.ts",
        "prod": "environments/environment.prod.ts"
      }
    }
  ],
  "addons": [],
  "packages": [],
  "e2e": {
    "protractor": {
      "config": "./protractor.conf.js"
    }
  },
  "test": {
    "karma": {
      "config": "./karma.conf.js"
    }
  },
  "defaults": {
    "styleExt": "scss",
    "prefixInterfaces": false
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgenttype: bug/fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions