Skip to content

Commit

Permalink
eslint: Update spellchecker and fix issues
Browse files Browse the repository at this point in the history
The performance issues with the spellcheck plugins were resolved
aotaduy/eslint-plugin-spellcheck#44

This commit updates the dependency to the latest version and fixes
several spelling issues.
  • Loading branch information
borisyankov committed Nov 21, 2018
1 parent ed13fce commit 8594a9c
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 26 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ rules:
lang: en_US
skipIfMatch:
- 'http://[^s]*'
- 'https://[^s]*'
- '^[-\w]+/[-\w\.]+$' # for MIME types
skipWords: [redux, Zulip, uri, timestamp, api, nav, init, auth, prev, utils, io,
http, https, msg, msg1, msg2, gif, img, abc, def, jkl, xyz, fn, params, backends,
Expand All @@ -126,7 +127,9 @@ rules:
avoider, octicons, centerer, ldap, gravatar, identicon, blueimp, filename, wildcards,
jpeg, jpg, tif, mov, notif, diag, bmp, viewport, scalable, polyfill, rect, touchstart,
touchend, touchmove, remoteuser, sso, submessages, nbsp, args, px, na, heic,
unstarred, gooooooooal, dogi, ig]
unstarred, gooooooooal, dogi, linter, lifecycle, subtree, zlib, lt, lector, overlayed,
rehydration, howto, hotspots, pressable, uncomment, interoperability, ig,
rt2zz, bd20a756f9, issuecomment, flowtype, natively, libdef, fullsize, Kat]
overrides:
- files:
- generatedEs3.js
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"eslint-plugin-prettier": "^2.6.0",
"eslint-plugin-react": "^7.8.2",
"eslint-plugin-react-native": "^3.2.1",
"eslint-plugin-spellcheck": "0.0.6",
"eslint-plugin-spellcheck": "0.0.11",
"flow-bin": "0.78",
"flow-coverage-report": "^0.6.0",
"flow-typed": "^2.4.0",
Expand Down
2 changes: 1 addition & 1 deletion src/api/apiTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export type DevUser = {
* These correspond to the values allowed for Reaction.reaction_type in the
* server's models. The values are:
* * unicode_emoji: An emoji found in Unicode, corresponding to a sequence
* of Unicode codepoints. The list of these depends on the Zulip
* of Unicode code points. The list of these depends on the Zulip
* server's version.
* * realm_emoji: A custom emoji uploaded by some user on a given realm.
* * zulip_extra_emoji: An emoji distributed with Zulip, like :zulip:.
Expand Down
2 changes: 1 addition & 1 deletion src/common/UnreadCount.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ type Props = {
* @prop [count] - Numerical value for the unread count.
* @prop [isMuted] - Flag indicating the entity to which the
* unread count value is related is muted. Styled differently.
* @prop [inverse] - Indicate if styling should be inversed (dark on light).
* @prop [inverse] - Indicate if styling should be inverted (dark on light).
* @prop [limited] - If set values over 100 will display as `99+`.
*/
export default class UnreadCount extends PureComponent<Props> {
Expand Down
2 changes: 1 addition & 1 deletion src/compose/ComposeMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type Props = {
export const chooseUploadImageFilename = (uri: string, fileName: string): string => {
/*
* Photos in an iPhone's camera roll (taken since iOS 11) are typically in
* HEIF format and have filenames with the extension `.HEIC`. When the user
* HEIF format and have file names with the extension `.HEIC`. When the user
* selects one of these photos through the image picker, the file gets
* automatically converted to JPEG format... but the `fileName` property in
* the react-native-image-picker response still has the `.HEIC` extension.
Expand Down
2 changes: 1 addition & 1 deletion src/utils/encoding.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const hexToBase64 = (hex: string) => base64.encode(hexToAscii(hex));
* Encode a string as the base64 representation of its UTF-8 bytes.
*
* This lets us pass an arbitrary string through a channel (like the
* `postMessage` on RN's webviews on Android) that tries to do something
* `postMessage` on RN's WebViews on Android) that tries to do something
* like percent-decode it.
*/
export const base64Utf8Encode = (text: string): string =>
Expand Down
2 changes: 1 addition & 1 deletion src/utils/presence.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const OFFLINE_THRESHOLD_SECS = 140;
* the subsystem doc:
* https://zulip.readthedocs.io/en/latest/subsystems/presence.html
*
* This logic should match `status_from_timestamp` in the webapp's
* This logic should match `status_from_timestamp` in the web app's
* `static/js/presence.js`.
*/
export const getAggregatedPresence = (presence: Presence): PresenceAggregated =>
Expand Down
6 changes: 3 additions & 3 deletions src/webview/js/js.js
Original file line number Diff line number Diff line change
Expand Up @@ -577,12 +577,12 @@ documentBody.addEventListener('click', (e: MouseEvent) => {
return;
}

/* Should we pull up the lightbox? For comparison, see the webapp's
/* Should we pull up the lightbox? For comparison, see the web app's
* static/js/lightbox.js , starting at the `#main_div` click handler. */
const inlineImageLink = target.closest('.message_inline_image a');
if (
inlineImageLink
/* The webapp displays certain videos inline, but on mobile
/* The web app displays certain videos inline, but on mobile
* we'd rather let another app handle them, as links. */
&& !inlineImageLink.closest('.youtube-video, .vimeo-video')
) {
Expand Down Expand Up @@ -634,7 +634,7 @@ const handleLongPress = (target: Element) => {
// It would be good to clean it up to be clearer.
//
// At the same time, the logic is believed not to cover all the cases it
// should; for example, multitouch events. Better would be to either find
// should; for example, multi-touch events. Better would be to either find
// a library we can use which strives to handle all that complexity, or
// get long-press events from the platform.
if (!lastTouchEventTimestamp || Date.now() - lastTouchEventTimestamp < 500) {
Expand Down
30 changes: 14 additions & 16 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2949,14 +2949,14 @@ eslint-plugin-react@^7.8.2:
jsx-ast-utils "^2.0.1"
prop-types "^15.6.0"

[email protected].6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/eslint-plugin-spellcheck/-/eslint-plugin-spellcheck-0.0.6.tgz#bd5b5c93864dee3baa2db4f603983c8e29d39634"
integrity sha1-vVtck4ZN7juqLbT2A5g8jinTljQ=
[email protected].11:
version "0.0.11"
resolved "https://registry.yarnpkg.com/eslint-plugin-spellcheck/-/eslint-plugin-spellcheck-0.0.11.tgz#f3fcff70a0446e1f04eacd5ebaa8cab23e691b4a"
integrity sha512-P8NCB9Y9u3PLSdW5PeVY6kcBR/WkP/FB3toik5ahaGc13s+Di+Op+ItinB89Z+61+IrXQX//qeGh1mgCGrp7LA==
dependencies:
globals "^6.4.1"
hunspell-spellchecker "^1.0.0"
lodash "^3.3.1"
globals "^11.3.0"
hunspell-spellchecker "^1.0.2"
lodash "^4.14.2"

eslint-restricted-globals@^0.1.1:
version "0.1.1"
Expand Down Expand Up @@ -3720,10 +3720,9 @@ globals@^11.1.0:
resolved "https://registry.yarnpkg.com/globals/-/globals-11.1.0.tgz#632644457f5f0e3ae711807183700ebf2e4633e4"
integrity sha512-uEuWt9mqTlPDwSqi+sHjD4nWU/1N+q0fiWI9T1mZpD2UENqX20CFD5T/ziLZvztPaBKl7ZylUi1q6Qfm7E2CiQ==

globals@^6.4.1:
version "6.4.1"
resolved "https://registry.yarnpkg.com/globals/-/globals-6.4.1.tgz#8498032b3b6d1cc81eebc5f79690d8fe29fabf4f"
integrity sha1-hJgDKzttHMge68X3lpDY/in6v08=
globals@^11.3.0:
version "11.7.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-11.7.0.tgz#a583faa43055b1aca771914bf68258e2fc125673"

globals@^9.18.0:
version "9.18.0"
Expand Down Expand Up @@ -4013,7 +4012,7 @@ https-proxy-agent@^2.1.1:
agent-base "^4.1.0"
debug "^3.1.0"

hunspell-spellchecker@^1.0.0:
hunspell-spellchecker@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/hunspell-spellchecker/-/hunspell-spellchecker-1.0.2.tgz#a10b0bd2fa00a65ab62a4c6b734ce496d318910e"
integrity sha1-oQsL0voAplq2Kkxrc0zkltMYkQ4=
Expand Down Expand Up @@ -5782,10 +5781,9 @@ [email protected], lodash@^4.0.0, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.15.0, lod
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
integrity sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=

lodash@^3.3.1:
version "3.10.1"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6"
integrity sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=
lodash@^4.14.2:
version "4.17.10"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"

lodash@^4.17.10:
version "4.17.11"
Expand Down

0 comments on commit 8594a9c

Please sign in to comment.