Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# test
test repository
[![DeepScan grade](https://stage.deepscan.io/api/teams/6494/projects/23671/branches/721392/badge/grade.svg)](https://stage.deepscan.io/dashboard#view=project&tid=6494&pid=23671&bid=721392)
[![DeepScan grade](https://deepscan.io/api/teams/20255/projects/25078/branches/777497/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=20255&pid=25078&bid=777497)
14 changes: 0 additions & 14 deletions src/js/code-quality.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,17 +193,3 @@ function foo(url) {
var target = url + "user" + user; // UNUSED_VAR_ASSIGN alarm
target = url.replace(/\.|\?|\&|\/|\=|\:|\-|\s/gi, "");
}

import React from 'react';
import PropTypes from 'prop-types';

class Hello extends React.Component {
render() {
return <div>Hello, {this.props.name}</div>;
}
}

Hello.propTypes = {
name: PropTypes.string,
age: PropTypes.number // USELESS_PROP_TYPES alarm because this property 'age' is not used.
};
11 changes: 11 additions & 0 deletions src/js/react-rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,3 +214,14 @@ Hello.propTypes = {
name: PropTypes.string,
age: PropTypes.number // USELESS_PROP_TYPES alarm because this property 'age' is not used.
};

export class Hello extends React.Component {
render() {
return (
<div>
/* This is a comment */ {/* JSX_BAD_COMMENT alarm because this text is recognized as a JSX child instead of a comment. */}
<div>// is a double slash.</div> {/* JSX_BAD_COMMENT alarm because this text in div element is recognized as a JSX child instead of a comment. */}
</div>
);
}
}
15 changes: 15 additions & 0 deletions src/js/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

class Test {
data = 'data';
foo() {
console.log(this.data);
}
bar() {
this.foo.call(this); // USELESS_CALL alarm
}
}
function a() { return 1; } // DUPLICATE_DECL alarm. This function declaration is ignored.
function a(b) { return b; }

var foo;
var foo; // DUPLICATE_DECL alarm