Hello, I used SQ with VSCode and it has SonarLint installed but doesn’t detect problems.
Here’s the issues I’m facing.
It located 13 MAJOR issues regarding the way I have been coding for 40 years as WRONG and it’s not.
it('should call keyDownArrowDown Event when selectedItemIndex is > 0 ', fakeAsync(() => {
fixture.detectChanges();
**let keyDownEvnt: any;**
**keyDownEvnt = '';**
const select = 1;
spyOn(autoCompleteComponent, 'keyDownArrowDown');
expect(autoCompleteComponent.autoCompleteInput).toBeNull();
expect(select).toEqual(1);
tick();
autoCompleteComponent.keyDownArrowDown(keyDownEvnt, 1);
expect(autoCompleteComponent.keyDownArrowDown).toHaveBeenCalled();
fixture.whenStable().then(() => {
const text = select;
expect(text).toEqual(1);
});
}));
This is perfectly acceptable
**let keyDownEvnt: any;**
**keyDownEvnt = '';**
What TSLint and ESLint won’t allow is what was suggested to :
let keyDownEvnt: any = ‘’;
Our sonarqube engine needs to be able to LEARN or we need to be able to change/add a setting somewhere that will allow us to “IGNORE” this which is perfectly acceptable and something I’ve done since I started coding in 1994. I’m 60…