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
With a new project:
Add ngx-clipboard npm i ngx-clipboard
import it in your app.module.ts import { ClipboardModule } from 'ngx-clipboard'; imports: [ BrowserModule, AppRoutingModule, ClipboardModule ],
run ng lint ng lint --type-check
The log given by the failure.
ERROR: /home/micah/Documents/scratch/one-four-two/node_modules/ngx-clipboard/src/clipboard.service.ts[94, 13]: Identifier 'yPosition' is never reassigned; use 'const' instead of 'let'.
ERROR: /home/micah/Documents/scratch/one-four-two/node_modules/ngx-clipboard/src/clipboard.service.ts[103, 2]: Unnecessary semicolon
ERROR: /home/micah/Documents/scratch/one-four-two/node_modules/ngx-clipboard/src/clipboard.directive.ts[16, 15]: The selector of the directive "ClipboardDirective" should have prefix "app" (https://angular.io/styleguide#style-02-08)
ERROR: /home/micah/Documents/scratch/one-four-two/node_modules/ngx-clipboard/src/clipboard.directive.ts[19, 5]: In the class "ClipboardDirective", the directive input property "targetElm" should not be renamed.Please, consider the following use "@input() targetElm: string"
Desired functionality.
All files pass linting.
It should not lint imported node modules.
Mention any other details that might be useful.
It looks like this is a regression caused by removing "exclude": "**/node_modules/**/*" from the lint block in the .angular-cli.json #5063
The text was updated successfully, but these errors were encountered:
micahwood
changed the title
ng lint tests files in node_modules if it is imported in your project
ng lint lints files in node_modules if it is imported in your project
Sep 20, 2017
Bug Report or Feature Request (mark with an
x
)Versions.
@angular/cli: 1.4.2
node: 6.10.0
os: linux x64
@angular/animations: 4.4.3
@angular/common: 4.4.3
@angular/compiler: 4.4.3
@angular/core: 4.4.3
@angular/forms: 4.4.3
@angular/http: 4.4.3
@angular/platform-browser: 4.4.3
@angular/platform-browser-dynamic: 4.4.3
@angular/router: 4.4.3
@angular/cli: 1.4.2
@angular/compiler-cli: 4.4.3
@angular/language-service: 4.4.3
typescript: 2.3.4
Repro steps.
With a new project:
Add ngx-clipboard
npm i ngx-clipboard
import it in your app.module.ts
import { ClipboardModule } from 'ngx-clipboard';
imports: [ BrowserModule, AppRoutingModule, ClipboardModule ],
run ng lint
ng lint --type-check
The log given by the failure.
ERROR: /home/micah/Documents/scratch/one-four-two/node_modules/ngx-clipboard/src/clipboard.service.ts[94, 13]: Identifier 'yPosition' is never reassigned; use 'const' instead of 'let'.
ERROR: /home/micah/Documents/scratch/one-four-two/node_modules/ngx-clipboard/src/clipboard.service.ts[103, 2]: Unnecessary semicolon
ERROR: /home/micah/Documents/scratch/one-four-two/node_modules/ngx-clipboard/src/clipboard.directive.ts[16, 15]: The selector of the directive "ClipboardDirective" should have prefix "app" (https://angular.io/styleguide#style-02-08)
ERROR: /home/micah/Documents/scratch/one-four-two/node_modules/ngx-clipboard/src/clipboard.directive.ts[19, 5]: In the class "ClipboardDirective", the directive input property "targetElm" should not be renamed.Please, consider the following use "@input() targetElm: string"
Desired functionality.
All files pass linting.
It should not lint imported node modules.
Mention any other details that might be useful.
It looks like this is a regression caused by removing
"exclude": "**/node_modules/**/*"
from the lint block in the .angular-cli.json#5063
The text was updated successfully, but these errors were encountered: