def create_command(self, file): cmd = 'jsonlint' if npm_exists('jsonlint', self.working_dir): cmd = os.path.join(self.working_dir, 'node_modules', '.bin', 'jsonlint') command = [cmd, '-q', '-c', file] return command
def create_command(self, files): cmd = 'sass-lint' if npm_exists('sass-lint', self.working_dir): cmd = os.path.join(self.working_dir, 'node_modules', '.bin', 'sass-lint') command = [cmd, '-v', '-f', 'checkstyle'] command += files return command
def create_command(self, files): cmd = 'stylelint' if npm_exists('stylelint', self.working_dir): cmd = os.path.join(self.working_dir, 'node_modules', '.bin', 'stylelint') command = [cmd, '--no-color', '-f', 'json'] command += files return command
def create_command(self, files): cmd = 'jscs' if npm_exists('jscs', self.working_dir): cmd = os.path.join(self.working_dir, 'node_modules', '.bin', 'jscs') command = [cmd, '--reporter=checkstyle'] command += files return command
def create_command(self, files): cmd = 'csslint' if npm_exists('csslint', self.working_dir): cmd = os.path.join(self.working_dir, 'node_modules', '.bin', 'csslint') command = [cmd, '--format=checkstyle-xml'] command += files return command
def is_usable(self): return in_path('jsonlint') or npm_exists('jsonlint', self.working_dir)