Replace jshint with eslint
This commit is contained in:
parent
aed17d1b16
commit
62dff6ab7f
5 changed files with 42 additions and 37 deletions
|
@ -27,6 +27,6 @@ before_script:
|
|||
- bundle exec rake i18n:js:export
|
||||
script:
|
||||
- bundle exec rubocop -f fuubar
|
||||
- bundle exec rake jshint
|
||||
- bundle exec rake eslint:run_all
|
||||
- bundle exec erblint .
|
||||
- bundle exec rake test:db
|
||||
|
|
4
Gemfile
4
Gemfile
|
@ -145,8 +145,10 @@ group :development, :test do
|
|||
gem "capybara", "~> 2.13"
|
||||
gem "coveralls", :require => false
|
||||
gem "erb_lint", :require => false
|
||||
gem "eslint-rails-ee"
|
||||
gem "execjs"
|
||||
gem "factory_bot_rails"
|
||||
gem "jshint"
|
||||
gem "poltergeist"
|
||||
gem "puma", "~> 3.7"
|
||||
gem "therubyracer", :platforms => :ruby
|
||||
end
|
||||
|
|
13
Gemfile.lock
13
Gemfile.lock
|
@ -99,6 +99,7 @@ GEM
|
|||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.12.2)
|
||||
colorize (0.8.1)
|
||||
composite_primary_keys (11.1.0)
|
||||
activerecord (~> 5.2.1)
|
||||
concurrent-ruby (1.1.5)
|
||||
|
@ -161,6 +162,10 @@ GEM
|
|||
rubocop (~> 0.51)
|
||||
smart_properties
|
||||
erubi (1.8.0)
|
||||
eslint-rails-ee (1.0.2)
|
||||
colorize
|
||||
execjs
|
||||
railties (>= 3.2)
|
||||
execjs (2.7.0)
|
||||
exifr (1.3.6)
|
||||
factory_bot (5.0.2)
|
||||
|
@ -204,10 +209,6 @@ GEM
|
|||
rails-dom-testing (>= 1, < 3)
|
||||
railties (>= 4.2.0)
|
||||
thor (>= 0.14, < 2.0)
|
||||
jshint (1.5.0)
|
||||
execjs (>= 1.4.0)
|
||||
multi_json (~> 1.0)
|
||||
therubyracer (~> 0.12.1)
|
||||
json (2.2.0)
|
||||
jsonify (0.3.1)
|
||||
multi_json (~> 1.0)
|
||||
|
@ -459,6 +460,8 @@ DEPENDENCIES
|
|||
delayed_job_active_record
|
||||
dynamic_form
|
||||
erb_lint
|
||||
eslint-rails-ee
|
||||
execjs
|
||||
factory_bot_rails
|
||||
fakefs
|
||||
faraday
|
||||
|
@ -469,7 +472,6 @@ DEPENDENCIES
|
|||
i18n-js (>= 3.0.0)
|
||||
image_optim_rails
|
||||
jquery-rails
|
||||
jshint
|
||||
json
|
||||
jsonify-rails
|
||||
kgio
|
||||
|
@ -506,6 +508,7 @@ DEPENDENCIES
|
|||
sanitize
|
||||
sassc-rails
|
||||
secure_headers
|
||||
therubyracer
|
||||
uglifier (>= 1.3.0)
|
||||
validates_email_format_of (>= 1.5.1)
|
||||
vendorer
|
||||
|
|
30
config/eslint.json
Normal file
30
config/eslint.json
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"jquery": true
|
||||
},
|
||||
"extends": [
|
||||
"eslint:recommended"
|
||||
],
|
||||
"globals": {
|
||||
"bowser": "readonly",
|
||||
"I18n": "readonly",
|
||||
"L": "readonly",
|
||||
"OSM": "writable",
|
||||
"Piwik": "readonly",
|
||||
"querystring": "readonly",
|
||||
"require": "readonly",
|
||||
"updateLinks": "readonly"
|
||||
},
|
||||
"rules": {
|
||||
"eqeqeq": ["error", "smart"],
|
||||
"no-caller": "error",
|
||||
"no-extend-native": "error",
|
||||
"no-new": "error",
|
||||
"no-trailing-spaces": "error",
|
||||
"no-undef": "error",
|
||||
"no-unused-vars": "error",
|
||||
"no-use-before-define": ["error", {"functions": false}],
|
||||
"semi": ["error", "always"]
|
||||
}
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
files:
|
||||
- "**/*.js"
|
||||
exclude_paths:
|
||||
- "app/assets/javascripts/i18n"
|
||||
- "vendor/assets/javascripts"
|
||||
options:
|
||||
eqeqeq: true
|
||||
freeze: true
|
||||
latedef: "nofunc"
|
||||
noarg: true
|
||||
noempty: true
|
||||
nonew: true
|
||||
undef: true
|
||||
browser: true
|
||||
jquery: true
|
||||
unused: true
|
||||
trailing: true
|
||||
globals:
|
||||
I18n: false
|
||||
L: true
|
||||
OSM: true
|
||||
Piwik: false
|
||||
alert: false
|
||||
escape: false
|
||||
maximiseMap: false
|
||||
minimiseMap: false
|
||||
querystring: true
|
||||
require: false
|
||||
updateLinks: false
|
||||
bowser: false
|
Loading…
Add table
Add a link
Reference in a new issue