{"record":{"id":"151bed5c129b94eb","repo":"tailwindlabs/tailwindcss","slug":"source-paths-must-be-quoted-151bed","errorCode":null,"errorMessage":"`@source` paths must be quoted.","messagePattern":"`@source` paths must be quoted\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/tailwindcss/src/index.ts","lineNumber":286,"sourceCode":"      let inline = false\n      let path = node.params\n\n      if (path[0] === 'n' && path.startsWith('not ')) {\n        not = true\n        path = path.slice(4)\n      }\n\n      if (path[0] === 'i' && path.startsWith('inline(')) {\n        inline = true\n        path = path.slice(7, -1).trim()\n      }\n\n      if (\n        (path[0] === '\"' && path[path.length - 1] !== '\"') ||\n        (path[0] === \"'\" && path[path.length - 1] !== \"'\") ||\n        (path[0] !== \"'\" && path[0] !== '\"')\n      ) {\n        throw new Error('`@source` paths must be quoted.')\n      }\n\n      let source = path.slice(1, -1)\n\n      if (inline) {\n        let destination = not ? ignoredCandidates : inlineCandidates\n        let sources = segment(source, ' ')\n        for (let source of sources) {\n          for (let candidate of expand(source)) {\n            destination.push(candidate)\n          }\n        }\n      } else {\n        sources.push({\n          base: ctx.context.base as string,\n          pattern: source,\n          negated: not,\n        })","sourceCodeStart":268,"sourceCodeEnd":304,"githubUrl":"https://github.com/tailwindlabs/tailwindcss/blob/16e94cbf7f965c5ad697e90e940b5e178efad67c/packages/tailwindcss/src/index.ts#L268-L304","documentation":"Thrown when the resolved `@source` path does not start and end with matching quotes. After stripping optional `not ` and `inline(...)` wrappers, the remaining path is checked the same way as `source(…)` — it must be a quoted string literal. The `not ` and `inline(...)` keywords themselves are detected by prefix checks before this guard.","triggerScenarios":"Writing `@source ./src/**/*.html` (unquoted), `@source not(./legacy/**)`, or `@source inline(./file.html)`. Each requires the inner path to be quoted.","commonSituations":"Copy-pasting glob examples that lost quotes; mixing up `@source` syntax with shell-style unquoted globs.","solutions":["Quote the path: `@source \"./src/**/*.html\"`.","When negating or inlining, quote the inner path: `@source not(\"./legacy/**\")`, `@source inline(\"./file.html\")`.","Use `@source none` only if you intend to disable all automatic source detection (note: `@source none` is not the keyword form — disable scanning via the build config instead)."],"exampleFix":"/* before */\n@source not(./legacy/**);\n@source inline(./icons.svg);\n\n/* after */\n@source not(\"./legacy/**\");\n@source inline(\"./icons.svg\");","handlingStrategy":"validation","validationCode":"// Reproduce the library's quoting check after stripping not/inline wrappers.\nfunction validateSourceQuoted(raw: string): string | null {\n  let path = raw.trim()\n  if (path.startsWith('not ')) path = path.slice(4).trim()\n  if (path.startsWith('inline(')) path = path.slice(7, -1).trim()\n  const ok = (path.startsWith('\"') && path.endsWith('\"')) ||\n             (path.startsWith(\"'\") && path.endsWith(\"'\"))\n  return ok ? null : `@source path '${raw}' must be quoted`\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always quote `@source` paths with single or double quotes.","Apply the same quoting to the inner path of `not(...)` and `inline(...)` wrappers.","Add a stylelint custom rule that enforces quoted strings inside `@source`."],"tags":["at-source","quoting","validation"],"backgroundTag":null,"analyzedSha":"16e94cbf7f965c5ad697e90e940b5e178efad67c","analyzedAt":"2026-08-12T06:02:42.469Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}