@cloudalgo/lwc-core
v0.1.0
Published
ESLint-free static analyzer for Lightning Web Component and Aura JavaScript.
Maintainers
Readme
@cloudalgo/lwc-core
ESLint-free static analysis for Lightning Web Component and Aura JavaScript.
Parses with @babel/parser and runs rule listeners over the AST — no ESLint
runtime, so it bundles cleanly in Electron and other constrained hosts.
Usage
import { Linter, allRules } from "@cloudalgo/lwc-core";
const linter = new Linter(allRules);
const { violations } = linter.lint({ filePath: "myComponent.js", source });
// violations: [{ ruleId, message, severity, category, line, column }]Disable specific rules per file:
linter.lint({ filePath, source, disabled: new Set(["no-async-operation"]) });Rules
LWC-specific: no-inner-html, no-document-query, no-api-reassignments,
no-leaky-event-listeners, valid-wire, valid-api, valid-track,
no-deprecated, no-async-operation, no-unknown-wire-adapters.
Generic JS (also run on Aura): no-eval, no-implied-eval, no-new-func,
no-script-url, no-debugger, eqeqeq.
Suppression
Line-level directives are honored (plugin prefixes are stripped, so directives
written for the official @lwc/lwc/* plugin work too):
// eslint-disable-next-line no-async-operation
setTimeout(fn, 0);
doStuff(); // eslint-disable-lineDevelopment
npm install # install deps
npm run build # tsc → dist/
npm test # vitest runReleases are tag-driven: npm run release -- patch|minor|major bumps the
version, tags vX.Y.Z, and pushes; the publish workflow then builds, tests,
and publishes to npm and cuts a GitHub Release from CHANGELOG.md. See
CLAUDE.md for architecture.
License
BSD-3-Clause © CloudAlgo
