ESLint plugin for linting TOML files, providing syntax validation, formatting rules (e.g., inline-table-curly-newline, inline-table-curly-spacing), and support for Vue SFC custom blocks. Current stable version is 1.3.1, released monthly with active maintenance. Requires ESLint >=9.38.0 and Node >=20.19.0. Key differentiators: full TOML parsing, ESLint directive support (# eslint-disable-next-line), and integration with editor tools. Alternatives like prettier-plugin-toml focus on formatting only.
npm install eslint-plugin-tomlVerified import paths — ran on the pinned version, not inferred.
Shows minimal flat config to enable TOML linting via plugin; uses recommended config.
Upgrade ESLint to >=9.38.0 and use flat config (eslint.config.js) instead of .eslintrc.
Replace ...eslintPluginToml.configs['flat/recommended'] with ...eslintPluginToml.configs.recommended.
Install vue-eslint-parser@>=7.3.0 if using Vue SFC with TOML custom blocks.
Review rule options after updates; check CHANGELOG for property changes.
Use import/require the main plugin object only, not internal files.
Run 'npm install --save-dev eslint-plugin-toml' and ensure it's in node_modules.
Set severity as string: 'off', 'warn', 'error', then options: { indent: 2 }.