Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update node package call from #42

Merged
merged 6 commits into from
May 29, 2024
Merged
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
8 changes: 4 additions & 4 deletions lua/guard-collection/formatter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ M.dprint = {
}

M.eslint_d = {
cmd = 'eslint_d',
args = { '--fix-to-stdout', '--stdin', '--stdin-filename' },
cmd = 'npx',
args = { 'eslint_d', '--fix-to-stdout', '--stdin', '--stdin-filename' },
fname = true,
stdin = true,
}
Expand Down Expand Up @@ -137,8 +137,8 @@ M.pg_format = {
}

M.prettier = {
cmd = 'prettier',
args = { '--stdin-filepath' },
cmd = 'npx',
xiaoshihou514 marked this conversation as resolved.
Show resolved Hide resolved
args = { 'prettier', '--stdin-filepath' },
fname = true,
stdin = true,
}
Expand Down
7 changes: 5 additions & 2 deletions lua/guard-collection/linter/eslint.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
local lint = require('guard.lint')

return {
cmd = 'eslint',
args = { '--format', 'json', '--stdin', '--stdin-filename' },
cmd = 'npx',
args = { 'eslint', '--format', 'json', '--stdin', '--stdin-filename' },
stdin = true,
fname = true,
find = {
Expand All @@ -11,6 +11,9 @@ return {
'.eslintrc.yaml',
'.eslintrc.yml',
'.eslintrc.json',
'eslint.config.js',
'eslint.config.cjs',
'eslint.config.mjs',
},
parse = lint.from_json({
get_diagnostics = function(...)
Expand Down
7 changes: 5 additions & 2 deletions lua/guard-collection/linter/eslint_d.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
local lint = require('guard.lint')

return {
cmd = 'eslint_d',
args = { '--format', 'json', '--stdin', '--stdin-filename' },
cmd = 'npx',
args = { 'eslint_d', '--format', 'json', '--stdin', '--stdin-filename' },
stdin = true,
fname = true,
find = {
Expand All @@ -11,6 +11,9 @@ return {
'.eslintrc.yaml',
'.eslintrc.yml',
'.eslintrc.json',
'eslint.config.js',
'eslint.config.cjs',
'eslint.config.mjs',
},
parse = lint.from_json({
get_diagnostics = function(...)
Expand Down
4 changes: 2 additions & 2 deletions lua/guard-collection/linter/stylelint.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
local lint = require('guard.lint')

return {
cmd = 'stylelint',
args = { '--formatter', 'json', '--stdin', '--stdin-filename' },
cmd = 'npx',
args = { 'stylelint', '--formatter', 'json', '--stdin', '--stdin-filename' },
stdin = true,
fname = true,
find = {
Expand Down
16 changes: 8 additions & 8 deletions test/linter/flake8_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('flake8', function()
end_col = 0,
end_lnum = 0,
lnum = 0,
message = "'os' imported but unused [401]",
message = "'os' imported but unused[401]",
namespace = ns,
severity = 3,
source = 'flake8',
Expand All @@ -32,7 +32,7 @@ describe('flake8', function()
end_col = 0,
end_lnum = 2,
lnum = 2,
message = 'expected 2 blank lines, found 1 [302]',
message = 'expected 2 blank lines, found 1[302]',
namespace = ns,
severity = 1,
source = 'flake8',
Expand All @@ -43,7 +43,7 @@ describe('flake8', function()
end_col = 9,
end_lnum = 4,
lnum = 4,
message = 'indentation is not a multiple of 4 [111]',
message = 'indentation is not a multiple of 4[111]',
namespace = ns,
severity = 1,
source = 'flake8',
Expand All @@ -54,7 +54,7 @@ describe('flake8', function()
end_col = 9,
end_lnum = 4,
lnum = 4,
message = 'over-indented [117]',
message = 'over-indented[117]',
namespace = ns,
severity = 1,
source = 'flake8',
Expand All @@ -65,7 +65,7 @@ describe('flake8', function()
end_col = 15,
end_lnum = 4,
lnum = 4,
message = 'multiple spaces after keyword [271]',
message = 'multiple spaces after keyword[271]',
namespace = ns,
severity = 1,
source = 'flake8',
Expand All @@ -76,7 +76,7 @@ describe('flake8', function()
end_col = 17,
end_lnum = 4,
lnum = 4,
message = "undefined name 'bar' [821]",
message = "undefined name 'bar'[821]",
namespace = ns,
severity = 3,
source = 'flake8',
Expand All @@ -87,7 +87,7 @@ describe('flake8', function()
end_col = 0,
end_lnum = 5,
lnum = 5,
message = 'expected 2 blank lines after class or function definition, found 0 [305]',
message = 'expected 2 blank lines after class or function definition, found 0[305]',
namespace = ns,
severity = 1,
source = 'flake8',
Expand All @@ -98,7 +98,7 @@ describe('flake8', function()
end_col = 79,
end_lnum = 5,
lnum = 5,
message = 'line too long (80 > 79 characters) [501]',
message = 'line too long (80 > 79 characters)[501]',
namespace = ns,
severity = 1,
source = 'flake8',
Expand Down
2 changes: 1 addition & 1 deletion test/linter/luacheck_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('luacheck', function()
end_col = 0,
end_lnum = 4,
lnum = 4,
message = "accessing undefined variable 'U' [113]",
message = "accessing undefined variable 'U'[113]",
namespace = ns,
severity = 2,
source = 'luacheck',
Expand Down
Loading