Sha256: 1abfc41649a8da432fda3353c06165857e7c99256923def3d46c1c84898fac9a

Contents?: true

Size: 528 Bytes

Versions: 20

Compression:

Stored size: 528 Bytes

Contents

# frozen_string_literal: true

module Quality
  module Tools
    # Adds 'bigfiles' tool support to quality gem
    class Eslint < Tool
      def eslint_args
        '-f unix ' + js_files.join(' ')
      end

      def quality_eslint
        ratchet_quality_cmd('eslint',
                            args: eslint_args,
                            gives_error_code_on_violations: true) do |line|
          if line =~ /^.*:\d+:\d+: /
            1
          else
            0
          end
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
quality-40.0.1 lib/quality/tools/eslint.rb
quality-40.0.0 lib/quality/tools/eslint.rb
quality-39.0.1 lib/quality/tools/eslint.rb
quality-38.0.1 lib/quality/tools/eslint.rb
quality-38.0.0 lib/quality/tools/eslint.rb
quality-37.1.1 lib/quality/tools/eslint.rb
quality-37.1.0 lib/quality/tools/eslint.rb
quality-37.0.1 lib/quality/tools/eslint.rb
quality-37.0.0 lib/quality/tools/eslint.rb
quality-36.1.0 lib/quality/tools/eslint.rb
quality-36.0.0 lib/quality/tools/eslint.rb
quality-35.2.1 lib/quality/tools/eslint.rb
quality-35.2.0 lib/quality/tools/eslint.rb
quality-35.1.1 lib/quality/tools/eslint.rb
quality-35.0.1 lib/quality/tools/eslint.rb
quality-35.0.0 lib/quality/tools/eslint.rb
quality-34.0.2 lib/quality/tools/eslint.rb
quality-34.0.1 lib/quality/tools/eslint.rb
quality-34.0.0 lib/quality/tools/eslint.rb
quality-33.0.0 lib/quality/tools/eslint.rb