{"id":26422,"library":"spire-plugin-lint-staged","title":"spire-plugin-lint-staged","description":"A Spire plugin that integrates lint-staged into the Spire workflow, running lint-staged during the precommit hook. Current stable version is 5.0.9, with sporadic updates. It extends Spire's plugin system for Git precommit linting. Differs from standalone lint-staged usage by automating configuration via Spire's lifecycle hooks. Requires Spire v4 or v5 and Node >=12.20.","status":"active","version":"5.0.7","language":"javascript","source_language":"en","source_url":"https://github.com/researchgate/spire","tags":["javascript"],"install":[{"cmd":"npm install spire-plugin-lint-staged","lang":"bash","label":"npm"},{"cmd":"yarn add spire-plugin-lint-staged","lang":"bash","label":"yarn"},{"cmd":"pnpm add spire-plugin-lint-staged","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency: plugin requires Spire runtime v4 or v5","package":"spire","optional":false},{"reason":"runtime dependency: executes lint-staged on precommit","package":"lint-staged","optional":false}],"imports":[{"note":"Package is CommonJS-only; ESM import not supported. Use require() as Spire plugins expect CommonJS.","wrong":"import plugin from 'spire-plugin-lint-staged'","symbol":"default","correct":"const plugin = require('spire-plugin-lint-staged')"},{"note":"Options are passed as array [plugin, options] within Spire's plugin configuration.","wrong":"module.exports = { plugins: ['spire-plugin-lint-staged', { lintStagedConfig: './my-config.js' }] }","symbol":"lintStagedConfig","correct":"module.exports = { plugins: [['spire-plugin-lint-staged', { lintStagedConfig: './my-config.js' }]] }"},{"note":"Setting allowCustomConfig to false prevents user override; array format required.","wrong":"module.exports = { plugins: ['spire-plugin-lint-staged', { allowCustomConfig: false }] }","symbol":"allowCustomConfig","correct":"module.exports = { plugins: [['spire-plugin-lint-staged', { allowCustomConfig: false }]] }"}],"quickstart":{"code":"// .spirerc.js\nmodule.exports = {\n  plugins: [\n    ['spire-plugin-lint-staged', {\n      lintStagedConfig: 'lint-staged.config.js',\n      allowCustomConfig: false\n    }]\n  ]\n};\n\n// lint-staged.config.js\nmodule.exports = {\n  '*.js': ['eslint --fix', 'prettier --write']\n};","lang":"javascript","description":"Shows basic Spire configuration using the plugin with a custom lint-staged config file."},"warnings":[{"fix":"Use Node v12.20 or higher.","message":"Node engine requirement raised to >=12.20 in v5.0.0","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Install spire v4 or v5 alongside this plugin.","message":"Peer dependency spire changed from ^4.0.0 to ^4.0.0 || ^5.0.0; ensure compatible Spire version.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Upgrade to v5.0.7+ which uses lint-staged v13, or manually set lint-staged version in your project.","message":"lint-staged v11 used in older versions; v13 introduced breaking changes (e.g., removed --relative). If pinned to v5.0.6 or earlier, lint-staged v11 may be incompatible with newer Node.","severity":"deprecated","affected_versions":"<=5.0.6"},{"fix":"Use the exact package name 'spire-plugin-lint-staged' in the plugins array.","message":"Plugin name mismatch: npm package is 'spire-plugin-lint-staged' but Spire plugin array expects the string exactly as 'spire-plugin-lint-staged' (not 'lint-staged' or 'spire-lint-staged').","severity":"gotcha","affected_versions":">=4.0.0"}],"env_vars":null,"search_vec":"'12.20':66 '5.0.9':30 'autom':52 'configur':53 'current':26 'differ':44 'extend':35 'git':41 'hook':25,58 'integr':10 'javascript':67 'lifecycl':57 'lint':4,12,20,43,48 'lint-stag':11,19,47 'node':65 'plugin':3,8,38 'precommit':24,42 'requir':59 'run':18 'spire':2,7,16,36,55,60 'spire-plugin-lint-stag':1 'sporad':32 'stabl':27 'stage':5,13,21,49 'standalon':46 'system':39 'updat':33 'usag':50 'v4':61 'v5':63 'version':28 'via':54 'workflow':17","created_at":"2026-05-01T13:49:54.314923+00:00","updated_at":"2026-05-01T13:49:54.314923+00:00","problems":[{"fix":"Run: npm install spire-plugin-lint-staged --save-dev","cause":"Package not installed or require() fails due to missing dependency or incorrect path.","error":"Error: Plugin 'spire-plugin-lint-staged' not found or not a function."},{"fix":"Install the package: npm install spire-plugin-lint-staged","cause":"Package not installed or node_modules path issue.","error":"Error: Cannot find module 'spire-plugin-lint-staged'"},{"fix":"Change plugin entry to: ['spire-plugin-lint-staged', { ... }]","cause":"Plugin options not wrapped in array (e.g., using string instead of [name, opts] tuple).","error":"TypeError: plugins[i] is not iterable"},{"fix":"Set allowCustomConfig to true or remove custom config file.","cause":"User has a lint-staged config file in project root but plugin option allowCustomConfig set to false.","error":"Error: Custom lint-staged config found but allowCustomConfig is false."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/researchgate/spire","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/spire-plugin-lint-staged","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","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}}