Registry / testing / tern-node-lint

tern-node-lint

JSON →
library0.1.0jsnpmunverified

Tern plugin adding validation for Node.js require() statements. Version 0.1.0 (probably outdated, last release unknown). Integrates with Tern code intelligence to lint require module paths. Depends on tern and node plugins. Minimal maintenance; no updates since early 2015. Alternative: use TypeScript or ESLint with import/no-unresolved for require validation.

npm install tern-node-lint
INSTALL
IMPORT
SIG · TERN-NODE-LINT
T
tern-node-lint
testingjavascriptv0.1.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.

plugin (via .tern-project)
{"plugins":{"node-lint":{}}}
npm install tern-node-lint --global
Loaded as Tern plugin, not imported in code. Use .tern-project configuration.
require('tern-node-lint')
const ternNodeLint = require('tern-node-lint');
import ternNodeLint from 'tern-node-lint';
CJS-only; ESM not supported.
Tern plugin registration
const tern = require('tern'); tern.registerPlugin('node-lint', require('tern-node-lint'));
tern.loadPlugin('node-lint'); // method does not exist
Plugin must be registered programmatically if not using .tern-project.

Shows minimal .tern-project config and npm install for Node.js require linting with Tern.

// .tern-project { "plugins": { "node": {}, "lint": {}, "node-lint": {} }, "libs": ["browser"] } // Install $ npm install tern tern-node-lint // Run Tern server with project $ tern --port 8080
Debug
Known issues
deprecatedPackage has no releases since 0.1.0 (2015). Tern ecosystem is mostly unmaintained.
fix
Switch to TypeScript or ESLint for require validation.
affects: 0.1.0
gotchaRequires both 'node' and 'lint' plugins to be enabled; order matters.
fix
Add plugins in order: node, lint, node-lint.
affects: >=0.1.0
breakingBreaking changes in Tern 0.12+ may cause plugin incompatibility.
fix
Pin Tern to 0.11 or earlier.
affects: >=0.12
Errors
Common errors & fixes
Error: Cannot find module 'tern-node-lint'
Not installed or misplaced in node_modules
fix
Run 'npm install tern-node-lint' in the project root.
TypeError: tern.loadPlugin is not a function
No such method; plugins are registered via tern.registerPlugin
fix
Use 'tern.registerPlugin('node-lint', require('tern-node-lint'))'
Plugin 'node-lint' is not loaded
Missing in .tern-project or programmatic registration
fix
Add 'node-lint' to plugins in .tern-project.
Upgrade
Version history
0.1.0latest on npm
Audit
Dependencies
ternrequiredCore code intelligence engine
tern-noderequiredProvides Node.js plugin that node-lint extends
Agent activity
9 hits · last 30 days
node
8
Amazon
1
Resources
tern-node-lint — npm install tern-node-lint · libregistry