From ce89f9ed8a80a06d26b0618658733956d0c98f84 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mindaugas=20Moz=C5=ABras?= Date: Sun, 28 Feb 2016 17:27:46 +0200 Subject: [PATCH] Initial commit --- .gitignore | 5 +++++ .rubocop.yml | 11 +++++++++++ .travis.yml | 8 ++++++++ Gemfile | 3 +++ LICENSE | 21 +++++++++++++++++++++ README.md | 16 ++++++++++++++++ Rakefile | 9 +++++++++ pronto-eslint.gemspec | 42 ++++++++++++++++++++++++++++++++++++++++++ spec/spec_helper.rb | 17 +++++++++++++++++ 9 files changed, 132 insertions(+) create mode 100644 .gitignore create mode 100644 .rubocop.yml create mode 100644 .travis.yml create mode 100644 Gemfile create mode 100644 LICENSE create mode 100644 README.md create mode 100644 Rakefile create mode 100644 pronto-eslint.gemspec create mode 100644 spec/spec_helper.rb diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2ac8271 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +pkg/* +*.gem +.bundle +.DS_Store +Gemfile.lock diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 0000000..48d19f3 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,11 @@ +Documentation: + Enabled: false + +SignalException: + EnforcedStyle: only_raise + +MultilineOperationIndentation: + EnforcedStyle: indented + +MultilineMethodCallIndentation: + EnforcedStyle: indented diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..98c8e1d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +sudo: required +dist: trusty +language: ruby +rvm: +- 1.9.3 +- 2.0.0 +- 2.1 +- 2.2 diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..fa75df1 --- /dev/null +++ b/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' + +gemspec diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..baecb15 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License + +Copyright (c) 2016 Mindaugas Mozūras + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..e9aa8e9 --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# Pronto runner for ESLint + +[![Code Climate](https://codeclimate.com/github/mmozuras/pronto-eslint.png)](https://codeclimate.com/github/mmozuras/pronto-eslint) +[![Build Status](https://travis-ci.org/mmozuras/pronto-eslint.png)](https://travis-ci.org/mmozuras/pronto-eslint) +[![Gem Version](https://badge.fury.io/rb/pronto-eslint.png)](http://badge.fury.io/rb/pronto-eslint) +[![Dependency Status](https://gemnasium.com/mmozuras/pronto-eslint.png)](https://gemnasium.com/mmozuras/pronto-eslint) + +Pronto runner for [ESlint](http://eslint.org), pluggable linting utility for JavaScript and JSX. [What is Pronto?](https://github.com/mmozuras/pronto) + +## Prerequisites + +You'll need to install one of the runtimes supported by [ExecJS](https://github.com/sstephenson/execjs#execjs). + +## Configuration + +Configuring ESLint via .eslintrc will work just fine with pronto-eslint. diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..dfa86a6 --- /dev/null +++ b/Rakefile @@ -0,0 +1,9 @@ +#!/usr/bin/env rake +require 'bundler' +require 'rspec/core/rake_task' + +Bundler::GemHelper.install_tasks +RSpec::Core::RakeTask.new(:spec) + +task(:default).clear +task default: [:spec] diff --git a/pronto-eslint.gemspec b/pronto-eslint.gemspec new file mode 100644 index 0000000..7a57560 --- /dev/null +++ b/pronto-eslint.gemspec @@ -0,0 +1,42 @@ +# -*- encoding: utf-8 -*- +# +$LOAD_PATH.push File.expand_path('../lib', __FILE__) +require 'pronto/eslint/version' +require 'English' + +Gem::Specification.new do |s| + s.name = 'pronto-eslint' + s.version = Pronto::ESLintVersion::VERSION + s.platform = Gem::Platform::RUBY + s.author = 'Mindaugas Mozūras' + s.email = 'mindaugas.mozuras@gmail.com' + s.homepage = 'http://github.org/mmozuras/pronto-eslintt' + s.summary = <<-EOF + Pronto runner for ESLint, pluggable linting utility for JavaScript and JSX + EOF + + s.licenses = ['MIT'] + s.required_ruby_version = '>= 1.9.3' + s.rubygems_version = '1.8.23' + + s.files = `git ls-files`.split($RS).reject do |file| + file =~ %r{^(?: + spec/.* + |Gemfile + |Rakefile + |\.rspec + |\.gitignore + |\.rubocop.yml + |\.travis.yml + )$}x + end + s.test_files = [] + s.extra_rdoc_files = ['LICENSE', 'README.md'] + s.require_paths = ['lib'] + + s.add_dependency('pronto', '~> 0.5.0') + s.add_dependency('eslintrb', '~> 2.0.0') + s.add_development_dependency('rake', '~> 10.4') + s.add_development_dependency('rspec', '~> 3.3') + s.add_development_dependency('rspec-its', '~> 1.2') +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..4d1ff71 --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1,17 @@ +require 'rspec' +require 'rspec/its' +require 'pronto/eslint' + +RSpec.shared_context 'test repo' do + let(:git) { 'spec/fixtures/test.git/git' } + let(:dot_git) { 'spec/fixtures/test.git/.git' } + + before { FileUtils.mv(git, dot_git) } + let(:repo) { Pronto::Git::Repository.new('spec/fixtures/test.git') } + after { FileUtils.mv(dot_git, git) } +end + +RSpec.configure do |config| + config.expect_with(:rspec) { |c| c.syntax = :should } + config.mock_with(:rspec) { |c| c.syntax = :should } +end -- 2.41.0