Skip to content

Commit

Permalink
Merge pull request #3212 from aitbw/aitbw/better-js-linting
Browse files Browse the repository at this point in the history
Improve JS linting
  • Loading branch information
kennyadsl authored Jun 6, 2019
2 parents 95e6962 + af8f6f6 commit a3cc823
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
27 changes: 19 additions & 8 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
{
"extends": "airbnb-base",
"env": {
"es6": false,
"browser": true,
"jquery": true
},
"rules": {
"camelcase": 0,
"comma-dangle": 0,
"dot-notation": 0,
"func-names": 0,
"no-console": 0,
"no-extra-semi": 0,
"no-console": ["warn", {
"allow": ["warn"]
}],
"no-extra-semi": "error",
"no-global-assign": ["error", {
"exceptions": ["Tabs"]
}],
"no-redeclare": 0,
"no-redeclare": "error",
"no-shadow": 0,
"no-undef": "error",
"no-unused-vars": 0,
"no-unused-vars": ["error", {
"vars": "all", "args": "none"
}],
"no-use-before-define": 0,
"no-var": 0,
"object-shorthand": 0,
Expand All @@ -27,20 +36,22 @@
"vars-on-top": 0
},
"globals": {
"$": "readonly",
"_": "readonly",
"accounting": "readonly",
"addVariantFromStockLocation": "writable",
"adjustShipmentItems": "writable",
"document": "readonly",
"Backbone": "readonly",
"error": "writable",
"flatpickr": "readonly",
"Handlebars": "readonly",
"HandlebarsTemplates": "readonly",
"json": "writable",
"message": "writable",
"Select2": "readonly",
"shipments": "writable",
"show_flash": "writable",
"Sortable": "readonly",
"Spree": "readonly",
"Turbolinks": "readonly",
"window": "readonly"
"Turbolinks": "readonly"
}
}
2 changes: 0 additions & 2 deletions backend/app/assets/javascripts/spree/backend/translation.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint no-console: "off" */

(function() {
// Resolves string keys with dots in a deeply nested object
// http://stackoverflow.com/a/22129960/4405214
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Require this file if you plan to use Turbolinks in the Solidus admin
// It is necessary because extensions may use JS libs that make use of
// jQuery.ready instead of Spree.ready
/* eslint no-console: "off" */

Spree.jQueryReady = $.fn.ready;

Expand Down

0 comments on commit a3cc823

Please sign in to comment.