angular / angular-cli

CLI tool for Angular
https://cli.angular.dev
MIT License
26.78k stars 11.98k forks source link

ng lint --fix rewrite code and rename variable' names while lint the html template #15648

Closed IgorKurkov closed 5 years ago

IgorKurkov commented 5 years ago

🐞 Bug report

Command (mark with an x)

- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [x] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

Yes, the previous version in which this bug was not present was: .... ### Description A clear and concise description of the problem... `ng lint --fix` affected to code and change it with buggy behavior - rename variables and set unused curly braces which affected the template. Screenshot_1 Screenshot_2 Screenshot_3 current packages: ``` "dependencies": { "@agm/core": "^1.0.0-beta.2", "@angular/animations": "^5.0.0", "@angular/common": "^5.0.0", "@angular/compiler": "^5.0.0", "@angular/core": "^5.0.0", "@angular/forms": "^5.0.0", "@angular/http": "^5.0.0", "@angular/platform-browser": "^5.0.0", "@angular/platform-browser-dynamic": "^5.0.0", "@angular/router": "^5.0.0", "@ngrx/effects": "^4.1.1", "@ngrx/entity": "^4.1.1", "@ngrx/router-store": "^4.1.1", "@ngrx/store": "^4.1.1", "@ngrx/store-devtools": "^4.1.1", "@types/lodash": "^4.14.108", "angular-google-place": "0.0.3", "angular2-notifications": "^0.9.7", "angular4-social-login": "^1.1.1", "core-js": "^2.4.1", "lodash": "^4.17.11", "ng2-google-place-autocomplete": "^1.4.2", "ngrx-store-freeze": "^0.2.0", "ngx-cookie-service": "^1.0.9", "ngx-dropzone-wrapper": "^5.3.4", "ngx-google-places-autocomplete": "^2.0.3", "ngx-perfect-scrollbar": "^5.3.3", "ngx-webstorage": "^2.0.1", "prettier": "^1.17.1", "primeng": "^6.1.5", "raven-js": "^3.27.0", "rxjs": "^5.5.2", "tslib": "^1.8.1", "uuid-js": "^0.7.5", "zone.js": "^0.8.14" }, "devDependencies": { "@angular/cli": "^1.7.3", "@angular/compiler-cli": "^5.2.11", "@angular/language-service": "^5.0.0", "@types/googlemaps": "^3.30.7", "@types/jasmine": "~2.5.53", "@types/jasminewd2": "~2.0.2", "@types/node": "~6.0.60", "codelyzer": "^4.0.1", "jasmine-core": "~2.6.2", "jasmine-spec-reporter": "~4.1.0", "karma": "^4.1.0", "karma-chrome-launcher": "~2.1.1", "karma-cli": "~1.0.1", "karma-coverage-istanbul-reporter": "^1.2.1", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", "node-sass": "^4.12.0", "protractor": "~5.4.2", "puppeteer": "^1.17.0", "ts-node": "~3.2.0", "tslint": "~5.7.0", "tslint-config-prettier": "^1.18.0", "typescript": "~2.4.2" } ``` ## πŸ”¬ Minimal Reproduction

πŸ”₯ Exception or Error





🌍 Your Environment




Angular CLI: 1.7.3
Node: 10.15.3
OS: win32 x64
Angular: 5.1.1
... animations, common, compiler, core, forms, http      
... language-service, platform-browser, platform-browser-dynamic
... router

@angular/cli: 1.7.3
@angular/compiler-cli: 5.2.11
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.2
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.4.2
webpack: 3.11.0

Anything else relevant?

alan-agius4 commented 5 years ago

Hi, thanks for opening this issue however Angular CLI 1 is no longer supported.

Kindly update to the latest version of the CLI and if the problem persists please open a new issue.

Thanks

angular-automatic-lock-bot[bot] commented 5 years ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.