;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\207" [require lsp-protocol lsp-mode] 2) (defconst lsp-eslint/status-ok 1) (defconst lsp-eslint/status-warn 2) (defconst lsp-eslint/status-error 3) (byte-code "\300\301\302\303\304\305\306\307&\210\310\311\312\313\314DD\315\316\317\304\301\320\321& \210\310\322\312\313\323DD\324\325\326\316\327\320\330& \210\310\331\312\313\332DD\333\316\334\320\335&\210\310\336\312\313\337DD\340\316\341\320\342&\210\310\343\312\313\344DD\345\316\334\320\346&\210\310\347\312\313\350DD\351\316\352\320\353&\210\310\354\312\313\355DD\356\316\317\320\357&\210\310\360\312\313\361DD\362\316\363%\210\310\364\312\313\365DD\366\316\367%\210\310\370\312\313\371DD\372\316\373\320\374&\210\310\375\312\313\376DD\377\316\334\320\201@&\210\310\201A\312\313\201BDD\201C\316\201D\320\201E&\210\310\201F\312\313\201GDD\201H\316\334\320\201I&\210\310\201J\312\313\201KDD\201L\316\201M\320\201N&\210\310\201O\312\313\201PDD\201Q\316\201M\320\201R&\210\310\201S\312\313\201TDD\201U\316\334\320\201V&\210\310\201W\312\313\201XDD\201U\316\334\320\201Y&\210\310\201Z\312\313\201[DD\201\\\316\367\320\201]&\210\310\201^\312\313\201_DD\201`\316\201a\320\201b&\210\310\201c\312\313\201dDD\201L\316\363\320\201e&\210\310\201f\312\313\201gDD\201L\316\363%\210\310\201h\312\313\201iDD\201j\316\334\320\201k&\210\310\201l\312\313\201mDD\201n\316\334\320\201o&\210\310\201p\312\313\201qDD\201r\316\367\320\201s&\207" [custom-declare-group lsp-eslint nil "ESlint language server group." :group lsp-mode :link (url-link "https://github.com/Microsoft/vscode-eslint") custom-declare-variable lsp-eslint-unzipped-path funcall function #[0 "\301\302\"\207" [lsp-server-install-dir f-join "eslint/unzipped"] 3] "The path to the file in which `eslint' will be stored." :type file :package-version (lsp-mode . "7.1") lsp-eslint-server-command #[0 "\300\207" [("node" "~/server/out/eslintServer.js" "--stdio")] 1] "Command to start eslint server." :risky t (repeat string) (lsp-mode . "6.3") lsp-eslint-enable #[0 "\300\207" [t] 1] "Controls whether eslint is enabled for JavaScript files or not." boolean (lsp-mode . "6.3") lsp-eslint-package-manager #[0 "\300\207" [#1="npm"] 1 #1#] "The package manager you use to install node modules." (choice (const :tag "npm" "npm") (const :tag "yarn" "yarn") (const :tag "pnpm" "pnpm") (string :tag "other")) (lsp-mode . "6.3") lsp-eslint-format #[0 "\300\207" [t] 1] "Whether to perform format." (lsp-mode . "6.3") lsp-eslint-node-path #[0 "\300\207" [nil] 1] "A path added to NODE_PATH when resolving the eslint module." (repeat string) (lsp-mode . "6.3") lsp-eslint-node #[0 "\300\207" [#2="node"] 1 #2#] "Path to nodejs." (lsp-mode . "7.1") lsp-eslint-options #[0 "\300\207" [nil] 1] "The eslint options object to provide args normally passed to\n eslint when executed from a command line (see\n http://eslint.org/docs/developer-guide/nodejs-api#cliengine)." alist lsp-eslint-trace-server #[0 "\300\207" [#3="off"] 1 #3#] "Traces the communication between VSCode and the eslint linter service." string lsp-eslint-run #[0 "\300\207" [#4="onType"] 1 #4#] "Run the linter on save (onSave) or on type (onType)" (choice (const :tag "onSave" "onSave") (const :tag "onType" "onType")) (lsp-mode . "6.3") lsp-eslint-auto-fix-on-save #[0 "\300\207" [nil] 1] "Turns auto fix on save on or off." (lsp-mode . "6.3") lsp-eslint-fix-all-problem-type #[0 "\300\207" [#5="all"] 1 #5#] "Determines which problems are fixed when running the\nsource.fixAll code action." (choice (const "all") (const "problems") string) (lsp-mode . "7.0.1") lsp-eslint-quiet #[0 "\300\207" [nil] 1] "Turns on quiet mode, which ignores warnings." (lsp-mode . "6.3") lsp-eslint-working-directories #[0 "\300\207" [[]] 1] "" lsp-string-vector (lsp-mode . "6.3") lsp-eslint-validate #[0 "\300\207" [["javascript" "javascriptreact"]] 1] "An array of language ids which should be validated by ESLint" (lsp-mode . "6.3") lsp-eslint-provide-lint-task #[0 "\300\207" [nil] 1] "Controls whether a task for linting the whole workspace will be available." (lsp-mode . "6.3") lsp-eslint-lint-task-enable #[0 "\300\207" [nil] 1] (lsp-mode . "6.3") lsp-eslint-lint-task-options #[0 "\300\207" [#6="."] 1 #6#] "Command line options applied when running the task for linting the whole\nworkspace (see https://eslint.org/docs/user-guide/command-line-interface)." (lsp-mode . "6.3") lsp-eslint-runtime #[0 "\300\207" [nil] 1] "The location of the node binary to run ESLint under." (repeat string) (lsp-mode . "6.3") lsp-eslint-code-action-disable-rule-comment #[0 "\300\207" [((enable . t) (location . "separateLine"))] 1] (lsp-mode . "6.3") lsp-eslint-code-action-show-documentation #[0 "\300\207" [((enable . t))] 1] lsp-eslint-experimental-incremental-sync #[0 "\300\207" [t] 1] "Controls whether the new incremental text document synchronization should\nbe used." (lsp-mode . "6.3") lsp-eslint-save-library-choices #[0 "\300\207" [t] 1] "Controls whether to remember choices made to permit or deny ESLint libraries\nfrom running." (lsp-mode . "7.1") lsp-eslint-library-choices-file #[0 "\300\301\302!!\207" [expand-file-name locate-user-emacs-file ".lsp-eslint-choices"] 3] "The file where choices to permit or deny ESLint libraries from running is\nstored." (lsp-mode . "7.1")] 10) (defalias 'lsp--find-eslint #[0 "\302\303 \"\211\205\"\304\305\306 \307=\203\310\202\311$\312!\205 \211\262\262\206(\311\207" [default-directory system-type lsp-find-session-folder lsp-session f-join "node_modules" ".bin" windows-nt "eslint.cmd" "eslint" f-exists\?] 7]) #@38 Create default eslint configuration. (defalias 'lsp-eslint-create-default-configuration #[0 "\301 \211\302H\262\204\303\304!\210\305\306\301 \211\302H\262\"\211\204 \303\307!\207\211\310\311\312\313$\314\315\316\317 \"!)\207" [default-directory lsp-session 1 user-error "There are no workspace folders" -filter #[257 "\300\301\302\"\303\"\207" [-none\? make-closure #[257 "\301\302\300\"!\207" [V0 f-exists\? f-join] 5 "\n\n(fn FILE)"] (".eslintrc.js" ".eslintrc.yaml" ".eslintrc.yml" ".eslintrc" ".eslintrc.json")] 5 "\n\n(fn DIR)"] "All workspace folders contain eslint configuration" completing-read "Select project folder: " nil t async-shell-command format "%s --init" lsp--find-eslint] 7 (#$ . 5711) nil]) #@22 (fn INPUT0 INPUT1) (defalias 'lsp-eslint-status-handler #[514 "\302\303\"\211\304\305\306\307=\203\310\202\" =\203!\311\202\"\312#I\207" [lsp-eslint/status-error lsp-eslint/status-warn gethash "state" 18 propertize "ESLint" face error warn success] 12 (#$ . 6438)]) #@22 (fn INPUT0 INPUT1) (defalias 'lsp-eslint--configuration #[514 "\300\301\302\"\303\304\305\306\"\"\207" [nil gethash "items" apply vector seq-map #[257 "\306\307\"\310!\211\205q\311!\211\205o\312\313 \"\211\205mrq\210\314\315\316\317\320\321\322 F\323\324\n!\325 \2069\326\327\330\"\211\262\331\f\206?\332\333 \334\335\336\324)!\337\340\341!\342\343!F\344\345*\206`\320\321\346\347F\350+\206i\320\321DF\257)\262\262\207" [lsp-eslint-package-manager lsp-eslint-fix-all-problem-type lsp-eslint-format lsp-eslint-options lsp-eslint-run lsp-eslint-node-path gethash "scopeUri" lsp--uri-to-path find-buffer-visiting lsp-find-session-folder lsp-session :validate "probe" :packageManager :codeActionOnSave :enable t :mode :format lsp-json-bool :options make-hash-table :test equal :run "onType" :nodePath :onIgnoredFiles "off" :quiet :workspaceFolder :uri lsp--path-to-uri :name f-filename :codeAction :disableRuleComment :location "separateLine" :showDocumentation lsp-eslint-quiet lsp-eslint-code-action-disable-rule-comment lsp-eslint-code-action-show-documentation] 31 "\n\n(fn INPUT0)"]] 9 (#$ . 6725)]) #@41 Open documentation. (fn INPUT0 INPUT1) (defalias 'lsp-eslint--open-doc #[514 "\300\301\302\"\303!\207" [nil gethash "url" browse-url] 6 (#$ . 7860)]) #@44 Apply all autofixes in the current buffer. (defalias 'lsp-eslint-apply-all-fixes #[0 "\300\301\302\303 !\"\207" [lsp-send-execute-command "eslint.applyAllFixes" vector lsp--versioned-text-document-identifier] 4 (#$ . 8019) nil]) #@61 Perform the source.fixAll.eslint code action, if available. (defalias 'lsp-eslint-fix-all #[0 "\3001 \301\302!0\207\210\303\304!\205\305\306!\207" [(lsp-no-code-actions) lsp-execute-code-action-by-kind "source.fixAll.eslint" called-interactively-p any lsp--info "source.fixAll.eslint action not available"] 2 (#$ . 8254) nil]) (defalias 'lsp-eslint-server-command #[0 "\303!\203\207 \304\n\305\"\306BB\207" [lsp-eslint-server-command lsp-eslint-node lsp-eslint-unzipped-path lsp-eslint-server-exists\? f-join "extension/server/out/eslintServer.js" ("--stdio")] 4]) #@30 (fn ESLINT-SERVER-COMMAND) (defalias 'lsp-eslint-server-exists\? #[257 "\301\302@!!A@\211\205\303!\232\203\207\304@!\207" [lsp-eslint-node f-base f-filename file-exists-p executable-find] 6 (#$ . 8832)]) #@258 Hash table defining if a given path to an ESLint library is allowed to run. If the value for a key is 4, it will be allowed. If it is 1, it will not. If a value does not exist for the key, or the value is nil, the user will be prompted to allow or deny it. (defvar lsp-eslint--stored-libraries (make-hash-table :test 'equal) (#$ . 9055)) (byte-code "\303!\203 \203\304!\303\207" [lsp-eslint-library-choices-file lsp-eslint-save-library-choices lsp-eslint--stored-libraries file-exists-p lsp--read-from-file] 2) #@29 (fn INPUT0 INPUT1 INPUT2) (defalias 'lsp-eslint--confirm-local #[771 "\301\302\303\"\304\211\205\302\"\211\203!\207\305\306\307\"\310\311\"\312\313$#\207" [lsp-eslint--stored-libraries nil gethash "libraryPath" (("Always" 4 . t) ("Yes" 4) ("No" 1) ("Never" 1 . t)) lsp-ask-question format "Allow lsp-mode to execute %s?" mapcar car make-closure #[257 "\306\302\"A\211A\203\307\300@ #\210\f\203\310 \"\210\301@!\207" [V0 V1 V2 lsp-eslint--stored-libraries lsp-eslint-save-library-choices lsp-eslint-library-choices-file assoc puthash lsp--persist] 6 "\n\n(fn RESPONSE)"]] 16 (#$ . 9579)]) #@86 Called when the server detects a misconfiguration in ESLint. (fn WORKSPACE MESSAGE) (defalias 'lsp-eslint--probe-failed #[514 "\300\301!\207" [lsp--error "ESLint is not configured correctly. Please ensure your eslintrc is set up for the languages you are using."] 4 (#$ . 10202)]) (byte-code "\300\301\302\303\304\305\"\306\307\310\311\312\313\314\313\315\313\316\317\320\321\"\322\323\324#\210\211\262\325\317\320\321\"\322\326\327#\210\322\330\331#\210\322\332\333#\210\211\262\334\317\320\321\"\322\335\336#\210\211\262\337\340\341\342\343\344&!\207" [lsp-register-client make-lsp-client :new-connection lsp-stdio-connection #[0 "\300 \207" [lsp-eslint-server-command] 1] #[0 "\300\301 !\207" [lsp-eslint-server-exists\? lsp-eslint-server-command] 2] :activation-fn #[513 "\205\302\303\304\305#)\266\203\206\306\307\310\311\312$\207" [lsp-eslint-enable inhibit-changing-match-data "[^z-a]+\\.\\(?:html\\|jsx?\\|tsx?\\|vue\\)\\'" nil t string-match derived-mode-p js-mode js2-mode typescript-mode html-mode] 9 "\n\n(fn FILENAME &optional _)"] :priority -1 :completion-in-comments\? t :add-on\? :multi-root :notification-handlers make-hash-table :test equal puthash "eslint/status" lsp-eslint-status-handler :request-handlers "workspace/configuration" lsp-eslint--configuration "eslint/openDoc" lsp-eslint--open-doc "eslint/probeFailed" lsp-eslint--probe-failed :async-request-handlers "eslint/confirmESLintExecution" lsp-eslint--confirm-local :server-id eslint :initialized-fn #[257 "\211\301\302\303\304\305\306\307\310\311\312\313\314\315\"\313\314\316\"\313\314\317\"#\"&!)\207" [lsp--cur-workspace lsp--server-register-capability lsp-make-registration :id "random-id" :method "workspace/didChangeWatchedFiles" :register-options\? lsp-make-did-change-watched-files-registration-options :watchers vector lsp-make-file-system-watcher :glob-pattern "**/.eslintr{c.js,c.yaml,c.yml,c,c.json}" "**/.eslintignore" "**/package.json"] 16 "\n\n(fn WORKSPACE)"] :download-server-fn #[1028 "\300\301\302\303#\304!\210\305\306\307$\310\311\312\313\314#\315&\207" [make-temp-file "ext" nil ".zip" delete-file lsp-download-install make-closure #[128 "\3041 \305\302 \"\210\300 0\207\301!\207" [V0 V1 V2 lsp-eslint-unzipped-path (error) lsp-unzip] 4 "\n\n(fn &rest _)"] :url lsp-vscode-extension-url "dbaeumer" "vscode-eslint" "2.1.14" :store-path] 13 "\n\n(fn CLIENT CALLBACK ERROR-CALLBACK UPDATE\\=\\?)"]] 26) (defconst lsp-eslint-plist-value-when-compiled nil) (provide 'lsp-eslint)