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