stylelint / vscode-stylelint

The official Visual Studio Code extension for Stylelint
https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint
MIT License
315 stars 29 forks source link

[Bug]: Undefined rule custom-property-no-missing-var-function #360

Closed jamsea closed 2 years ago

jamsea commented 2 years ago

How did you encounter this bug?

Whenever I open any CSS file I see this error: image

Replacing .stylelintrc.json contents with an empty object {} makes the error go away. However, it also causes stylelint to not lint in the first place :).

I don't see this error when running stylelint from the command line or in pull requests.

Here's a link to a branch that has the error: https://github.com/jamsea/blog-jameshush-com/pull/13/files

Code Snippet

Opening any css file

Stylelint Configuration

{
  "extends": ["stylelint-config-recommended", "stylelint-config-prettier"],
  "rules": {
    "at-rule-no-unknown": [
      true,
      {
        "ignoreAtRules": ["extends", "tailwind"]
      }
    ],
    "block-no-empty": null
  }
}

Extension Configuration

{
  "css.validate": false,
  "less.validate": false,
  "scss.validate": false,
  "stylelint.enable": true,
  "stylelint.configFile": ".stylelintrc.json",
  "editor.codeActionsOnSave": {
    "source.fixAll": true
  }
}

Actual Behaviour

The editor shows an error message.

Expected Behaviour

The editor does not show an error message.

Logs

