mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
eslint config
This commit is contained in:
parent
fbc79eae62
commit
ee60652746
16
.eslintrc.js
Normal file
16
.eslintrc.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
module.exports = {
|
||||||
|
"env": {
|
||||||
|
"browser": true,
|
||||||
|
"commonjs": true,
|
||||||
|
"es2021": true,
|
||||||
|
"node": true
|
||||||
|
},
|
||||||
|
"extends": "eslint:recommended",
|
||||||
|
"overrides": [
|
||||||
|
],
|
||||||
|
"parserOptions": {
|
||||||
|
"ecmaVersion": "latest"
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
}
|
||||||
|
}
|
2
.idea/inspectionProfiles/Project_Default.xml
generated
2
.idea/inspectionProfiles/Project_Default.xml
generated
@ -1,7 +1,7 @@
|
|||||||
<component name="InspectionProjectProfileManager">
|
<component name="InspectionProjectProfileManager">
|
||||||
<profile version="1.0">
|
<profile version="1.0">
|
||||||
<option name="myName" value="Project Default" />
|
<option name="myName" value="Project Default" />
|
||||||
<inspection_tool class="JSUnfilteredForInLoop" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
||||||
<option name="processCode" value="true" />
|
<option name="processCode" value="true" />
|
||||||
<option name="processLiterals" value="true" />
|
<option name="processLiterals" value="true" />
|
||||||
|
6
.idea/jsLinters/eslint.xml
generated
Normal file
6
.idea/jsLinters/eslint.xml
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="EslintConfiguration">
|
||||||
|
<option name="fix-on-save" value="true" />
|
||||||
|
</component>
|
||||||
|
</project>
|
1190
package-lock.json
generated
1190
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -99,6 +99,7 @@
|
|||||||
"electron-builder": "23.6.0",
|
"electron-builder": "23.6.0",
|
||||||
"electron-packager": "17.1.1",
|
"electron-packager": "17.1.1",
|
||||||
"electron-rebuild": "3.2.9",
|
"electron-rebuild": "3.2.9",
|
||||||
|
"eslint": "^8.38.0",
|
||||||
"esm": "3.2.25",
|
"esm": "3.2.25",
|
||||||
"jasmine": "4.5.0",
|
"jasmine": "4.5.0",
|
||||||
"jsdoc": "4.0.1",
|
"jsdoc": "4.0.1",
|
||||||
|
@ -74,7 +74,7 @@ function getOptions() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resultMap['isPasswordSet'] = !!optionMap['passwordVerificationHash'] ? 'true' : 'false';
|
resultMap['isPasswordSet'] = optionMap['passwordVerificationHash'] ? 'true' : 'false';
|
||||||
|
|
||||||
return resultMap;
|
return resultMap;
|
||||||
}
|
}
|
||||||
|
@ -471,7 +471,7 @@ function BackendScriptApi(currentNote, apiParams) {
|
|||||||
if (opts.type === 'script' && !opts.scriptNoteId) { throw new Error("scriptNoteId is mandatory for launchers of type 'script'"); }
|
if (opts.type === 'script' && !opts.scriptNoteId) { throw new Error("scriptNoteId is mandatory for launchers of type 'script'"); }
|
||||||
if (opts.type === 'customWidget' && !opts.widgetNoteId) { throw new Error("widgetNoteId is mandatory for launchers of type 'customWidget'"); }
|
if (opts.type === 'customWidget' && !opts.widgetNoteId) { throw new Error("widgetNoteId is mandatory for launchers of type 'customWidget'"); }
|
||||||
|
|
||||||
const parentNoteId = !!opts.isVisible ? '_lbVisibleLaunchers' : '_lbAvailableLaunchers';
|
const parentNoteId = opts.isVisible ? '_lbVisibleLaunchers' : '_lbAvailableLaunchers';
|
||||||
const noteId = 'al_' + opts.id;
|
const noteId = 'al_' + opts.id;
|
||||||
|
|
||||||
const launcherNote =
|
const launcherNote =
|
||||||
|
@ -125,7 +125,7 @@ function getScriptBundle(note, root = true, scriptEnv = null, includedNoteIds =
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (root) {
|
if (root) {
|
||||||
scriptEnv = !!backendOverrideContent
|
scriptEnv = backendOverrideContent
|
||||||
? 'backend'
|
? 'backend'
|
||||||
: note.getScriptEnv();
|
: note.getScriptEnv();
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ function lex(str) {
|
|||||||
const fulltextTokens = [];
|
const fulltextTokens = [];
|
||||||
const expressionTokens = [];
|
const expressionTokens = [];
|
||||||
|
|
||||||
|
/** @type {boolean|string} */
|
||||||
let quotes = false; // otherwise contains used quote - ', " or `
|
let quotes = false; // otherwise contains used quote - ', " or `
|
||||||
let fulltextEnded = false;
|
let fulltextEnded = false;
|
||||||
let currentWord = '';
|
let currentWord = '';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user