Skip to content

Commit 97baa48

Browse files
committed
lint: stricter type checking
1 parent 4e97712 commit 97baa48

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.luarc.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"runtime": {
3+
"version": "LuaJIT",
4+
"pathStrict": true
5+
},
6+
"type": {
7+
"checkTableShape": true
8+
}
9+
}

lua/conform/formatters/injected.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ return {
112112
url = "doc/advanced_topics.md#injected-language-formatting-code-blocks",
113113
description = "Format treesitter injected languages.",
114114
},
115+
---@type conform.InjectedFormatterOptions
115116
options = {
116117
-- Set to true to ignore errors
117118
ignore_errors = false,
@@ -151,8 +152,8 @@ return {
151152
callback("No treesitter parser for buffer")
152153
return
153154
end
154-
---@type conform.InjectedFormatterOptions
155155
local options = self.options
156+
---@cast options conform.InjectedFormatterOptions
156157

157158
---@param lang string
158159
---@return nil|conform.FiletypeFormatter

lua/conform/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ end
311311

312312
---@param bufnr integer
313313
---@param mode "v"|"V"
314-
---@return table {start={row,col}, end={row,col}} using (1, 0) indexing
314+
---@return conform.Range {start={row,col}, end={row,col}} using (1, 0) indexing
315315
local function range_from_selection(bufnr, mode)
316316
-- [bufnum, lnum, col, off]; both row and column 1-indexed
317317
local start = vim.fn.getpos("v")

0 commit comments

Comments
 (0)