[Info - 5:53:46 PM] [language-server] Registering module | module: "auto-fix" [Info - 5:53:46 PM] [language-server] Module registered | module: "auto-fix" [Info - 5:53:46 PM] [language-server] Registering module | module: "code-action" [Info - 5:53:46 PM] [language-server] Module registered | module: "code-action" [Info - 5:53:46 PM] [language-server] Registering module | module: "completion" [Info - 5:53:46 PM] [language-server] Module registered | module: "completion" [Info - 5:53:46 PM] [language-server] Registering module | module: "formatter" [Info - 5:53:46 PM] [language-server] Module registered | module: "formatter" [Info - 5:53:46 PM] [language-server] Registering module | module: "old-stylelint-warning" [Info - 5:53:46 PM] [language-server] Module registered | module: "old-stylelint-warning" [Info - 5:53:46 PM] [language-server] Registering module | module: "validator" [Info - 5:53:46 PM] [language-server] Module registered | module: "validator" [Info - 5:53:46 PM] [language-server] Starting language server [Info - 5:53:46 PM] [language-server] Registering handlers [Debug - 5:53:46 p.m.] [language-server] connection.onInitialize handler registered [Debug - 5:53:46 p.m.] [language-server] connection.onInitialized handler registered [Debug - 5:53:46 p.m.] [language-server] Registering ExecuteCommandRequest handler [Debug - 5:53:46 p.m.] [language-server] ExecuteCommandRequest handler registered [Debug - 5:53:46 p.m.] [language-server] connection.onDidChangeConfiguration handler registered [Debug - 5:53:46 p.m.] [language-server] documents.onDidClose handler registered [Debug - 5:53:46 p.m.] [language-server] Invoking onDidRegisterHandlers [Debug - 5:53:46 p.m.] [language-server:auto-fix] Registering onExecuteCommand handler [Debug - 5:53:46 p.m.] [language-server] Registering command | command: "stylelint.applyAutoFix" [Debug - 5:53:46 p.m.] [language-server] Invoked onDidRegisterHandlers | module: "auto-fix" returnValue: undefined [Debug - 5:53:46 p.m.] [language-server:code-action] Registering onCodeAction handler [Debug - 5:53:46 p.m.] [language-server:code-action] onCodeAction handler registered [Debug - 5:53:46 p.m.] [language-server] Registering command | command: "stylelint.openRuleDoc" [Debug - 5:53:46 p.m.] [language-server] Invoked onDidRegisterHandlers | module: "code-action" returnValue: undefined [Debug - 5:53:46 p.m.] [language-server:completion] Registering onCompletion handler [Debug - 5:53:46 p.m.] [language-server:completion] onCompletion handler registered [Debug - 5:53:46 p.m.] [language-server] Invoked onDidRegisterHandlers | module: "completion" returnValue: undefined [Debug - 5:53:46 p.m.] [language-server:formatter] Registering connection.onDocumentFormatting handler [Debug - 5:53:46 p.m.] [language-server:formatter] connection.onDocumentFormatting handler registered [Debug - 5:53:46 p.m.] [language-server:formatter] Registering documents.onDidOpen handler [Debug - 5:53:46 p.m.] [language-server:formatter] documents.onDidOpen handler registered [Debug - 5:53:46 p.m.] [language-server:formatter] Registering documents.onDidChangeContent handler [Debug - 5:53:46 p.m.] [language-server:formatter] documents.onDidChangeContent handler registered [Debug - 5:53:46 p.m.] [language-server:formatter] Registering documents.onDidSave handler [Debug - 5:53:46 p.m.] [language-server:formatter] documents.onDidSave handler registered [Debug - 5:53:46 p.m.] [language-server:formatter] Registering documents.onDidClose handler [Debug - 5:53:46 p.m.] [language-server:formatter] documents.onDidClose handler registered [Debug - 5:53:46 p.m.] [language-server:formatter] Registering DidChangeConfigurationNotification [Debug - 5:53:46 p.m.] [language-server:formatter] DidChangeConfigurationNotification registered [Debug - 5:53:46 p.m.] [language-server:formatter] Registering DidChangeWorkspaceFoldersNotification [Debug - 5:53:46 p.m.] [language-server:formatter] DidChangeWorkspaceFoldersNotification registered [Debug - 5:53:46 p.m.] [language-server] Invoked onDidRegisterHandlers | module: "formatter" returnValue: undefined [Debug - 5:53:46 p.m.] [language-server:old-stylelint-warning] Registering onDidOpen handler [Debug - 5:53:46 p.m.] [language-server:old-stylelint-warning] onDidOpen handler registered [Debug - 5:53:46 p.m.] [language-server] Invoked onDidRegisterHandlers | module: "old-stylelint-warning" returnValue: undefined [Debug - 5:53:46 p.m.] [language-server:validator] Registering handlers [Debug - 5:53:46 p.m.] [language-server:validator] onDidChangeWatchedFiles handler registered [Debug - 5:53:46 p.m.] [language-server:validator] onDidChangeContent handler registered [Debug - 5:53:46 p.m.] [language-server:validator] onDidClose handler registered [Debug - 5:53:46 p.m.] [language-server:validator] Handlers registered [Debug - 5:53:46 p.m.] [language-server] Invoked onDidRegisterHandlers | module: "validator" returnValue: undefined [Info - 5:53:46 PM] [language-server] Handlers registered [Info - 5:53:46 PM] [language-server] Language server started [Debug - 5:53:46 p.m.] [language-server] received onInitialize | params: {"processId":93387,"clientInfo":{"name":"Visual Studio Code","version":"1.63.2"},"locale":"en-us","rootPath":"/Users/jamsea/git/blog-jameshush-com","rootUri":"file:///Users/jamsea/git/blog-jameshush-com","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"],"failureHandling":"textOnlyTransactional","normalizesLineEndings":true,"changeAnnotationSupport":{"groupsOnLabel":true}},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"codeLens":{"refreshSupport":true},"executeCommand":{"dynamicRegistration":true},"configuration":true,"workspaceFolders":true,"semanticTokens":{"refreshSupport":true},"fileOperations":{"dynamicRegistration":true,"didCreate":true,"didRename":true,"didDelete":true,"willCreate":true,"willRename":true,"willDelete":true}},"textDocument":{"publishDiagnostics":{"relatedInformation":true,"versionSupport":false,"tagSupport":{"valueSet":[1,2]},"codeDescriptionSupport":true,"dataSupport":true},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true,"tagSupport":{"valueSet":[1]},"insertReplaceSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"insertTextModeSupport":{"valueSet":[1,2]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true},"activeParameterSupport":true},"contextSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true,"tagSupport":{"valueSet":[1]},"labelSupport":true},"codeAction":{"dynamicRegistration":true,"isPreferredSupport":true,"disabledSupport":true,"dataSupport":true,"resolveSupport":{"properties":["edit"]},"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"honorsChangeAnnotations":false},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true,"prepareSupportDefaultBehavior":1,"honorsChangeAnnotations":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"selectionRange":{"dynamicRegistration":true},"callHierarchy":{"dynamicRegistration":true},"semanticTokens":{"dynamicRegistration":true,"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator"],"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"formats":["relative"],"requests":{"range":true,"full":{"delta":true}},"multilineTokenSupport":false,"overlappingTokenSupport":false},"linkedEditingRange":{"dynamicRegistration":true}},"window":{"showMessage":{"messageActionItem":{"additionalPropertiesSupport":true}},"showDocument":{"support":true},"workDoneProgress":true},"general":{"regularExpressions":{"engine":"ECMAScript","version":"ES2020"},"markdown":{"parser":"marked","version":"1.1.0"}}},"trace":"off","workspaceFolders":[{"uri":"file:///Users/jamsea/git/blog-jameshush-com","name":"blog-jameshush-com"}]} [Debug - 5:53:46 p.m.] [language-server] Client reports workspace configuration support; using scoped configuration [Debug - 5:53:46 p.m.] [language-server] Invoking onInitialize [Debug - 5:53:46 p.m.] [language-server] Invoked onInitialize | module: "auto-fix" returnValue: {"capabilities":{"executeCommandProvider":{"commands":["stylelint.applyAutoFix"]}}} [Debug - 5:53:46 p.m.] [language-server] Invoked onInitialize | module: "code-action" returnValue: {"capabilities":{"codeActionProvider":{"codeActionKinds":["quickfix","source.fixAll.stylelint"]},"executeCommandProvider":{"commands":["stylelint.openRuleDoc"]}}} [Debug - 5:53:46 p.m.] [language-server] Invoked onInitialize | module: "completion" returnValue: {"capabilities":{"completionProvider":{}}} [Debug - 5:53:46 p.m.] [language-server] Invoked onInitialize | module: "formatter" returnValue: {"capabilities":{"documentFormattingProvider":false}} [Debug - 5:53:46 p.m.] [language-server] Invoked onInitialize | module: "old-stylelint-warning" returnValue: undefined [Debug - 5:53:46 p.m.] [language-server] Invoked onInitialize | module: "validator" returnValue: undefined [Debug - 5:53:46 p.m.] [language-server] Returning initialization results | result: {"capabilities":{"textDocumentSync":{"openClose":true,"change":1},"executeCommandProvider":{"commands":["stylelint.applyAutoFix","stylelint.openRuleDoc"]},"codeActionProvider":{"codeActionKinds":["quickfix","source.fixAll.stylelint"]},"completionProvider":{},"documentFormattingProvider":false}} [Debug - 5:53:46 p.m.] [language-server] Received notification | notificationType: {"method":"initialized","numberOfParams":1,"_parameterStructures":{"kind":"byName"}} params: [{}] [Debug - 5:53:46 p.m.] [language-server] received onInitialized | params: {} [Debug - 5:53:46 p.m.] [language-server] Registering DidChangeConfigurationNotification [Debug - 5:53:46 p.m.] [language-server] Requesting options from client | resource: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" [Debug - 5:53:46 p.m.] [language-server] Requesting options from client | resource: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" [Debug - 5:53:46 p.m.] [language-server] Requesting options from client | resource: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" [Debug - 5:53:46 p.m.] [language-server] Requesting options from client | resource: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" [Debug - 5:53:46 p.m.] [language-server] Received notification | notificationType: {"method":"workspace/didChangeConfiguration","numberOfParams":1,"_parameterStructures":{"kind":"byName"}} params: [{"settings":{"stylelint":{"enable":true,"config":null,"configOverrides":null,"codeAction":{"disableRuleComment":{"location":"separateLine"}},"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"reportNeedlessDisables":true,"reportInvalidScopeDisables":true,"stylelintPath":"","packageManager":"npm","validate":["css","less","postcss"],"snippet":["css","less","postcss"]}}}] [Debug - 5:53:46 p.m.] [language-server] received onDidChangeConfiguration, clearing cached options | params: {"settings":{"stylelint":{"enable":true,"config":null,"configOverrides":null,"codeAction":{"disableRuleComment":{"location":"separateLine"}},"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"reportNeedlessDisables":true,"reportInvalidScopeDisables":true,"stylelintPath":"","packageManager":"npm","validate":["css","less","postcss"],"snippet":["css","less","postcss"]}}} [Debug - 5:53:46 p.m.] [language-server] Invoking onDidChangeConfiguration [Debug - 5:53:46 p.m.] [language-server:validator] Received onDidChangeConfiguration [Debug - 5:53:46 p.m.] [language-server] Requesting options from client | resource: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" [Debug - 5:53:46 p.m.] [language-server] Invoked onDidChangeConfiguration | module: "validator" returnValue: {} [Debug - 5:53:46 p.m.] [language-server:code-action] Received onCodeAction | uri: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" context: {"diagnostics":[]} [Debug - 5:53:46 p.m.] [language-server] Requesting options from client | resource: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" [Debug - 5:53:46 p.m.] [language-server] Received options from client | resource: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" options: {"enable":true,"config":null,"configOverrides":null,"codeAction":{"disableRuleComment":{"location":"separateLine"}},"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"reportNeedlessDisables":true,"reportInvalidScopeDisables":true,"stylelintPath":"","packageManager":"npm","validate":["css","less","postcss"],"snippet":["css","less","postcss"]} [Debug - 5:53:46 p.m.] [language-server] Returning options | resource: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" options: {"codeAction":{"disableRuleComment":{"location":"separateLine"}},"config":null,"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"packageManager":"npm","reportInvalidScopeDisables":true,"reportNeedlessDisables":true,"snippet":["css","less","postcss"],"stylelintPath":"","validate":["css","less","postcss"]} [Debug - 5:53:46 p.m.] [language-server:formatter] Registering formatter for document | uri: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" options: {"documentSelector":[{"scheme":"file","pattern":"/Users/jamsea/git/blog-jameshush-com/src/style.css"}]} [Debug - 5:53:46 p.m.] [language-server] Received options from client | resource: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" options: {"enable":true,"config":null,"configOverrides":null,"codeAction":{"disableRuleComment":{"location":"separateLine"}},"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"reportNeedlessDisables":true,"reportInvalidScopeDisables":true,"stylelintPath":"","packageManager":"npm","validate":["css","less","postcss"],"snippet":["css","less","postcss"]} [Debug - 5:53:46 p.m.] [language-server] Returning options | resource: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" options: {"codeAction":{"disableRuleComment":{"location":"separateLine"}},"config":null,"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"packageManager":"npm","reportInvalidScopeDisables":true,"reportNeedlessDisables":true,"snippet":["css","less","postcss"],"stylelintPath":"","validate":["css","less","postcss"]} [Debug - 5:53:46 p.m.] [language-server] Received options from client | resource: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" options: {"enable":true,"config":null,"configOverrides":null,"codeAction":{"disableRuleComment":{"location":"separateLine"}},"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"reportNeedlessDisables":true,"reportInvalidScopeDisables":true,"stylelintPath":"","packageManager":"npm","validate":["css","less","postcss"],"snippet":["css","less","postcss"]} [Debug - 5:53:46 p.m.] [language-server] Returning options | resource: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" options: {"codeAction":{"disableRuleComment":{"location":"separateLine"}},"config":null,"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"packageManager":"npm","reportInvalidScopeDisables":true,"reportNeedlessDisables":true,"snippet":["css","less","postcss"],"stylelintPath":"","validate":["css","less","postcss"]} [Debug - 5:53:46 p.m.] [language-server] Received options from client | resource: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" options: {"enable":true,"config":null,"configOverrides":null,"codeAction":{"disableRuleComment":{"location":"separateLine"}},"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"reportNeedlessDisables":true,"reportInvalidScopeDisables":true,"stylelintPath":"","packageManager":"npm","validate":["css","less","postcss"],"snippet":["css","less","postcss"]} [Debug - 5:53:46 p.m.] [language-server] Returning options | resource: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" options: {"codeAction":{"disableRuleComment":{"location":"separateLine"}},"config":null,"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"packageManager":"npm","reportInvalidScopeDisables":true,"reportNeedlessDisables":true,"snippet":["css","less","postcss"],"stylelintPath":"","validate":["css","less","postcss"]} [Debug - 5:53:46 p.m.] [language-server] Linting document | uri: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" linterOptions: {} [Debug - 5:53:46 p.m.] [language-server] Returning cached options | resource: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" [Debug - 5:53:46 p.m.] [language-server] Received options from client | resource: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" options: {"enable":true,"config":null,"configOverrides":null,"codeAction":{"disableRuleComment":{"location":"separateLine"}},"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"reportNeedlessDisables":true,"reportInvalidScopeDisables":true,"stylelintPath":"","packageManager":"npm","validate":["css","less","postcss"],"snippet":["css","less","postcss"]} [Debug - 5:53:46 p.m.] [language-server] Returning options | resource: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" options: {"codeAction":{"disableRuleComment":{"location":"separateLine"}},"config":null,"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"packageManager":"npm","reportInvalidScopeDisables":true,"reportNeedlessDisables":true,"snippet":["css","less","postcss"],"stylelintPath":"","validate":["css","less","postcss"]} [Debug - 5:53:46 p.m.] [language-server] Linting document | uri: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" linterOptions: {} [Debug - 5:53:46 p.m.] [language-server] Returning cached options | resource: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" [Debug - 5:53:46 p.m.] [language-server] Received options from client | resource: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" options: {"enable":true,"config":null,"configOverrides":null,"codeAction":{"disableRuleComment":{"location":"separateLine"}},"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"reportNeedlessDisables":true,"reportInvalidScopeDisables":true,"stylelintPath":"","packageManager":"npm","validate":["css","less","postcss"],"snippet":["css","less","postcss"]} [Debug - 5:53:46 p.m.] [language-server] Returning options | resource: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" options: {"codeAction":{"disableRuleComment":{"location":"separateLine"}},"config":null,"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"packageManager":"npm","reportInvalidScopeDisables":true,"reportNeedlessDisables":true,"snippet":["css","less","postcss"],"stylelintPath":"","validate":["css","less","postcss"]} [Debug - 5:53:46 p.m.] [language-server:code-action] Creating code actions | only: undefined [Debug - 5:53:46 p.m.] [language-server:code-action] Returning code actions | actions: [] [Debug - 5:53:46 p.m.] [language-server] Resolving Stylelint | uri: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" [Debug - 5:53:46 p.m.] [language-server] Returning cached options | resource: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" [Debug - 5:53:46 p.m.] [language-server:code-action] Received onCodeAction | uri: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" context: {"diagnostics":[]} [Debug - 5:53:46 p.m.] [language-server] Returning cached options | resource: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" [Debug - 5:53:46 p.m.] [language-server:code-action] Creating code actions | only: undefined [Debug - 5:53:46 p.m.] [language-server:code-action] Returning code actions | actions: [] [Debug - 5:53:46 p.m.] [language-server] npm returned global node_modules path. | path: "/Users/jamsea/.nvm/versions/node/v17.0.1/lib/node_modules" [Debug - 5:53:46 p.m.] [language-server] npm returned global node_modules path. | path: "/Users/jamsea/.nvm/versions/node/v17.0.1/lib/node_modules" [Debug - 5:53:46 p.m.] [language-server] npm returned global node_modules path. | path: "/Users/jamsea/.nvm/versions/node/v17.0.1/lib/node_modules" [Debug - 5:53:46 p.m.] [language-server] Could not find a Yarn lockfile | cwd: "/Users/jamsea/git/blog-jameshush-com/src" [Debug - 5:53:46 p.m.] [language-server] NODE_PATH value is: /Users/jamsea/.nvm/versions/node/v17.0.1/lib/node_modules | verbose: undefined [Debug - 5:53:46 p.m.] [language-server] Could not find a Yarn lockfile | cwd: "/Users/jamsea/git/blog-jameshush-com/src" [Debug - 5:53:46 p.m.] [language-server] NODE_PATH value is: /Users/jamsea/.nvm/versions/node/v17.0.1/lib/node_modules | verbose: undefined [Debug - 5:53:46 p.m.] [language-server] Could not find a Yarn lockfile | cwd: "/Users/jamsea/git/blog-jameshush-com/src" [Debug - 5:53:46 p.m.] [language-server] NODE_PATH value is: /Users/jamsea/.nvm/versions/node/v17.0.1/lib/node_modules | verbose: undefined [Debug - 5:53:46 p.m.] [language-server] Resolved Stylelint from node_modules | path: "/Users/jamsea/git/blog-jameshush-com/node_modules/stylelint/lib/index.js" [Debug - 5:53:46 p.m.] [language-server] Running Stylelint | options: {"configFile":".stylelintrc.json","ignoreDisables":false,"reportNeedlessDisables":true,"reportInvalidScopeDisables":true,"ignorePath":"/Users/jamsea/git/blog-jameshush-com/.stylelintignore","code":"...","codeFilename":"/Users/jamsea/git/blog-jameshush-com/src/style.css"} [Debug - 5:53:46 p.m.] [language-server] Resolved Stylelint from node_modules | path: "/Users/jamsea/git/blog-jameshush-com/node_modules/stylelint/lib/index.js" [Debug - 5:53:46 p.m.] [language-server] Running Stylelint | options: {"configFile":".stylelintrc.json","ignoreDisables":false,"reportNeedlessDisables":true,"reportInvalidScopeDisables":true,"ignorePath":"/Users/jamsea/git/blog-jameshush-com/.stylelintignore","code":"...","codeFilename":"/Users/jamsea/git/blog-jameshush-com/src/style.css"} [Debug - 5:53:46 p.m.] [language-server] Resolved Stylelint from node_modules | path: "/Users/jamsea/git/blog-jameshush-com/node_modules/stylelint/lib/index.js" [Debug - 5:53:46 p.m.] [language-server] Stylelint resolved | uri: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" resolvedPath: "/Users/jamsea/git/blog-jameshush-com/node_modules/stylelint/lib/index.js" [Debug - 5:53:47 p.m.] [language-server] Lint run complete | uri: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" results: {"diagnostics":[]} [Debug - 5:53:47 p.m.] [language-server:validator] Sending diagnostics | uri: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" result: {"diagnostics":[]} [Debug - 5:53:47 p.m.] [language-server:validator] Diagnostics sent | uri: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" [Debug - 5:53:47 p.m.] [language-server] Lint run complete | uri: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" results: {"diagnostics":[]} [Debug - 5:53:47 p.m.] [language-server:validator] Sending diagnostics | uri: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" result: {"diagnostics":[]} [Debug - 5:53:47 p.m.] [language-server:validator] Diagnostics sent | uri: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" [Debug - 5:53:47 p.m.] [language-server:code-action] Received onCodeAction | uri: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" context: {"diagnostics":[]} [Debug - 5:53:47 p.m.] [language-server] Returning cached options | resource: "file:///Users/jamsea/git/blog-jameshush-com/src/style.css" [Debug - 5:53:47 p.m.] [language-server:code-action] Creating code actions | only: undefined [Debug - 5:53:47 p.m.] [language-server:code-action] Returning code actions | actions: [] [Debug - 5:53:53 p.m.] [language-server] Requesting options from client | resource: "file:///Users/jamsea/Library/Application%20Support/Code/User/settings.json" [Debug - 5:53:53 p.m.] [language-server] Requesting options from client | resource: "file:///Users/jamsea/Library/Application%20Support/Code/User/settings.json" [Debug - 5:53:53 p.m.] [language-server] Requesting options from client | resource: "file:///Users/jamsea/Library/Application%20Support/Code/User/settings.json" [Debug - 5:53:53 p.m.] [language-server] Requesting options from client | resource: "file:///Users/jamsea/Library/Application%20Support/Code/User/settings.json" [Debug - 5:53:53 p.m.] [language-server] received documents.onDidClose, clearing cached options | uri: "file:///Users/jamsea/Library/Application%20Support/Code/User/settings.json" [Debug - 5:53:53 p.m.] [language-server:validator] Clearing diagnostics for document | uri: "file:///Users/jamsea/Library/Application%20Support/Code/User/settings.json" [Debug - 5:53:53 p.m.] [language-server:validator] Diagnostics cleared | uri: "file:///Users/jamsea/Library/Application%20Support/Code/User/settings.json" [Debug - 5:53:53 p.m.] [language-server] Received options from client | resource: "file:///Users/jamsea/Library/Application%20Support/Code/User/settings.json" options: {"enable":true,"config":null,"configOverrides":null,"codeAction":{"disableRuleComment":{"location":"separateLine"}},"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"reportNeedlessDisables":true,"reportInvalidScopeDisables":true,"stylelintPath":"","packageManager":"npm","validate":["css","less","postcss"],"snippet":["css","less","postcss"]} [Debug - 5:53:53 p.m.] [language-server] Returning options | resource: "file:///Users/jamsea/Library/Application%20Support/Code/User/settings.json" options: {"codeAction":{"disableRuleComment":{"location":"separateLine"}},"config":null,"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"packageManager":"npm","reportInvalidScopeDisables":true,"reportNeedlessDisables":true,"snippet":["css","less","postcss"],"stylelintPath":"","validate":["css","less","postcss"]} [Debug - 5:53:53 p.m.] [language-server] Received options from client | resource: "file:///Users/jamsea/Library/Application%20Support/Code/User/settings.json" options: {"enable":true,"config":null,"configOverrides":null,"codeAction":{"disableRuleComment":{"location":"separateLine"}},"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"reportNeedlessDisables":true,"reportInvalidScopeDisables":true,"stylelintPath":"","packageManager":"npm","validate":["css","less","postcss"],"snippet":["css","less","postcss"]} [Debug - 5:53:53 p.m.] [language-server] Returning options | resource: "file:///Users/jamsea/Library/Application%20Support/Code/User/settings.json" options: {"codeAction":{"disableRuleComment":{"location":"separateLine"}},"config":null,"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"packageManager":"npm","reportInvalidScopeDisables":true,"reportNeedlessDisables":true,"snippet":["css","less","postcss"],"stylelintPath":"","validate":["css","less","postcss"]} [Debug - 5:53:53 p.m.] [language-server:old-stylelint-warning] Document should not be validated, ignoring | uri: "file:///Users/jamsea/Library/Application%20Support/Code/User/settings.json" language: "jsonc" [Debug - 5:53:53 p.m.] [language-server] Received options from client | resource: "file:///Users/jamsea/Library/Application%20Support/Code/User/settings.json" options: {"enable":true,"config":null,"configOverrides":null,"codeAction":{"disableRuleComment":{"location":"separateLine"}},"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"reportNeedlessDisables":true,"reportInvalidScopeDisables":true,"stylelintPath":"","packageManager":"npm","validate":["css","less","postcss"],"snippet":["css","less","postcss"]} [Debug - 5:53:53 p.m.] [language-server] Returning options | resource: "file:///Users/jamsea/Library/Application%20Support/Code/User/settings.json" options: {"codeAction":{"disableRuleComment":{"location":"separateLine"}},"config":null,"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"packageManager":"npm","reportInvalidScopeDisables":true,"reportNeedlessDisables":true,"snippet":["css","less","postcss"],"stylelintPath":"","validate":["css","less","postcss"]} [Debug - 5:53:53 p.m.] [language-server] Received options from client | resource: "file:///Users/jamsea/Library/Application%20Support/Code/User/settings.json" options: {"enable":true,"config":null,"configOverrides":null,"codeAction":{"disableRuleComment":{"location":"separateLine"}},"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"reportNeedlessDisables":true,"reportInvalidScopeDisables":true,"stylelintPath":"","packageManager":"npm","validate":["css","less","postcss"],"snippet":["css","less","postcss"]} [Debug - 5:53:53 p.m.] [language-server] Returning options | resource: "file:///Users/jamsea/Library/Application%20Support/Code/User/settings.json" options: {"codeAction":{"disableRuleComment":{"location":"separateLine"}},"config":null,"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"packageManager":"npm","reportInvalidScopeDisables":true,"reportNeedlessDisables":true,"snippet":["css","less","postcss"],"stylelintPath":"","validate":["css","less","postcss"]} [Debug - 5:53:53 p.m.] [language-server:validator] Document should not be validated, ignoring | uri: "file:///Users/jamsea/Library/Application%20Support/Code/User/settings.json" language: "jsonc" [Debug - 5:53:53 p.m.] [language-server] Requesting options from client | resource: "file:///Users/jamsea/Library/Application%20Support/Code/User/keybindings.json" [Debug - 5:53:53 p.m.] [language-server] Requesting options from client | resource: "file:///Users/jamsea/Library/Application%20Support/Code/User/keybindings.json" [Debug - 5:53:53 p.m.] [language-server] Requesting options from client | resource: "file:///Users/jamsea/Library/Application%20Support/Code/User/keybindings.json" [Debug - 5:53:53 p.m.] [language-server] Requesting options from client | resource: "file:///Users/jamsea/Library/Application%20Support/Code/User/keybindings.json" [Debug - 5:53:53 p.m.] [language-server] received documents.onDidClose, clearing cached options | uri: "file:///Users/jamsea/Library/Application%20Support/Code/User/keybindings.json" [Debug - 5:53:53 p.m.] [language-server:validator] Clearing diagnostics for document | uri: "file:///Users/jamsea/Library/Application%20Support/Code/User/keybindings.json" [Debug - 5:53:53 p.m.] [language-server:validator] Diagnostics cleared | uri: "file:///Users/jamsea/Library/Application%20Support/Code/User/keybindings.json" [Debug - 5:53:53 p.m.] [language-server] Received options from client | resource: "file:///Users/jamsea/Library/Application%20Support/Code/User/keybindings.json" options: {"enable":true,"config":null,"configOverrides":null,"codeAction":{"disableRuleComment":{"location":"separateLine"}},"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"reportNeedlessDisables":true,"reportInvalidScopeDisables":true,"stylelintPath":"","packageManager":"npm","validate":["css","less","postcss"],"snippet":["css","less","postcss"]} [Debug - 5:53:53 p.m.] [language-server] Returning options | resource: "file:///Users/jamsea/Library/Application%20Support/Code/User/keybindings.json" options: {"codeAction":{"disableRuleComment":{"location":"separateLine"}},"config":null,"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"packageManager":"npm","reportInvalidScopeDisables":true,"reportNeedlessDisables":true,"snippet":["css","less","postcss"],"stylelintPath":"","validate":["css","less","postcss"]} [Debug - 5:53:53 p.m.] [language-server] Received options from client | resource: "file:///Users/jamsea/Library/Application%20Support/Code/User/keybindings.json" options: {"enable":true,"config":null,"configOverrides":null,"codeAction":{"disableRuleComment":{"location":"separateLine"}},"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"reportNeedlessDisables":true,"reportInvalidScopeDisables":true,"stylelintPath":"","packageManager":"npm","validate":["css","less","postcss"],"snippet":["css","less","postcss"]} [Debug - 5:53:53 p.m.] [language-server] Returning options | resource: "file:///Users/jamsea/Library/Application%20Support/Code/User/keybindings.json" options: {"codeAction":{"disableRuleComment":{"location":"separateLine"}},"config":null,"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"packageManager":"npm","reportInvalidScopeDisables":true,"reportNeedlessDisables":true,"snippet":["css","less","postcss"],"stylelintPath":"","validate":["css","less","postcss"]} [Debug - 5:53:53 p.m.] [language-server:old-stylelint-warning] Document should not be validated, ignoring | uri: "file:///Users/jamsea/Library/Application%20Support/Code/User/keybindings.json" language: "jsonc" [Debug - 5:53:53 p.m.] [language-server] Received options from client | resource: "file:///Users/jamsea/Library/Application%20Support/Code/User/keybindings.json" options: {"enable":true,"config":null,"configOverrides":null,"codeAction":{"disableRuleComment":{"location":"separateLine"}},"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"reportNeedlessDisables":true,"reportInvalidScopeDisables":true,"stylelintPath":"","packageManager":"npm","validate":["css","less","postcss"],"snippet":["css","less","postcss"]} [Debug - 5:53:53 p.m.] [language-server] Returning options | resource: "file:///Users/jamsea/Library/Application%20Support/Code/User/keybindings.json" options: {"codeAction":{"disableRuleComment":{"location":"separateLine"}},"config":null,"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"packageManager":"npm","reportInvalidScopeDisables":true,"reportNeedlessDisables":true,"snippet":["css","less","postcss"],"stylelintPath":"","validate":["css","less","postcss"]} [Debug - 5:53:53 p.m.] [language-server] Received options from client | resource: "file:///Users/jamsea/Library/Application%20Support/Code/User/keybindings.json" options: {"enable":true,"config":null,"configOverrides":null,"codeAction":{"disableRuleComment":{"location":"separateLine"}},"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"reportNeedlessDisables":true,"reportInvalidScopeDisables":true,"stylelintPath":"","packageManager":"npm","validate":["css","less","postcss"],"snippet":["css","less","postcss"]} [Debug - 5:53:53 p.m.] [language-server] Returning options | resource: "file:///Users/jamsea/Library/Application%20Support/Code/User/keybindings.json" options: {"codeAction":{"disableRuleComment":{"location":"separateLine"}},"config":null,"configFile":".stylelintrc.json","configBasedir":"","customSyntax":"","ignoreDisables":false,"packageManager":"npm","reportInvalidScopeDisables":true,"reportNeedlessDisables":true,"snippet":["css","less","postcss"],"stylelintPath":"","validate":["css","less","postcss"]} [Debug - 5:53:53 p.m.] [language-server:validator] Document should not be validated, ignoring | uri: "file:///Users/jamsea/Library/Application%20Support/Code/User/keybindings.json" language: "jsonc"

Stylelint Version

v14.2.0

vscode-stylelint Version

v1.2.1

Node.js Version

v17.0.1

Operating System

macOS 12.1

Windows Subsystem for Linux

No response

Code of Conduct

sunilbittu commented 2 years ago

try updating stylelint version to "stylelint": "14.5.1",

jamsea commented 2 years ago

Thanks for the tip @sunilbittu, I tried removing node_modules, upgrading, then restarting VS Code but I'm still having the same issue 🤔

S4n3L commented 2 years ago

@jamsea I had the same problem with a very similar configuration you posted. When I double-checked my VS-Code extensions I realized that both vscode-stylelint and vscode-stylelint-plus were installed.

When I removed the stylelint-plus package, the unknown error reference was gone. My best guess is that the stylelint-plus package was not updated in the last 5 months, and the output was misleading. Please check whether you have the same package installed and if so, make sure that you use the right extension.

jamsea commented 2 years ago

@S4n3L I didn't have stylelint-plus but I did have another vscode extension that was stylelint related. Uninstalling it fixed it. Wahoo! 🎉 Thanks for the tip!