{"id":24921,"library":"asm.js-lint","title":"asm.js-lint","description":"asm.js-lint is a linting plugin for CodeMirror that validates asm.js code. Version 0.1.3, released around 2013, is the latest stable release. The package is minimal and designed to be used alongside CodeMirror's existing lint addon. It provides a helper script for validation and requires browserification for development. This plugin is rarely updated and has limited adoption, serving as a niche tool for asm.js development within CodeMirror.","status":"deprecated","version":"0.1.3","language":"javascript","source_language":"en","source_url":"https://github.com/brettz9/asm.js-lint","tags":["javascript","asm.js","CodeMirror"],"install":[{"cmd":"npm install asm.js-lint","lang":"bash","label":"npm"},{"cmd":"yarn add asm.js-lint","lang":"bash","label":"yarn"},{"cmd":"pnpm add asm.js-lint","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required as a host for the lint plugin, though not listed as a peer dependency.","package":"CodeMirror","optional":true},{"reason":"Required for building the helper script with browserify.","package":"asm.js","optional":true}],"imports":[{"note":"This library is not a standard npm module; it must be loaded as a script in the browser.","wrong":"Using npm package without proper script loading","symbol":"asm-lint","correct":"Include script tag: <script src=\"<path-to>/asm.js-lint/lib/asm-lint.js\"></script>"},{"note":"The helper is a browserified script; it cannot be used in Node.js.","wrong":"Requiring via Node.js require()","symbol":"asm-lint-helper","correct":"Include script tag: <script src=\"<path-to>/asm.js-lint/dist/asm-lint-helper.compiled.js\"></script>"},{"note":"The plugin registers itself as a lint source for the 'asm' mode in CodeMirror.","wrong":"Using 'asm' as a mode without enabling lint","symbol":"CodeMirror.asmLint","correct":"Use the 'asm' lint option: CodeMirror.fromTextArea(element, { mode: 'asm', lint: true })"}],"quickstart":{"code":"// Ensure you have CodeMirror and its lint addon included.\n// Then add script tags:\n// <script src=\"path/to/codemirror.js\"></script>\n// <script src=\"path/to/addon/lint/lint.js\"></script>\n// <script src=\"path/to/asm.js-lint/lib/asm-lint.js\"></script>\n// <script src=\"path/to/asm.js-lint/dist/asm-lint-helper.compiled.js\"></script>\n//\n// Initialize CodeMirror with asm linting:\nvar editor = CodeMirror.fromTextArea(document.getElementById('code'), {\n  mode: 'asm',\n  lint: true\n});","lang":"javascript","description":"Shows how to set up asm.js linting in CodeMirror with script tags and configuration."},"warnings":[{"fix":"Consider using a modern linting tool for JavaScript asm.js modules.","message":"Project is no longer maintained. Use it at your own risk.","severity":"deprecated","affected_versions":"*"},{"fix":"Ensure you manually install a compatible version of CodeMirror.","message":"The package does not list CodeMirror as a peer dependency, leading to potential version mismatches.","severity":"gotcha","affected_versions":"0.1.3"},{"fix":"Run 'browserify src/asm-lint-helper.js -o dist/asm-lint-helper.compiled.js' after installing asm.js.","message":"The library requires browserify for development builds, which may not be obvious.","severity":"gotcha","affected_versions":"0.1.3"},{"fix":"Use only in browser-based CodeMirror instances.","message":"The plugin only works in browser environments; Node.js usage is unsupported.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install asm.js' before browserifying.","cause":"Development build requires asm.js to be installed globally or locally.","error":"Cannot find module 'asm.js'"},{"fix":"Ensure the script tag for 'addon/lint/lint.js' is included before asm-lint.js.","cause":"CodeMirror's lint addon has not been loaded before asm-lint.js.","error":"Uncaught TypeError: Cannot read property 'asm' of undefined"},{"fix":"Load CodeMirror as a script tag before asm-lint.js.","cause":"asm-lint.js expects CodeMirror to be globally available.","error":"asm-lint.js requires a CodeMirror instance"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}