if (preg_match('/^v(\d\.\d\.\d)$/', $stdout, $matches)) {
return $matches[1];
} else {
return false;
}
}
protected function getMandatoryFlags() {
return array(
'--format=json',
'--no-color',
);
}
protected function getDefaultFlags() {
return $this->flags;
}
public function getLinterConfigurationOptions() {
$options = array(
'eslint.config' => array(
'type' => 'optional string',
'help' => pht('Use configuration from this file or shareable config. (https://eslint.org/docs/user-guide/command-line-interface#-c---config)'),
),
'eslint.env' => array(
'type' => 'optional string',
'help' => pht('Specify environments. To specify multiple environments, separate them using commas. (https://eslint.org/docs/user-guide/command-line-interface#--env)'),