-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(package): update dtslint and fix type errors
- Loading branch information
1 parent
07d7c98
commit 8062ce8
Showing
7 changed files
with
2,866 additions
and
2,229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
{ | ||
"env": { | ||
"jest": true, | ||
"node": true | ||
"node": true, | ||
"jest": true | ||
}, | ||
"extends": "eslint:recommended", | ||
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 6, | ||
"ecmaVersion": 12, | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["prettier"], | ||
"plugins": ["@typescript-eslint", "prettier"], | ||
"rules": { | ||
"@typescript-eslint/no-unused-vars": "error", | ||
"@typescript-eslint/no-var-requires": "off", | ||
"no-console": "error", | ||
"no-debugger": "error", | ||
"prettier/prettier": "error" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import StyleToObject from 'style-to-object'; | ||
|
||
// $ExpectType { [name: string]: string; } | null | ||
StyleToObject('color: red'); | ||
|
||
// @ts-expect-error: Expected 1-2 arguments, but got 0. | ||
StyleToObject(); | ||
|
||
// @ts-expect-error: Argument of type 'null' is not assignable to parameter of type 'string'. | ||
StyleToObject(null); | ||
|
||
// @ts-expect-error: Argument of type 'number' is not assignable to parameter of type 'string'. | ||
StyleToObject(42); | ||
|
||
// @ts-expect-error: Argument of type 'boolean' is not assignable to parameter of type 'string'. | ||
StyleToObject(true); |
Oops, something went wrong.