Skip to content

Commit

Permalink
Fix type declarations for custom message arguments (#6354)
Browse files Browse the repository at this point in the history
Disabling the checks for lib files will hide typescript errors in the
stylelint type definitions, as those are loaded as a lib type when
type-checking type-test.ts
  • Loading branch information
stof committed Sep 20, 2022
1 parent 6edbbdf commit b0c49e1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/eleven-monkeys-return.md
@@ -0,0 +1,5 @@
---
"stylelint": patch
---

Fixed: type declarations for custom message arguments
2 changes: 1 addition & 1 deletion tsconfig.json
Expand Up @@ -15,7 +15,7 @@
"noUncheckedIndexedAccess": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"skipLibCheck": false,
"typeRoots": ["./types", "./node_modules/@types"]
},
"include": ["lib", "types", "package.json"],
Expand Down
2 changes: 1 addition & 1 deletion types/stylelint/index.d.ts
Expand Up @@ -353,7 +353,7 @@ declare module 'stylelint' {
ruleName: string;
result: PostcssResult;
message: RuleMessage;
messageArgs?: Parameters<RuleMessage> | undefined;
messageArgs?: Parameters<RuleMessageFunc> | undefined;
node: PostCSS.Node;
/**
* The inclusive start index of the problem, relative to the node's
Expand Down

0 comments on commit b0c49e1

Please sign in to comment.