{"id":26208,"library":"remark-lint-fenced-code-flag-case","title":"remark-lint-fenced-code-flag-case","description":"remark-lint rule to warn when fenced code blocks have an inconsistently-cased language flag. Current stable version is 3.0.0, released as part of the unified-utils monorepo. Release cadence is irregular, with breaking changes tied to minimum node version bumps (now 20.18.0). Key differentiator: unlike similar lint rules, this enforces lowercase flags to ensure compatibility with tools like Prettier that may ignore uppercase or mixed-case flags. Full Unicode support is included. ESM-only, cannot be required with CommonJS.","status":"active","version":"3.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/Xunnamius/unified-utils","tags":["javascript","remark","remark-plugin","plugin","markdown","remark-lint","lint","rule","remark-lint-rule"],"install":[{"cmd":"npm install remark-lint-fenced-code-flag-case","lang":"bash","label":"npm"},{"cmd":"yarn add remark-lint-fenced-code-flag-case","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-lint-fenced-code-flag-case","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Provides base class for remark-lint rules","package":"unified-lint-rule","optional":false},{"reason":"TypeScript definitions for Markdown AST","package":"@types/mdast","optional":true}],"imports":[{"note":"ESM-only package; require() will fail. Default export is the lint rule function.","wrong":"const lintFencedCodeFlagCase = require('remark-lint-fenced-code-flag-case')","symbol":"lintFencedCodeFlagCase","correct":"import lintFencedCodeFlagCase from 'remark-lint-fenced-code-flag-case'"},{"note":"Must pass the imported function, not a string name, to .use().","wrong":".use('remark-lint-fenced-code-flag-case')","symbol":"remark-lint-fenced-code-flag-case (plugin)","correct":".use(lintFencedCodeFlagCase)"},{"note":"In package.json config, use full package name without prefix; in .remarkrc.js, shorthand is allowed.","wrong":"\"plugins\": [\"lint-fenced-code-flag-case\"]","symbol":"remarkConfig plugins","correct":"\"plugins\": [\"remark-lint-fenced-code-flag-case\"]"}],"quickstart":{"code":"import { read } from 'to-vfile';\nimport { reporter } from 'vfile-reporter';\nimport { remark } from 'remark';\nimport remarkLint from 'remark-lint';\nimport lintFencedCodeFlagCase from 'remark-lint-fenced-code-flag-case';\n\nconst file = await remark()\n  .use(remarkLint)\n  .use(lintFencedCodeFlagCase)\n  .process(await read('example.md'));\n\nconsole.log(reporter(file));","lang":"typescript","description":"Lints a Markdown file for inconsistently-cased fenced code block flags using remark-lint and reports warnings."},"warnings":[{"fix":"Upgrade Node.js to v20.18.0 or later, or stay on v2.x.","message":"Minimum supported Node.js version is now 20.18.0","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Use import syntax; if using CommonJS, use dynamic import().","message":"Package is ESM-only and cannot be require()'d","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Use full package name 'remark-lint-fenced-code-flag-case' in all configs.","message":"Shorthand plugin names in .remarkrc.js may not work in future versions","severity":"deprecated","affected_versions":">=3.0.0"},{"fix":"No fix needed; this is by design. To require flags, use another rule.","message":"The rule only checks fenced code blocks that have a language flag; blocks without flags are ignored.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Lowercase all code block flags to ensure formatting tools work.","message":"Mixed-case flags like 'TypeScript' are warned but might still get syntax highlighting; only formatting tools are affected.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'20.18.0':53 '3.0.0':29 'block':17 'break':44 'bump':51 'cadenc':40 'cannot':88 'case':7,22,78 'chang':45 'code':5,16 'commonj':92 'compat':66 'current':25 'differenti':55 'enforc':61 'ensur':65 'esm':86 'esm-on':85 'fenc':4,15 'flag':6,24,63,79 'full':80 'ignor':73 'includ':84 'inconsist':21 'inconsistently-cas':20 'irregular':42 'javascript':93 'key':54 'languag':23 'like':69 'lint':3,10,58,102,103,107 'lowercas':62 'markdown':99 'may':72 'minimum':48 'mix':77 'mixed-cas':76 'monorepo':38 'node':49 'part':32 'plugin':97,98 'prettier':70 'releas':30,39 'remark':2,9,94,96,101,106 'remark-lint':8,100 'remark-lint-fenced-code-flag-cas':1 'remark-lint-rul':105 'remark-plugin':95 'requir':90 'rule':11,59,104,108 'similar':57 'stabl':26 'support':82 'tie':46 'tool':68 'unicod':81 'unifi':36 'unified-util':35 'unlik':56 'uppercas':74 'util':37 'version':27,50 'warn':13","created_at":"2026-05-01T13:48:45.941020+00:00","updated_at":"2026-05-01T13:48:45.941020+00:00","problems":[{"fix":"Run `npm install --save-dev remark-lint-fenced-code-flag-case`.","cause":"Package not installed or not in node_modules.","error":"Error: Cannot find module 'remark-lint-fenced-code-flag-case'"},{"fix":"Use `import lintFencedCodeFlagCase from 'remark-lint-fenced-code-flag-case'` (default import).","cause":"Using an incorrect import syntax or trying to import named exports that don't exist.","error":"SyntaxError: The requested module 'remark-lint-fenced-code-flag-case' does not provide an export named 'default'"},{"fix":"Use `import { remark } from 'remark';` then call `remark().use(...)`.","cause":"Forgetting to create a remark instance with `remark()`.","error":"TypeError: remark().use is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"remark","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/Xunnamius/unified-utils","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/remark-lint-fenced-code-flag-case","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}