Registry / testing / formula-lint

formula-lint

JSON →
library0.1.1jsnpmunverified

Formula Lint is a CLI tool that provides a unified linting setup for JavaScript/TypeScript projects, built on ESLint with preconfigured rules for React, TypeScript, and formatting. Version 0.1.1 is the current stable release, targeted at developers who want to add consistent code standards to any project in minutes. It generates flat ESLint configs (eslint.config.js) automatically, integrates with VSCode for on-save fixing, and supports CI/CD via GitHub Actions. The tool requires Node.js >= 18.0.0, ships TypeScript definitions, and is distributed as a global npm package.

npm install formula-lint
INSTALL
IMPORT
SIG · FORMULA-LINT
F
formula-lint
testingjavascriptv0.1.1
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 (initialization function)
import formula from '@formula/lint-config'
const formula = require('@formula/lint-config')
ESM-only; CommonJS require will fail. The package is ESM-only since v0.1.x.
init (CLI command)
formula init [--force] [--verbose]
formula init --overwrite
The CLI command does not accept --overwrite; use --force instead.
lint (CLI command)
formula lint [files...] [--fix] [--format <format>] [--max-warnings <n>] [--verbose]
formula run lint
The lint command is not a subcommand of any package script; it's invoked directly via the global CLI.
formula function (config export)
export default formula({ react: true, typescript: true, formatters: true, ignores: [], rules: {} })
module.exports = formula({ react: true })
eslint.config.js must use ESM export default; CommonJS module.exports is not supported.

Install globally, initialize project config, then run lint with auto-fix and JSON output.

npm install -g formula-lint cd /path/to/your/project formula init # after init, edit eslint.config.js as needed formula lint --fix formula lint --format json
formula-lint --version
Debug
Known issues
breakingESM-only package: formula-lint and @formula/lint-config do not support CommonJS require().
fix
Use import statements and ensure your project uses ESM or has TypeScript configured to handle ES modules.
affects: >=0.1.0
breakingFlat config required: formula-lint generates eslint.config.js (flat config), not the legacy .eslintrc format.
fix
If you need legacy config, do not use formula-lint; or manually convert the flat config to .eslintrc.
affects: >=0.1.0
deprecatedThe @formula/lint-config package may be updated separately; breaking changes there can affect your project.
fix
Pin version of @formula/lint-config in package.json if stability is needed.
affects: >=0.1.0
gotchaGlobal installation recommended: if you install formula-lint locally, the CLI may not be in PATH.
fix
Install with npm install -g formula-lint, or use npx formula-lint for local installs.
affects: ALL
gotchaNode.js >= 18 required: older Node versions will fail with syntax errors due to ESM features.
fix
Update Node.js to version 18 or later.
affects: >=0.1.0
gotchaVSCode ESLint plugin must be installed separately for editor integration.
fix
Install the ESLint extension from the VSCode marketplace.
affects: ALL
Errors
Common errors & fixes
Cannot find module '@formula/lint-config'
The package @formula/lint-config is not installed; formula-lint expects it as a peer dependency.
fix
Run `npm install -g @formula/lint-config` or add it to your project dependencies: `npm install --save-dev @formula/lint-config`
Error: Requires Babel to transform but it is not configured
The generated eslint.config.js may need Babel for certain syntax; formula-lint expects TypeScript or modern JS.
fix
Enable typescript: true in the formula config if using TS, or ensure your project uses valid ES syntax.
formula: command not found
formula-lint is not installed or not in PATH.
fix
Install globally: `npm install -g formula-lint`.
ESLint couldn't find the config 'formula' to extend from.
The flat config import of @formula/lint-config fails if the package is not installed or module resolution fails.
fix
Install @formula/lint-config: `npm install --save-dev @formula/lint-config`
Upgrade
Version history
0.1.1latest on npm
Audit
Dependencies
eslintrequiredCore linting engine; formula-lint depends on ESLint for all linting functionality.
@formula/lint-configrequiredShared ESLint config package imported by the generated eslint.config.js
Agent activity
4 hits · last 30 days
node
4
Resources