Skip to content

Commit

Permalink
Add eslint-plugin-compat
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed Aug 31, 2021
1 parent ef21000 commit eee9f86
Show file tree
Hide file tree
Showing 5 changed files with 96 additions and 0 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"root": true,
"extends": [
"plugin:compat/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:unicorn/recommended",
Expand Down
1 change: 1 addition & 0 deletions build/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
},
"extends": "../.eslintrc.json",
"rules": {
"compat/compat": "off",
"no-console": "off",
"strict": "error"
}
Expand Down
2 changes: 2 additions & 0 deletions js/src/carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,10 @@ class Carousel extends BaseComponent {

this._config = this._getConfig(config)
this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element)
/* eslint-disable compat/compat */
this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0
this._pointerEvent = Boolean(window.PointerEvent)
/* eslint-enable compat/compat */

this._addEventListeners()
}
Expand Down
91 changes: 91 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
"cross-env": "^7.0.3",
"eslint": "^7.32.0",
"eslint-config-xo": "^0.38.0",
"eslint-plugin-compat": "^3.13.0",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-unicorn": "^35.0.0",
"find-unused-sass-variables": "^3.1.0",
Expand Down

0 comments on commit eee9f86

Please sign in to comment.