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
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
plugin
✓ module.exports = { plugins: ['light'] }
✗ require('eslint-plugin-light') in .eslintrc
ESLint plugin prefix 'eslint-plugin-' can be omitted. Use string in .eslintrc plugins array.
recommended config
✓ extends: ['plugin:light/recommended']
Use the 'plugin:light/recommended' config to enable all recommended rules.
rule specific
✓ rules: { 'light/valid-vue-comp-import': 'error' }
✗ rules: { 'valid-vue-comp-import': 2 }
Rules must be prefixed with 'light/' to indicate this plugin.
Install and configure eslint-plugin-light with all rules and recommended parser.
// Install ESLint and plugin
// npm i eslint @babel/eslint-parser eslint-plugin-light -D
// .eslintrc.js
module.exports = {
parser: '@babel/eslint-parser',
plugins: ['light'],
rules: {
'light/valid-vue-comp-import': 'error',
'light/no-plus-turn-number': 'warn',
'light/no-complex-key': 'error',
'light/json-parse-try-catch': 'error',
'light/no-import-all-in-one-api': ['error', { excludes: [] }],
},
};
Errors
Common errors & fixes
Error: Failed to load parser '@babel/eslint-parser'
@babel/eslint-parser is not installed or not in node_modules.
fixRun 'npm install @babel/eslint-parser --save-dev'.
Definition for rule 'light/valid-vue-comp-import' was not found
Plugin 'eslint-plugin-light' not loaded in plugins config.
fixAdd 'plugins: ["light"]' to .eslintrc.
Audit
Dependencies
@babel/eslint-parserrequiredRequired as peer dependency for parsing Vue code with Babel
eslintrequiredCore dependency; plugin extends ESLint rule system