Skip to content

Commit

Permalink
chore: add eslint-plugin-de-morgan
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexogamer committed Feb 13, 2025
1 parent 5477c5d commit 8cd196b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
root: true,
extends: '@react-native',
extends: ['@react-native', 'plugin:de-morgan/recommended-legacy'],
rules: {
'react/react-in-jsx-scope': 0,
'react-native/no-inline-styles': 0, // TODO: turn this back on when the codebase is less error-filled
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
"babel-plugin-react-native-web": "^0.19.13",
"babel-plugin-transform-remove-console": "^6.9.4",
"eslint": "^8.57.1",
"eslint-plugin-de-morgan": "^1.0.0",
"jest": "^29.7.0",
"knip": "^5.44.1",
"prettier": "^3.5.0",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/auth/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export async function loginWithSavedToken(status: string) {
await client.useExistingSession({token: res});
} catch (e: any) {
console.log(e);
!(e.message?.startsWith('Read error') || e.message === 'Network Error') &&
!e.message?.startsWith('Read error') && e.message !== 'Network Error' &&
client.user
? app.setLoggedOutScreen('loginPage')
: status === 'loggedIn'
Expand Down
2 changes: 1 addition & 1 deletion src/lib/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export function calculateGrouped(msg1: Message, msg2: Message) {
return (
// a message is grouped with the previous message if all of the following statements are true:
msg1.author._id === msg2.author._id && // the author is the same
!(msg1.reply_ids && msg1.reply_ids.length > 0) && // the message is not a reply
(!msg1.reply_ids || msg1.reply_ids.length <= 0) && // the message is not a reply
differenceInMinutes(time1, time2) < 7 && // the time difference is less than 7 minutes
isSameDay(time1, time2) && // the messages were sent on the same day and
(msg2.masquerade // the masquerade is the same
Expand Down
10 changes: 10 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6051,6 +6051,15 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-de-morgan@npm:^1.0.0":
version: 1.0.0
resolution: "eslint-plugin-de-morgan@npm:1.0.0"
peerDependencies:
eslint: ">=8.0.0"
checksum: 10c0/bde5c30ae0f827992102699d49330a6ef1d1b7660f0f038ba8dca6683622e074e9b18400387286e3df55eb252b429178e2eee303ed25ca070fd83d91afb1aa52
languageName: node
linkType: hard

"eslint-plugin-eslint-comments@npm:^3.2.0":
version: 3.2.0
resolution: "eslint-plugin-eslint-comments@npm:3.2.0"
Expand Down Expand Up @@ -10702,6 +10711,7 @@ __metadata:
babel-plugin-transform-remove-console: "npm:^6.9.4"
date-fns: "npm:^4.1.0"
eslint: "npm:^8.57.1"
eslint-plugin-de-morgan: "npm:^1.0.0"
i18next: "npm:^24.2.2"
intl-pluralrules: "npm:^2.0.1"
jest: "npm:^29.7.0"
Expand Down

0 comments on commit 8cd196b

Please sign in to comment.