Registry / testing / mocha-shopify-lint

mocha-shopify-lint

JSON →
library1.0.0jsnpmunverified

mocha-shopify-lint (v1.0.0) integrates Shopify's theme-lint with Mocha test framework, allowing developers to validate Liquid template files as part of the test suite. It accepts glob patterns to select which .liquid files to lint. Released in 2016, no active development or recent updates observed. Differentiates by providing a bridge between theme-lint and Mocha, but limited features and potential compatibility issues with newer versions of theme-lint or Mocha.

npm install mocha-shopify-lint
INSTALL
IMPORT
SIG · MOCHA-SHOPIFY-LINT
M
mocha-shopify-lint
testingjavascriptv1.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default (function)
const mochaShopifyLint = require('mocha-shopify-lint');
CommonJS require is the only supported import method; no ESM or TypeScript types.

Configures mocha-shopify-lint to lint Liquid files matching glob patterns.

const mochaShopifyLint = require('mocha-shopify-lint'); mochaShopifyLint(['./test/fixtures/**/*.liquid']);
Debug
Known issues
deprecatedPackage is unmaintained since 2017; may not work with modern theme-lint or Mocha versions.
fix
Consider using Shopify CLI's built-in linting or directly using theme-lint/tag-lint.
affects: >=1.0.0
gotchaGlob patterns are processed by glob-all; syntax may differ from standard globbing.
fix
Refer to glob-all documentation for pattern syntax.
affects: >=1.0.0
gotchaNo options to configure lint rules or severity; uses default theme-lint configuration.
fix
Create a .theme-lint.yml or theme-lint.json file in project root.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'theme-lint'
theme-lint peer dependency not installed or missing.
fix
npm install theme-lint --save-dev
Error: Cannot find module 'mocha'
Mocha is not installed or not in devDependencies.
fix
npm install mocha --save-dev
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies
theme-lintrequiredCore linting engine for Shopify Liquid files
mocharequiredTest framework used to run the linting results
Agent activity
2 hits · last 30 days
node
2
Resources
mocha-shopify-lint — npm install mocha-shopify-lint · libregistry