Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve JS linting #3212

Merged
merged 6 commits into from
Jun 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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