{"library":"razor-vue-lint","title":"razor-vue-lint","description":"An ESLint preprocessor for .NET Razor (.cshtml) views containing inline Vue.js templates. Version 1.1.10 wraps Razor expressions (e.g. @Html.PropertyFor) inside /* eslint-disable */ and /* eslint-enable */ comment blocks so that ESLint only lints the Vue template portions. It supports three expression patterns: newline-terminated, closing-tag-terminated, and attribute-enclosed. The library is extensible via custom regex matchers and matcher keys. Released on npm, with low release cadence. Key differentiator: solves a niche problem of linting Vue code embedded in C# Razor views. Not widely adopted; consider manual ESLint configuration as an alternative.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install razor-vue-lint"],"cli":null},"imports":["import { esLintEscapeRazorExpressions } from 'razor-vue-lint'","import { addIgnoreEsLintBlocksForRazorExpressions } from 'razor-vue-lint'","import razorVueLint from 'razor-vue-lint'; razorVueLint.esLintEscapeRazorExpressions(code);"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { esLintEscapeRazorExpressions } from 'razor-vue-lint';\nimport { readFileSync, writeFileSync } from 'fs';\nimport { globSync } from 'glob';\n\nconst files = globSync('**/*.cshtml');\nfor (const file of files) {\n  const original = readFileSync(file, 'utf-8');\n  const lintSafe = esLintEscapeRazorExpressions(original);\n  writeFileSync(file.replace('.cshtml', '.lint.cshtml'), lintSafe);\n  console.log(`Processed ${file}`);\n}","lang":"typescript","description":"Recursively processes all .cshtml files in a project, escaping Razor expressions with ESLint ignore comments and saving to .lint.cshtml files.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}