Registry / testing / any-eslint-parser

any-eslint-parser

JSON →
library1.0.1jsnpmunverified

Check any file type with ESLint using a parser that ignores AST-based rules, allowing text-based rules like eol-last and no-tabs to be applied to non-JavaScript files (e.g. JSON, YAML, Markdown, XML, etc.). Current stable version is 1.0.1. The package has no release cadence documented and is a niche tool for leveraging ESLint's text-based rules across diverse file formats. Differentiators include zero AST dependency for linting, compatibility with eslint-plugin-regex, and ability to use existing ESLint configuration infrastructure.

npm install any-eslint-parser
INSTALL
IMPORT
SIG · ANY-ESLINT-PARSER
A
any-eslint-parser
testingjavascriptv1.0.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

any-eslint-parser
In .eslintrc: { "parser": "any-eslint-parser" }
Using "parser": "any-eslint-parser" in a JavaScript file (it's a config option, not an import)
Parser is used in ESLint configuration, not imported directly in code.
eslint
npx eslint --config .eslintrc-any.json --no-eslintrc "**/*.json"
eslint "**/*.json" (without specifying the parser config)
Since v1.0.0, using --no-eslintrc is recommended to avoid AST-based rules from other configs.
defaultParser
Not applicable; there is no exported symbol.
import anyEslintParser from 'any-eslint-parser'
Package exports no JavaScript API; it's only a parser for ESLint config.

Sets up ESLint with any-eslint-parser to lint JSON, YAML, XML, Markdown, and other text files for trailing newlines and tabs.

// 1. Install dependencies // npm install --save-dev any-eslint-parser eslint // 2. Create .eslintrc-any.json with parser and text-based rules // { "parser": "any-eslint-parser", "rules": { "eol-last": "error", "no-tabs": "error" } } // 3. Run eslint with the custom config // npx eslint --config .eslintrc-any.json --no-eslintrc "**/*.+(json|yml|xml|md|txt|sh)" // Example output for a JSON file with tabs: // 1:1 error Unexpected tab character no-tabs // 2:1 error Newline required at end of file but not found eol-last
Debug
Known issues
gotchaAST-based rules like no-unused-vars are ignored silently; no error is thrown but they produce no effect.
fix
Use only text-based rules (e.g. eol-last, no-tabs, eslint-plugin-regex rules) in the parser's config.
affects: >=1.0.0
gotchaUsing any-eslint-parser without --no-eslintrc may cause unexpected behavior if parent configs contain AST rules.
fix
Pass --no-eslintrc to eslint to ignore all other config files, or use a dedicated eslintrc file for any-eslint-parser.
affects: >=1.0.0
deprecatedNo deprecation warnings in package.
breakingNo breaking changes documented; version 1.0.1 is the only release.
Errors
Common errors & fixes
Parsing error: The keyword 'import' is reserved
Parser tries to parse non-JavaScript file as JavaScript because default parser is espree.
fix
Set parser to 'any-eslint-parser' in the ESLint config for the file patterns.
Error: Failed to load parser 'any-eslint-parser'
any-eslint-parser is not installed; missing npm package.
fix
Run 'npm install --save-dev any-eslint-parser' to install the parser.
No ESLint configuration found
Using --no-eslintrc without providing a config file via --config.
fix
Specify the config file with '--config /path/to/.eslintrc-any.json'.
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies
eslintrequiredPeer dependency; necessary to run eslint with the parser.
Agent activity
27 hits · last 30 days
node
24
OpenAI (training)
1
Resources
any-eslint-parser — npm install any-eslint-parser · libregistry