class Fastlane::Actions::NpmLintAction

Public Class Methods

authors() click to toggle source
# File lib/fastlane/plugin/npm/actions/npm_lint_action.rb, line 23
def self.authors
  ["Erick Martins"]
end
available_options() click to toggle source
# File lib/fastlane/plugin/npm/actions/npm_lint_action.rb, line 36
def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :script,
                       default_value: 'lint',
                         description: "Lint script",
                            optional: true,
                                type: String),

    FastlaneCore::ConfigItem.new(key: :fix,
                       default_value: false,
                         description: "Run postinstall script right after",
                            optional: true,
                                type: Boolean),

    FastlaneCore::ConfigItem.new(key: :arguments,
                        default_value: [],
                          description: "Script arguments",
                            optional: true,
                                type: Array),

    FastlaneCore::ConfigItem.new(key: :step_name,
                       default_value: "Running lint script",
                         description: "Name for this step",
                            optional: true,
                                type: String),
  ]
end
description() click to toggle source
# File lib/fastlane/plugin/npm/actions/npm_lint_action.rb, line 19
def self.description
  "Runs lint script"
end
details() click to toggle source
# File lib/fastlane/plugin/npm/actions/npm_lint_action.rb, line 31
def self.details
  # Optional:
  "A very simple plugin to run npm scripts"
end
is_supported?(platform) click to toggle source
# File lib/fastlane/plugin/npm/actions/npm_lint_action.rb, line 64
def self.is_supported?(platform)
  # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
  # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
  #
  # [:ios, :mac, :android].include?(platform)
  true
end
return_value() click to toggle source
# File lib/fastlane/plugin/npm/actions/npm_lint_action.rb, line 27
def self.return_value
  # If your method provides a return value, you can describe here what it does
end
run(params) click to toggle source
# File lib/fastlane/plugin/npm/actions/npm_lint_action.rb, line 7
def self.run(params)
  arguments = []
  arguments = ['--fix'] if params[:fix]
  arguments.concat params[:arguments]

  other_action.npm_run(
    script: 'lint', 
    step_name: params[:step_name],
    arguments: arguments
  )
end