Package Exports
- lunte
- lunte/src/config/loader.js
- lunte/src/config/plugins.js
- lunte/src/core/constants.js
- lunte/src/core/ignore.js
- lunte/src/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (lunte) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Lunte
A self-contained JavaScript linter, mostly matching non-formatting rules of Standard.
Installation
npm install --save-dev lunteUsage
lunte [optional: dir or glob]Globs are supported:
lunte "src/**/*.js"By default Lunte skips node_modules/. Manage additional exclusions with .lunteignore (gitignore-style patterns).
Configuration
Configuration is optional, but when needed create a .lunterc (or .lunterc.json) at the project root.
{
"env": ["node"],
"globals": ["MY_APP"],
"plugins": ["lunte-plugin-pear"],
"rules": {
"no-undef": "off",
"pear/no-apples": "error"
},
"disableHolepunchGlobals": true
}envenables preset global sets (node,browser,es2021).globalsadds project-specific globals.rulessets severities per rule ("off","warn","error", or0/1/2).disableHolepunchGlobalsskips addingPear/Bareglobals.
Command-line overrides are available for ad-hoc runs:
lunte --env browser --global Pear --rule no-unused-vars=off src/TypeScript
- Experimental parser is bundled via vendored
@sveltejs/acorn-typescript; no extra install needed. - Files ending
.ts,.tsx,.mts,.cts,.d.ts(and.jsxwhen present) automatically switch to the TS parser. - Type-aware handling currently exists for
no-undefandno-unused-vars; other rules run without type checking.
Plugins
Load third-party rule packs by listing module IDs under plugins. Each plugin should export a rules array (or object) of rule definitions with unique meta.name values.
{
"plugins": ["./rules/lunte-plugin-pear.js", "lunte-plugin-pear"],
"rules": {
"pear/no-apples": "error"
}
}For ad-hoc runs, lunte --plugin lunte-plugin-pear --plugin ./rules/lunte-plugin-pear.js src/ applies the same modules.
Inline Ignores
const cached = maybeUndefined() // lunte-disable-line no-undef
// lunte-disable-next-line
useGlobalResource()lunte-disable-linesuppresses the listed rules, or all rules when none are listed, on the same line.lunte-disable-next-lineapplies to the following line.eslint-disable-*directives are also supported for compatibility.
Editor Integration
Lunte ships with a separate LSP package: lunte-lsp.
Repository
Monorepo: https://github.com/holepunchto/lunte

License
Apache-2.0