mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 04:16:17 +01:00 
			
		
		
		
	small changes to linting and protected session
This commit is contained in:
		@@ -25,7 +25,9 @@ const protected_session = (function() {
 | 
				
			|||||||
        if (requireProtectedSession && !isProtectedSessionAvailable()) {
 | 
					        if (requireProtectedSession && !isProtectedSessionAvailable()) {
 | 
				
			||||||
            protectedSessionDeferred = dfd;
 | 
					            protectedSessionDeferred = dfd;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (noteTree.getCurrentNode().data.isProtected) {
 | 
				
			||||||
                $noteDetailWrapper.hide();
 | 
					                $noteDetailWrapper.hide();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            $dialog.dialog({
 | 
					            $dialog.dialog({
 | 
				
			||||||
                modal: modal,
 | 
					                modal: modal,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -11,9 +11,15 @@
 | 
				
			|||||||
})(function(CodeMirror) {
 | 
					})(function(CodeMirror) {
 | 
				
			||||||
  "use strict";
 | 
					  "use strict";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  async function validator(text, options) {console.log("Validating...");
 | 
					  async function validator(text, options) {
 | 
				
			||||||
    await requireLibrary(ESLINT);
 | 
					    await requireLibrary(ESLINT);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (text.length > 20000) {
 | 
				
			||||||
 | 
					        console.log("Skipping linting because of large size: ", text.length);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return [];
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    var errors = new eslint().verify(text, {
 | 
					    var errors = new eslint().verify(text, {
 | 
				
			||||||
        root: true,
 | 
					        root: true,
 | 
				
			||||||
        parserOptions: {
 | 
					        parserOptions: {
 | 
				
			||||||
@@ -29,7 +35,6 @@
 | 
				
			|||||||
            'import/no-extraneous-dependencies': 'off',
 | 
					            'import/no-extraneous-dependencies': 'off',
 | 
				
			||||||
            'func-names': 'off',
 | 
					            'func-names': 'off',
 | 
				
			||||||
            'no-multi-spaces': 'off',
 | 
					            'no-multi-spaces': 'off',
 | 
				
			||||||
            'spaced-comment': ["error", "always", { "markers": ["/"] }],
 | 
					 | 
				
			||||||
            'comma-dangle': ['error'],
 | 
					            'comma-dangle': ['error'],
 | 
				
			||||||
            'padded-blocks': 'off',
 | 
					            'padded-blocks': 'off',
 | 
				
			||||||
            'linebreak-style': 'off',
 | 
					            'linebreak-style': 'off',
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user