MCPcopy
hub / github.com/eslint/eslint / invalid

Function invalid

tests/lib/rules/no-extra-parens.js:30–47  ·  view source on GitHub ↗

* Create error message object for failure cases * @param {string} code source code * @param {string} output fixed source code * @param {string} type node type * @param {number} line line number * @param {Object} config rule configuration * @returns {Object} result object * @private

(code, output, type, line, config)

Source from the content-addressed store, hash-verified

28 * @private
29 */
30function invalid(code, output, type, line, config) {
31 const result = {
32 code,
33 output,
34 languageOptions: (config && config.languageOptions) || {},
35 errors: [
36 {
37 messageId: "unexpected",
38 },
39 ],
40 options: (config && config.options) || [],
41 };
42
43 if (line) {
44 result.errors[0].line = line;
45 }
46 return result;
47}
48
49//------------------------------------------------------------------------------
50// Tests

Callers 1

no-extra-parens.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…