Skip to content

Commit

Permalink
Merge pull request #8 from konsumer/master
Browse files Browse the repository at this point in the history
javascript linters
  • Loading branch information
drmargarido committed May 11, 2020
2 parents e475d0b + e84206e commit 0e1aac7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions linter_standard.lua
@@ -0,0 +1,14 @@
-- this is for standardjs linting

local config = require "core.config"
local linter = require "plugins.linter"

-- add auto-fixing by adding '--fix' to your options, add '--verbose' to get the offending eslint rule
config.standard_args = {}

linter.add_language {
file_patterns = {"%.js$"},
warning_pattern = "[^:]:(%d+):(%d+): ([^\n]+)",
command = "standard $ARGS $FILENAME",
args = config.standard_args
}
14 changes: 14 additions & 0 deletions liter_eslint.lua
@@ -0,0 +1,14 @@
-- linter for eslint

local config = require "core.config"
local linter = require "plugins.linter"

-- add --fix to your args for auto-fixing.
config.eslint_args = {}

linter.add_language {
file_patterns = {"%.js$"},
warning_pattern = "[^:]:(%d+):(%d+): ([^\n]+)",
command = "eslint --format unix $ARGS $FILENAME",
args = config.eslint_args
}

0 comments on commit 0e1aac7

Please sign in to comment.