Skip to content

Commit

Permalink
chore: fix eslint sort-import rule
Browse files Browse the repository at this point in the history
  • Loading branch information
Limon Monte committed Jan 24, 2022
1 parent b7320c5 commit 4fab140
Show file tree
Hide file tree
Showing 12 changed files with 59 additions and 44 deletions.
7 changes: 1 addition & 6 deletions cspell.config.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
{
"dictionaries": ["html"],
"words": [
"swal",
"sweetalert",
"inputerror",
"iosfix"
]
"words": ["swal", "sweetalert", "inputerror", "iosfix"]
}
2 changes: 1 addition & 1 deletion cypress/integration/methods/input.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { isVisible } from '../../../src/utils/dom'
import { $, Swal, SwalWithoutAnimation, isHidden, triggerKeydownEvent, dispatchCustomEvent, TIMEOUT } from '../../utils'
import { $, Swal, SwalWithoutAnimation, TIMEOUT, dispatchCustomEvent, isHidden, triggerKeydownEvent } from '../../utils'
import { toArray } from '../../../src/utils/utils'
import defaultInputValidators from '../../../src/utils/defaultInputValidators'

Expand Down
2 changes: 1 addition & 1 deletion cypress/integration/tests.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import jQuery from 'jquery'
import Swal from '../../src/sweetalert2'
import { SHOW_CLASS_TIMEOUT } from '../../src/utils/openPopup'
import { $, isHidden, SwalWithoutAnimation, triggerKeydownEvent, dispatchCustomEvent } from '../utils'
import { $, SwalWithoutAnimation, dispatchCustomEvent, isHidden, triggerKeydownEvent } from '../utils'
import { isVisible } from '../../src/utils/dom'
import { defaultParams } from '../../src/utils/params'

Expand Down
10 changes: 3 additions & 7 deletions jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@
"compilerOptions": {
"allowJs": true,
"checkJs": true,
"target": "es5",
"target": "es5"
// "strict": true
},
"include": [
"src/**/*"
],
"exclude": [
"node_modules"
]
"include": ["src/**/*"],
"exclude": ["node_modules"]
}
2 changes: 1 addition & 1 deletion src/SweetAlert.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import setParameters from './utils/setParameters.js'
import Timer from './utils/Timer.js'
import { openPopup } from './utils/openPopup.js'
import { handleInputOptionsAndValue } from './utils/dom/inputUtils.js'
import { handleConfirmButtonClick, handleDenyButtonClick, handleCancelButtonClick } from './buttons-handlers.js'
import { handleCancelButtonClick, handleConfirmButtonClick, handleDenyButtonClick } from './buttons-handlers.js'
import { handlePopupClick } from './popup-click-handler.js'
import { addKeydownHandler, setFocus } from './keydown-handler.js'
import * as staticMethods from './staticMethods.js'
Expand Down
4 changes: 2 additions & 2 deletions src/utils/dom/domUtils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getTimerProgressBar, getConfirmButton, getDenyButton, getCancelButton } from './getters.js'
import { swalClasses, iconTypes } from '../classes.js'
import { getCancelButton, getConfirmButton, getDenyButton, getTimerProgressBar } from './getters.js'
import { iconTypes, swalClasses } from '../classes.js'
import { toArray, warn } from '../utils.js'

// Remember state in cases where opening and handling a modal will fiddle with it.
Expand Down
4 changes: 2 additions & 2 deletions src/utils/dom/getters.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { swalClasses } from '../classes.js'
import { uniqueArray, toArray } from '../utils.js'
import { isVisible, hasClass } from './domUtils.js'
import { toArray, uniqueArray } from '../utils.js'
import { hasClass, isVisible } from './domUtils.js'

