{"id":26303,"library":"remark-preset-lint-starstuff","title":"remark-preset-lint-starstuff","description":"Opinionated remark-lint preset that provides a simple, shareable configuration for linting Markdown and MDX files. Current stable version is 2.0.7 (released April 2025), with a maintenance-focused release cadence. It integrates with Prettier to avoid formatting conflicts and includes rules from remark-preset-lint-consistent and remark-preset-lint-markdown-style-guide. Ideal for developers wanting a zero-fuss linting setup that respects Prettier formatting.","status":"active","version":"2.0.7","language":"javascript","source_language":"en","source_url":"https://github.com/keplersj/remark-preset-lint-starstuff","tags":["javascript","remark","remark-lint","lint","markdown","mdx","md"],"install":[{"cmd":"npm install remark-preset-lint-starstuff","lang":"bash","label":"npm"},{"cmd":"yarn add remark-preset-lint-starstuff","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-preset-lint-starstuff","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core unified ecosystem for Markdown processing.","package":"remark","optional":true},{"reason":"CLI tool to run remark from the command line.","package":"remark-cli","optional":true},{"reason":"Provides consistent linting rules.","package":"remark-preset-lint-consistent","optional":false},{"reason":"Provides markdown style guide rules.","package":"remark-preset-lint-markdown-style-guide","optional":false},{"reason":"Integrates Prettier to avoid formatting conflicts.","package":"remark-preset-prettier","optional":false},{"reason":"Supports frontmatter in Markdown files.","package":"remark-frontmatter","optional":true}],"imports":[{"note":"ESM-only since v2.0.0. Use import statement; CommonJS require is not supported.","wrong":"const remarkPresetLintStarstuff = require('remark-preset-lint-starstuff')","symbol":"preset-lint-starstuff","correct":"import remarkPresetLintStarstuff from 'remark-preset-lint-starstuff'"},{"note":"In package.json, use the short preset name 'preset-lint-starstuff' without the 'remark-' prefix.","wrong":"\"remarkConfig\": { \"plugins\": [\"remark-preset-lint-starstuff\"] }","symbol":"Config in package.json","correct":"\"remarkConfig\": { \"plugins\": [\"preset-lint-starstuff\"] }"},{"note":"ESM-only. Use dynamic import or import statements. The preset is a function passed to .use().","wrong":"const remark = require('remark'); const preset = require('remark-preset-lint-starstuff'); remark().use(preset).processSync('...');","symbol":"Programmatic usage","correct":"import { remark } from 'remark'; import preset from 'remark-preset-lint-starstuff'; remark().use(preset).processSync('...');"}],"quickstart":{"code":"// Install: npm install --save-dev remark-preset-lint-starstuff\n\n// package.json\n{\n  \"remarkConfig\": {\n    \"plugins\": [\"preset-lint-starstuff\"]\n  }\n}\n\n// Then run: npx remark README.md\n// Or programmatically:\nimport { remark } from 'remark';\nimport preset from 'remark-preset-lint-starstuff';\n\nconst file = await remark()\n  .use(preset)\n  .process('# Hello\\n\\nThis is a test file.');\n\nconsole.log(String(file)); // outputs lint messages","lang":"typescript","description":"Demonstrates installation and usage via package.json config and programmatic API with ESM imports."},"warnings":[{"fix":"Use import instead of require. If using Node <12, upgrade or stick to v1.x.","message":"v2.0.0 dropped CommonJS support. All imports must be ESM.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Update to v2.x: npm install remark-preset-lint-starstuff@latest","message":"v1.x is no longer maintained. Upgrade to v2.x for continued updates and fixes.","severity":"deprecated","affected_versions":"<2.0.0"},{"fix":"Ensure remark and remark-cli are compatible with the preset. Check peer dependency versions in package.json.","message":"The preset is sensitive to remark-cli version. Using mismatched versions may cause runtime errors.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Install Prettier: npm install --save-dev prettier","message":"The preset assumes Prettier is installed. Without Prettier, some rules may behave unexpectedly or cause conflicts.","severity":"gotcha","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: npm install --save-dev remark-preset-lint-starstuff","cause":"Module not installed or wrong package name.","error":"Error: Cannot find module 'remark-preset-lint-starstuff'"},{"fix":"Change to import statement: import preset from 'remark-preset-lint-starstuff'","cause":"Using require() instead of import in an ESM context.","error":"ReferenceError: require is not defined in ES module scope"},{"fix":"Use default import: import preset from 'remark-preset-lint-starstuff'","cause":"Incorrectly importing the preset object instead of the default export.","error":"TypeError: preset is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}