Skip to content

Commit

Permalink
test(unused): Add failing test for #13.
Browse files Browse the repository at this point in the history
  • Loading branch information
cartant committed Mar 28, 2019
1 parent d950339 commit 4d78c59
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
20 changes: 20 additions & 0 deletions fixtures/issues/13/fixture.tsx.lint
@@ -0,0 +1,20 @@
import * as React from "react";

export const HeaderButton = (props: IHeaderButtonProps) => {
return (
<TouchableOpacity
{...props}
>
<RText
style={{
color: props.disabled ? "gray" : "black",
...props.textStyle,
}}
>
{props.content}
</RText>
</TouchableOpacity>
);
};

HeaderButton.defaultProps = { disabled: false };
5 changes: 5 additions & 0 deletions fixtures/issues/13/tsconfig.json
@@ -0,0 +1,5 @@
{
"compilerOptions": {
"module": "commonjs"
}
}
8 changes: 8 additions & 0 deletions fixtures/issues/13/tslint.json
@@ -0,0 +1,8 @@
{
"defaultSeverity": "error",
"jsRules": {},
"rules": {
"no-unused-declaration": { "severity": "error" }
},
"rulesDirectory": "../../../build/rules"
}
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -47,7 +47,7 @@
"test": "yarn run lint && yarn run test:build && yarn run test:tslint",
"test:build": "yarn run test:clean && tsc -p tsconfig.json",
"test:clean": "rimraf build",
"test:debug": "tslint --test fixtures/no-unused-declaration/used-functions-object-shorthand/tslint.json",
"test:debug": "tslint --test fixtures/issues/13/tslint.json",
"test:tslint": "tslint --test fixtures/**/tslint.json"
},
"version": "1.4.1"
Expand Down

0 comments on commit 4d78c59

Please sign in to comment.