/**
* Gets the popup container which contains the backdrop and the popup itself.
Expand Down
2 changes: 1 addition & 1 deletion src/utils/dom/init.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { swalClasses } from '../classes.js'
import { getContainer, getPopup } from './getters.js'
import { addClass, removeClass, getDirectChildByClass, setInnerHtml } from './domUtils.js'
import { addClass, getDirectChildByClass, removeClass, setInnerHtml } from './domUtils.js'
import { isNodeEnv } from '../isNodeEnv.js'
import { error } from '../utils.js'
import globalState from '../../globalState.js'
Expand Down
2 changes: 1 addition & 1 deletion src/utils/dom/renderers/renderIcon.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { swalClasses, iconTypes } from '../../classes.js'
import { iconTypes, swalClasses } from '../../classes.js'
import { error } from '../../utils.js'
import * as dom from '../../dom/index.js'
import privateProps from '../../../privateProps.js'
Expand Down
2 changes: 1 addition & 1 deletion src/utils/dom/renderers/renderInput.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { swalClasses } from '../../classes.js'
import { warn, error, isPromise } from '../../utils.js'
import { error, isPromise, warn } from '../../utils.js'
import * as dom from '../../dom/index.js'
import privateProps from '../../../privateProps.js'

Expand Down
2 changes: 1 addition & 1 deletion src/utils/getTemplateParams.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import defaultParams from './params.js'
import { toArray, capitalizeFirstLetter, warn } from './utils.js'
import { capitalizeFirstLetter, toArray, warn } from './utils.js'

const swalStringParams = ['swal-title', 'swal-html', 'swal-footer']

Expand Down
64 changes: 44 additions & 20 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1255,9 +1255,9 @@
integrity sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==

"@sweetalert2/eslint-config@^1.0.11":
version "1.0.17"
resolved "https://registry.yarnpkg.com/@sweetalert2/eslint-config/-/eslint-config-1.0.17.tgz#a9971e12cfb0f97c46ff459c3b1c71842562e85d"
integrity sha512-+JjzvTcqg8bmEEoNV/aWeRTcrspmfW+PIn0f+2C/uniMXRqelKC0LzZZLgTxWHyt9RBfBypQdykCRdDMXxW0lQ==
version "1.0.20"
resolved "https://registry.yarnpkg.com/@sweetalert2/eslint-config/-/eslint-config-1.0.20.tgz#0720ded9f8dd3317c00245c78f099e277084908a"
integrity sha512-nbs0mSq7KdvqPSndK0Dq2OgqLPRrM2L9cSjwRWLQM+vMmy5Lc4JvYG2ONFaHsBmwYuX17SM8QscJgPxTXCX6HQ==
dependencies:
"@typescript-eslint/eslint-plugin" "^5.0.0"
"@typescript-eslint/parser" "^5.0.0"
Expand Down Expand Up @@ -3428,7 +3428,7 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==

fast-glob@^3.2.7, fast-glob@^3.2.9:
fast-glob@^3.2.11, fast-glob@^3.2.9:
version "3.2.11"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9"
integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==
Expand Down Expand Up @@ -3920,7 +3920,7 @@ globals@^13.6.0, globals@^13.9.0:
dependencies:
type-fest "^0.20.2"

globby@^11.0.4:
globby@^11.0.4, globby@^11.1.0:
version "11.1.0"
resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b"
integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==
Expand Down Expand Up @@ -5798,7 +5798,7 @@ postcss-scss@^4.0.2:
resolved "https://registry.yarnpkg.com/postcss-scss/-/postcss-scss-4.0.3.tgz#36c23c19a804274e722e83a54d20b838ab4767ac"
integrity sha512-j4KxzWovfdHsyxwl1BxkUal/O4uirvHgdzMKS1aWJBAV0qh2qj5qAZqpeBfVUYGWv+4iK9Az7SPyZ4fyNju1uA==

postcss-selector-parser@^6.0.6, postcss-selector-parser@^6.0.7:
postcss-selector-parser@^6.0.6, postcss-selector-parser@^6.0.9:
version "6.0.9"
resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.9.tgz#ee71c3b9ff63d9cd130838876c13a2ec1a992b2f"
integrity sha512-UO3SgnZOVTwu4kyLR22UQ1xZh086RyNZppb7lLAKBFK8a32ttG5i87Y/P3+2bRSjZNyJ1B7hfFNo273tKe9YxQ==
Expand All @@ -5816,7 +5816,7 @@ postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0:
resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514"
integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==

postcss@^8.3.0, postcss@^8.3.11:
postcss@^8.3.0, postcss@^8.3.11, postcss@^8.4.5:
version "8.4.5"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.5.tgz#bae665764dfd4c6fcc24dc0fdf7e7aa00cc77f95"
integrity sha512-jBDboWM8qpaqwkMwItqTQTiFikhs/67OYVvblFFTM7MrZjt6yMKd6r2kgXizEbTTljacm4NldIlZnhbjr84QYg==
Expand Down Expand Up @@ -6870,21 +6870,21 @@ stylelint-scss@^4.0.1:
postcss-value-parser "^4.1.0"

stylelint@^14.2.0:
version "14.2.0"
resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-14.2.0.tgz#da4f0f4580e66911c38c376ed82447b78e32b0fb"
integrity sha512-i0DrmDXFNpDsWiwx6SPRs4/pyw4kvZgqpDGvsTslQMY7hpUl6r33aQvNSn6cnTg2wtZ9rreFElI7XAKpOWi1vQ==
version "14.3.0"
resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-14.3.0.tgz#26b62730da7b3dc320021fc469d80048d7b77ebe"
integrity sha512-PZXSwtJe4f4qBPWBwAbHL0M0Qjrv8iHN+cLpUNsffaVMS3YzpDDRI73+2lsqLAYfQEzxRwpll6BDKImREbpHWA==
dependencies:
balanced-match "^2.0.0"
colord "^2.9.2"
cosmiconfig "^7.0.1"
debug "^4.3.3"
execall "^2.0.0"
fast-glob "^3.2.7"
fast-glob "^3.2.11"
fastest-levenshtein "^1.0.12"
file-entry-cache "^6.0.1"
get-stdin "^8.0.0"
global-modules "^2.0.0"
globby "^11.0.4"
globby "^11.1.0"
globjoin "^0.1.4"
html-tags "^3.1.0"
ignore "^5.2.0"
Expand All @@ -6898,21 +6898,22 @@ stylelint@^14.2.0:
normalize-path "^3.0.0"
normalize-selector "^0.2.0"
picocolors "^1.0.0"
postcss "^8.3.11"
postcss "^8.4.5"
postcss-media-query-parser "^0.2.3"
postcss-resolve-nested-selector "^0.1.1"
postcss-safe-parser "^6.0.0"
postcss-selector-parser "^6.0.7"
postcss-value-parser "^4.1.0"
postcss-selector-parser "^6.0.9"
postcss-value-parser "^4.2.0"
resolve-from "^5.0.0"
specificity "^0.4.1"
string-width "^4.2.3"
strip-ansi "^6.0.1"
style-search "^0.1.0"
supports-hyperlinks "^2.2.0"
svg-tags "^1.0.0"
table "^6.7.5"
table "^6.8.0"
v8-compile-cache "^2.3.0"
write-file-atomic "^3.0.3"
write-file-atomic "^4.0.0"

supports-color@^2.0.0:
version "2.0.0"
Expand All @@ -6926,7 +6927,7 @@ supports-color@^5.3.0:
dependencies:
has-flag "^3.0.0"

supports-color@^7.1.0, supports-color@^7.2.0:
supports-color@^7.0.0, supports-color@^7.1.0, supports-color@^7.2.0:
version "7.2.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da"
integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==
Expand All @@ -6940,6 +6941,14 @@ supports-color@^8.1.1:
dependencies:
has-flag "^4.0.0"

supports-hyperlinks@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz#4f77b42488765891774b70c79babd87f9bd594bb"
integrity sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==
dependencies:
has-flag "^4.0.0"
supports-color "^7.0.0"

supports-preserve-symlinks-flag@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09"
Expand All @@ -6963,7 +6972,7 @@ [email protected]:
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4"
integrity sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=

table@^6.7.5:
table@^6.8.0:
version "6.8.0"
resolved "https://registry.yarnpkg.com/table/-/table-6.8.0.tgz#87e28f14fa4321c3377ba286f07b79b281a3b3ca"
integrity sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA==
Expand Down Expand Up @@ -7225,6 +7234,11 @@ typedarray-to-buffer@^3.1.5:
dependencies:
is-typedarray "^1.0.0"

typedarray-to-buffer@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-4.0.0.tgz#cdd2933c61dd3f5f02eda5d012d441f95bfeb50a"
integrity sha512-6dOYeZfS3O9RtRD1caom0sMxgK59b27+IwoNy8RDPsmslSGOyU+mpTamlaIW7aNKi90ZQZ9DFaZL3YRoiSCULQ==

typedarray@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
Expand Down Expand Up @@ -7567,7 +7581,7 @@ wrappy@1:
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=

write-file-atomic@^3.0.0, write-file-atomic@^3.0.3:
write-file-atomic@^3.0.0:
version "3.0.3"
resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8"
integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==
Expand All @@ -7577,6 +7591,16 @@ write-file-atomic@^3.0.0, write-file-atomic@^3.0.3:
signal-exit "^3.0.2"
typedarray-to-buffer "^3.1.5"

write-file-atomic@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.0.tgz#0eff5dc687d3e22535ca3fca8558124645a4b053"
integrity sha512-JhcWoKffJNF7ivO9yflBhc7tn3wKnokMUfWpBriM9yCXj4ePQnRPcWglBkkg1AHC8nsW/EfxwwhqsLtOy59djA==
dependencies:
imurmurhash "^0.1.4"
is-typedarray "^1.0.0"
signal-exit "^3.0.2"
typedarray-to-buffer "^4.0.0"

ws@~7.4.2:
version "7.4.6"
resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c"
Expand Down

0 comments on commit 4fab140

Please sign in to comment.