Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Could not serialize processor object (missing 'meta' object) #93

Open
onemen opened this issue Jul 6, 2024 · 0 comments
Open

Comments

@onemen
Copy link

onemen commented Jul 6, 2024

With eslint 9+ i het this error using eslint-plugin-json with flat config

Oops! Something went wrong! :(

ESLint: 9.6.0

Error: Could not serialize processor object (missing 'meta' object).
    at Object.value (C:\code\test_eslint_with_json\node_modules\eslint\lib\config\flat-config-array.js:390:27)
    at stringify (C:\code\test_eslint_with_json\node_modules\json-stable-stringify-without-jsonify\index.js:25:25)
    at module.exports (C:\code\test_eslint_with_json\node_modules\json-stable-stringify-without-jsonify\index.js:68:7)
    at hashOfConfigFor (C:\code\test_eslint_with_json\node_modules\eslint\lib\cli-engine\lint-result-cache.js:50:75)
    at LintResultCache.getCachedLintResults (C:\code\test_eslint_with_json\node_modules\eslint\lib\cli-engine\lint-result-cache.js:116:30)
    at C:\code\test_eslint_with_json\node_modules\eslint\lib\eslint\eslint.js:903:41
    at Array.map (<anonymous>)
    at ESLint.lintFiles (C:\code\test_eslint_with_json\node_modules\eslint\lib\eslint\eslint.js:882:23)
    at async Object.execute (C:\code\test_eslint_with_json\node_modules\eslint\lib\cli.js:521:23)
    at async main (C:\code\test_eslint_with_json\node_modules\eslint\bin\eslint.js:153:22)

eslint lib/config/flat-config-array.js expect processors to have meta object
https://eslint.org/docs/latest/extend/custom-processors

const processors = {
    // Supports old config.
    '.json': jsonProcessor,
    // Supports new config.
    json: jsonProcessor,
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant