Sha256: ca3ba8c8497b9a8173949d509ea461ebb454859bd6781c248d1690030817f77f

Contents?: true

Size: 1022 Bytes

Versions: 31

Compression:

Stored size: 1022 Bytes

Contents

# frozen_string_literal: true

require_relative "task_helpers"

namespace :lint do # rubocop:disable Metrics/BlockLength
  include ReactOnRails::TaskHelpers

  desc "Run Rubocop as shell"
  task :rubocop do
    sh_in_dir(gem_root, "bundle exec rubocop .")
  end

  desc "Run ruby-lint as shell"
  task :ruby do
    puts "See /ruby-lint.yml for what directories are included."
    sh_in_dir(gem_root, "bundle exec ruby-lint .")
  end

  desc "Run scss-lint as shell"
  task :scss do
    sh_in_dir(gem_root, "bundle exec scss-lint spec/dummy/app/assets/stylesheets/")
  end

  desc "Run eslint as shell"
  task :eslint do
    sh_in_dir(gem_root, "yarn run eslint")
  end

  desc "Run flow from shell"
  task :flow do
    sh_in_dir(gem_root, "yarn run flow")
  end

  desc "Run all eslint, flow, rubocop linters. Skip ruby-lint and scss"
  task lint: %i[eslint flow rubocop] do
    puts "Completed all linting"
  end
end

desc "Runs all linters. Run `rake -D lint` to see all available lint options"
task lint: ["lint:lint"]

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
react_on_rails-11.0.5 rakelib/lint.rake
react_on_rails-11.0.4 rakelib/lint.rake
react_on_rails-11.0.3 rakelib/lint.rake
react_on_rails-11.0.2 rakelib/lint.rake
react_on_rails-11.0.1 rakelib/lint.rake
react_on_rails-11.0.0 rakelib/lint.rake
react_on_rails-11.0.0.beta.1 rakelib/lint.rake
react_on_rails-10.1.4 rakelib/lint.rake
react_on_rails-10.1.3 rakelib/lint.rake
react_on_rails-10.1.1 rakelib/lint.rake
react_on_rails-10.1.0 rakelib/lint.rake