From d01ad09800b67d2c83e2707188c8e5c58991db1e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 5 Jun 2020 07:44:57 +0300 Subject: [PATCH] eslint-related fixes; move a few things from global context to App --- .eslintrc.js | 6 ++-- classes/article.php | 8 ++--- classes/feeds.php | 16 ++++----- classes/pref/feeds.php | 12 +++---- js/App.js | 68 +++++++++++++++++++++++++----------- js/Article.js | 26 +++++++++++--- js/CommonDialogs.js | 18 +++++----- js/CommonFilters.js | 5 +-- js/FeedTree.js | 8 ++--- js/Headlines.js | 23 +++++++------ js/common.js | 78 +++++++----------------------------------- 11 files changed, 131 insertions(+), 137 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index f44a8b3ed..6d76f6082 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -91,7 +91,7 @@ module.exports = { "max-statements-per-line": [ "warn", { "max" : 2 } ], "multiline-comment-style": "off", "multiline-ternary": "off", - "new-cap": "error", + "new-cap": "warn", "new-parens": "error", "newline-after-var": "off", "newline-before-return": "off", @@ -150,7 +150,7 @@ module.exports = { "no-negated-condition": "off", "no-negated-in-lhs": "error", "no-nested-ternary": "error", - "no-new": "error", + "no-new": "warn", "no-new-func": "error", "no-new-object": "off", "no-new-require": "error", @@ -162,7 +162,7 @@ module.exports = { "no-process-env": "error", "no-process-exit": "error", "no-proto": "error", - "no-prototype-builtins": "error", + "no-prototype-builtins": "warn", "no-restricted-globals": "error", "no-restricted-imports": "error", "no-restricted-modules": "error", diff --git a/classes/article.php b/classes/article.php index 74dbdae53..998528fe8 100755 --- a/classes/article.php +++ b/classes/article.php @@ -94,7 +94,7 @@ class Article extends Handler_Protected { ":id" => $ref_id]; $sth->execute($params); } - + $sth = $pdo->prepare("UPDATE ttrss_user_entries SET published = true, last_published = NOW() WHERE int_id = ? AND owner_uid = ?"); @@ -393,7 +393,7 @@ class Article extends Handler_Protected { # $entry .= " " . # $filename . " (" . $ctype . ")" . ""; - $entry = "
$filename ($ctype)
"; array_push($entries_html, $entry); @@ -473,7 +473,7 @@ class Article extends Handler_Protected { else $filename = ""; - $rv .= "
".$filename . $title."
"; }; @@ -583,7 +583,7 @@ class Article extends Handler_Protected { return "
note -
$note
+
$note
"; return $str; diff --git a/classes/feeds.php b/classes/feeds.php index bd2334747..001a4fd63 100755 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -701,12 +701,12 @@ class Feeds extends Handler_Protected { print "
"; print "
"; print "