Comments (12)
I could simulate the error now. I'll fix it, thanks!
from tslint-eslint-rules.
Hey there, thanks for reporting it!
The string was incorrect, you're right, and there was already an issue reporting that. I've just fixed it.
Although, I couldn't simulate your error, in fact I've created a test putting your entire code there (9da7ba8) and it passes with no false positives. Can you please investigate further?
from tslint-eslint-rules.
It's really strange, but I'm still getting the same error after updating to the latest version of the rule. Maybe some kind of parse error? Here's the complete source:
[gulp-tslint] error (no-ex-assign) bootstrap.ts[23, 22]: do not assign to the exception parameter.
import {Aurelia} from "aurelia-framework";
import {bootstrap} from "aurelia-bootstrapper";
import {TemplateRegistryEntry, Loader} from "aurelia-loader";
import {TextTemplateLoader} from "aurelia-loader-default";
declare var frontendConfig: { translate: string, debug: boolean };
(<any>TextTemplateLoader).prototype.standardLoadTemplate = TextTemplateLoader.prototype.loadTemplate;
TextTemplateLoader.prototype.loadTemplate = function(loader: Loader, entry: TemplateRegistryEntry): Promise<any> {
entry.address += "?translate=" + frontendConfig.language;
return (<any>this).standardLoadTemplate(loader, entry);
};
export function bootstrapComponents(): void {
"use strict";
let paths: string[] = [];
for (let i = 0; i < arguments.length; i++) {
let component: string = arguments[i];
paths.push("frontend/components/" + component + "/" + component);
}
bootstrap((aurelia: Aurelia) => { // line 23
aurelia.use
.defaultBindingLanguage()
.defaultResources()
.developmentLogging()
.globalResources(paths);
aurelia.start().then(() => aurelia.enhance({}, document.body));
});
}
from tslint-eslint-rules.
from tslint-eslint-rules.
The following code also throws no-ex-assign on line 3 col 2
import {Component} from '@angular/core';
@Component({
})
export class App {
}
with tslint 3.11 and tslint-eslint-rules 1.3.0
from tslint-eslint-rules.
See PR, tested with all linked examples. Still triggering for actuall exception assignments, eg.
import {Component} from '@angular/core';
@Component({
})
export class MyApp {
public hi() {
try {
console.log('Hello World');
}
catch (e) {
// Hi
let z = 'xxxx';
e = 2;
let x = e;
z.toString();
z = 'gfdg';
console.log('Done!', x, z);
console.log(e);
}
}
}
Throws: src/app.ts[18, 11]: do not assign to the exception parameter.
from tslint-eslint-rules.
@Hufschmidt Unfortunately, the linting is not passing for the submitted PR.
from tslint-eslint-rules.
from tslint-eslint-rules.
Oh, thanks @buzinas I didn't realize this was here. Thanks for closing my issue.
from tslint-eslint-rules.
@Hufschmidt if you don't mind, I'll copy the ideas provided from your PR and submit one myself, so we can merge this.
from tslint-eslint-rules.
Sure, go ahead. :)
from tslint-eslint-rules.
@Hufschmidt ty, just did it, the fix was released in v1.6.0
from tslint-eslint-rules.
Related Issues (20)
- Implement padding-line-between-statements HOT 1
- Drop rule no-duplicate-case
- Sort-Imports fails when 'none' is first sort option HOT 1
- `ter-newline-after-var`: Doesn't detect new-line
- ter-computed-property-spacing doesn't like double-array access
- ter-indent: Does not report missing indents in chains and ternaries
- validJsdocRule fails on union types and index signatures
- valid-jsdoc rule fails for async function
- no-empty-character-class problem
- New release soon? HOT 2
- Would be nice if you could port the comma-style rule
- Missing rule: max-lines-per-function
- no-multi-spaces rule do not get auto-fixed HOT 1
- valid-jsdoc: matchDescription for interfaces and enums
- ter-arrow-parens warnings influenced by code comments
- Missing rule : max-params HOT 1
- missing JSDoc @returns for function
- Where is the no-ex-assign coming from?
- ter-arrow-parens don't recognize the need of parens
- Support for latest version of tslint (V6 and above)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tslint-eslint-rules.