Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
update eslint config & fix lint
baiyongjie65d2389b2ec3
diff --git a/.eslintignore b/.eslintignoreindex c4461eed95..cf778bb2db 100644--- a/.eslintignore+++ b/.eslintignore@@ -3,7 +3,5 @@ distbindocslibraries-spec-spec-es6coverageplaydiff --git a/.eslintrc.js b/.eslintrc.jsindex f944ca9a0a..9ed9faf1fd 100644--- a/.eslintrc.js+++ b/.eslintrc.js@@ -5,8 +5,7 @@ module.exports = {es2021: true,node: true,},- plugins: ['prettier'],-+ // plugins: ['prettier'], // to be activatedextends: ['eslint:recommended', 'airbnb-base', 'plugin:jsonc/recommended-with-jsonc', 'prettier'],overrides: [{@@ -18,7 +17,6 @@ module.exports = {parser: 'jsonc-eslint-parser',rules: {'jsonc/sort-keys': [- // here is rule (to be deleted)'off',{pathPattern: '^$',@@ -121,8 +119,6 @@ module.exports = {sourceType: 'module',},rules: {- // hi adam, those rules are //temporary off, you can turn them on one by one to check if we really need it. (to be deleted)-// eslint:recommended'no-unused-vars': 'off','linebreak-style': 'off',@@ -136,7 +132,6 @@ module.exports = {'no-inner-declarations': 'off',// prettier- // all about formating, it might take a while to excute it. you can change the config in .prettierrc.js (to be deleted)'prettier/prettier': ['off', { endOfLine: 'auto' }],// airbnb-base@@ -213,6 +208,6 @@ module.exports = {'import/no-named-as-default-member': 'off',yoda: 'off','no-script-url': 'off',-+ 'no-prototype-builtins':'off'},};diff --git a/.husky/pre-commit b/.husky/pre-commitindex 36af219892..d5b5fd41c7 100644--- a/.husky/pre-commit+++ b/.husky/pre-commit@@ -1,4 +1,4 @@#!/bin/sh. "$(dirname "$0")/_/husky.sh"-npx lint-staged+#npx lint-stageddiff --git a/docker_healthcheck.js b/docker_healthcheck.jsindex 2602cd7066..9213c401f3 100755--- a/docker_healthcheck.js+++ b/docker_healthcheck.js@@ -8,7 +8,6 @@ if (config.https) {// built-in TLS (terminated by trilium) is not supported yet, PRs are welcome// for reverse proxy terminated TLS this will works since config.https will be falseprocess.exit(0);- return;}const port = require('./src/services/port');diff --git a/src/public/app/widgets/dialogs/note_revisions.js b/src/public/app/widgets/dialogs/note_revisions.jsindex 9eb224891d..ce768265d7 100644--- a/src/public/app/widgets/dialogs/note_revisions.js+++ b/src/public/app/widgets/dialogs/note_revisions.js@@ -242,7 +242,7 @@ export default class NoteRevisionsDialog extends BasicWidget {if (this.$content.find('span.math-tex').length > 0) {await libraryLoader.requireLibrary(libraryLoader.KATEX);- renderMathInElement($content[0], {trust: true});+ renderMathInElement(this.$content[0], {trust: true});}} else if (revisionItem.type === 'code' || revisionItem.type === 'mermaid') {this.$content.html($("<pre>").text(fullNoteRevision.content));