@fluid-project/eslint-plugin-fluid-lint
v1.0.0
Published
An ESLint plugin reporting the diagnostics of fluid-lint - the runes of configuration and the layer records of Infusion 6, in JavaScript and Single File Components
Keywords
Readme
@fluid-project/eslint-plugin-fluid-lint
Reports the diagnostics of fluid-lint through ESLint - the syntax of configuration's runes,
and the directives and full forms of the layer records written to fluid.def, in JavaScript and Single File Components.
What it provides
- Rules.
fluid-lint/errorsreports fluid-lint's errors in JavaScript, andfluid-lint/warningsits warnings.- Each may be configured, or disabled by a comment, as any other rule, e.g.
// eslint-disable-next-line fluid-lint/errors.
- A processor.
fluid-lint/vuelints an SFC whole: the JavaScript of its top-level<script>s and the interpolations of its<template>.- ESLint parses no part of the SFC itself, so other rules don't apply to it.
- Its diagnostics are reported under the same rule names, at the severity fluid-lint gives them.
- A configuration.
configs.recommended, a flat configuration for ESLint 9 or later, enables both rules, and the processor for*.vue.
A fix which fluid-lint proposes, e.g. inserting a missing }, is offered as a suggestion, e.g. in an editor, rather
than applied by eslint --fix, since it is a guess at what was meant.
Use
Spread configs.recommended into a project's eslint.config.js, e.g.
module.exports = [...require("@fluid-project/eslint-plugin-fluid-lint").configs.recommended]; - Infusion's
configuration, @fluid-project/eslint-config-infusion-6, does so. It is released
as a tarball attached to its GitHub release, and installed by its URL with
@fluid-project/fluid-lint, which it names as a peer dependency - see the configuration's
README. Within this repository it is a workspace.
The plugin loads fluid-lint's ES module with require, which needs node 22.12 or later.
Tests: run npm test in this directory to run test/pluginTests.js through ESLint's API.
