class Eslintrb::EslintTask
Attributes
exclude_js_files[RW]
exclude_pattern[RW]
fail_on_error[RW]
Whether or not to fail Rake when an error occurs (typically when ESLint check fail). Defaults to true.
globals[RW]
js_files[RW]
Explicitly define the list of JavaScript files to be linted. js_files
is expected to be an array of file names (a FileList is acceptable). If both pattern
and js_files
are used, then the list of JavaScritp files is the union of the two.
name[RW]
Name of ESLint task. (default is :eslint)
options[RW]
options
pattern[RW]
Glob pattern to match JavaScript files. (default is ‘./*/.js’)
Public Class Methods
new(name=:eslint) { |self| ... }
click to toggle source
Defines a new task, using the name name
.
# File lib/eslintrb/eslinttask.rb, line 37 def initialize(name=:eslint) @name = name @pattern = nil @js_files = nil @exclude_pattern = nil @exclude_js_files = nil @options = nil @globals = nil @fail_on_error = true yield self if block_given? @pattern = './**/*.js' if pattern.nil? && js_files.nil? define end