Class: Phare::Check::Eslint
- Inherits:
-
Phare::Check
- Object
- Phare::Check
- Phare::Check::Eslint
- Defined in:
- lib/phare/check/eslint.rb
Constant Summary collapse
- GLOBAL_BINARY =
'eslint'.freeze
- LOCAL_BINARY =
'node_modules/.bin/eslint'.freeze
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Attributes inherited from Phare::Check
Instance Method Summary collapse
- #command ⇒ Object
-
#initialize(directory, options = {}) ⇒ Eslint
constructor
A new instance of Eslint.
Methods inherited from Phare::Check
Constructor Details
#initialize(directory, options = {}) ⇒ Eslint
Returns a new instance of Eslint.
10 11 12 13 14 15 16 17 18 |
# File 'lib/phare/check/eslint.rb', line 10 def initialize(directory, = {}) @directory = directory @config = File.("#{directory}.eslintrc", __FILE__) @path = File.("#{directory}app/assets/javascripts", __FILE__) @extensions = %w(.js) @options = super end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
8 9 10 |
# File 'lib/phare/check/eslint.rb', line 8 def config @config end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
8 9 10 |
# File 'lib/phare/check/eslint.rb', line 8 def path @path end |
Instance Method Details
#command ⇒ Object
20 21 22 |
# File 'lib/phare/check/eslint.rb', line 20 def command "#{binary} #{input}" end |