;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\201R\320\201S&\210\310\201T\312\313\201UDD\201V\316\334\320\201W&\210\310\201X\312\313\201YDD\201V\316\334\320\201Z&\210\310\201[\312\313\201\\DD\201]\316\367\320\201^&\210\310\201_\312\313\201`DD\201a\316\201b\320\201c&\210\310\201d\312\313\201eDD\201f\316\201g\320\201h&\210\310\201i\312\313\201jDD\201k\316\201l\320\201m&\210\310\201n\312\313\201oDD\201p\316\201g\320\201q&\210\310\201r\312\313\201sDD\201t\316\201g\320\201u&\210\310\201v\312\313\201wDD\201x\316\201y\320\201z&\210\310\201{\312\313\201|DD\201}\316\334\320\201~&\210\310\201\312\313\201\200DD\201\201\316\334\320\201\202&\210\310\201\203\312\313\201\204DD\201\205\316\367\320\201\206&\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-2.1.23/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" [#8=[]] 1] "" lsp-string-vector (lsp-mode . "6.3") lsp-eslint-validate #[0 "\300\207" [("svelte")] 1] "An array of language ids which should always be validated by eslint." (repeat string) (lsp-mode . "7.1") 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" [t] 1] "Controls whether code actions to add a rule-disabling comment should be shown." bool (lsp-mode . "6.3") lsp-eslint-code-action-disable-rule-comment-location #[0 "\300\207" [#7="separateLine"] 1 #7#] "Controls where the disable rule code action places comments.\n\nAccepts the following values:\n- \"separateLine\": Add the comment above the line to be disabled (default).\n- \"sameLine\": Add the comment on the same line that will be disabled." (choice (const "separateLine") (const "sameLine")) (lsp-mode . "7.1") lsp-eslint-code-action-show-documentation #[0 "\300\207" [t] 1] "Controls whether code actions to show documentation for an eslint rule should\nbe shown." (lsp-mode . "7.1") lsp-eslint-warn-on-ignored-files #[0 "\300\207" [nil] 1] "Controls whether a warning should be emitted when a file is ignored." (lsp-mode . "7.1") lsp-eslint-rules-customizations #[0 "\300\207" [#8#] 1] "Controls severity overrides for eslint rules.\n\nThe value is a vector of alists, with each alist containing the following keys:\n- rule - The rule to match. Can match wildcards with *, or be prefixed with !\n to negate the match.\n- severity - The severity to report this rule as. Can be one of the following:\n - \"off\": Disable the rule.\n - \"info\": Report as informational.\n - \"warn\": Report as a warning.\n - \"error\": Report as an error.\n - \"upgrade\": Increase by 1 severity level (eg. warning -> error).\n - \"downgrade\": Decrease by 1 severity level (eg. warning -> info).\n - \"default\": Report as the same severity specified in the eslint config." (lsp-repeatable-vector (alist :options ((rule string) (severity (choice (const "off") (const "info") (const "warn") (const "error") (const "upgrade") (const "downgrade") (const "default")))))) (lsp-mode . "7.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 "\302 \303!>\204\304\305\302D\"\210\211\306H\262\204\307\310!\210\311\312\302 \303!>\2040\304\305\302D\"\210\211\306H\262\"\211\204>\307\313!\207\211\314\315\316\317$\320\321\322\323 \"!)\207" [cl-struct-lsp-session-tags default-directory lsp-session type-of signal wrong-type-argument 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 (#$ . 7581) nil]) #@22 (fn INPUT0 INPUT1) (defalias 'lsp-eslint-status-handler #[514 "\303\304\"\305!>\204\306\307\310D\"\210\211\311\312\313\314 =\203%\315\2021\n=\2030\316\2021\317#I\207" [cl-struct-lsp--workspace-tags lsp-eslint/status-error lsp-eslint/status-warn gethash "state" type-of signal wrong-type-argument lsp--workspace 18 propertize "ESLint" face error warn success] 12 (#$ . 8438)]) #@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\205\205\311!\211\205\203\312\313 \"\211\205\201rq\210\314\315 \235\203+\316\202,\317\320 \321\322\323\324\n!\325 F\326\323\324\f!DF\327\323\324 !\330*F\331\324+!\332\324,!\333-\203[\334\202\\\335\336.\206i\337\340\341\"\211\262\342/\3430\3441\345\346\347!\350\351!F\257)\262\262\207" [lsp-eslint-validate lsp-eslint-package-manager lsp-eslint-code-action-disable-rule-comment lsp-eslint-code-action-disable-rule-comment-location lsp-eslint-code-action-show-documentation lsp-eslint-auto-fix-on-save gethash "scopeUri" lsp--uri-to-path find-buffer-visiting lsp-find-session-folder lsp-session :validate lsp-buffer-language "on" "probe" :packageManager :codeAction :disableRuleComment :enable lsp-json-bool :location :showDocumentation :codeActionOnSave :mode :format :quiet :onIgnoredFiles "warn" "off" :options make-hash-table :test equal :rulesCustomizations :run :nodePath :workspaceFolder :uri lsp--path-to-uri :name f-filename lsp-eslint-fix-all-problem-type lsp-eslint-format lsp-eslint-quiet lsp-eslint-warn-on-ignored-files lsp-eslint-options lsp-eslint-rules-customizations lsp-eslint-run lsp-eslint-node-path] 33 "\n\n(fn INPUT0)"]] 9 (#$ . 8838)]) #@41 Open documentation. (fn INPUT0 INPUT1) (defalias 'lsp-eslint--open-doc #[514 "\300\301\302\"\303!\207" [nil gethash "url" browse-url] 6 (#$ . 10208)]) #@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 (#$ . 10368) 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 (#$ . 10604) 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 (#$ . 11183)]) #@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) (#$ . 11407)) (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? Note: The latest versions of the ESLint language server no longer create this prompt." 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 (#$ . 11932)]) #@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 (#$ . 12642)]) (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\313%\207" [lsp-eslint-enable inhibit-changing-match-data "[^z-a]+\\.\\(?:html\\|jsx?\\|svelte\\|tsx?\\|vue\\)\\'" nil t string-match derived-mode-p js-mode js2-mode typescript-mode html-mode svelte-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.23" :store-path] 13 "\n\n(fn CLIENT CALLBACK ERROR-CALLBACK UPDATE\\=\\?)"]] 26) (defconst lsp-eslint-plist-value-when-compiled nil) (provide 'lsp-eslint)