19,021 matches across 25 files for error lang:JavaScript lang:JavaScript
snippet_mode: grep · sorted by relevance
.eslintrc.js JAVASCRIPT 90 matches · showing 5 view file →
10const OFF = 0;
11const WARNING = 1;
12const ERROR = 2;
13
14module.exports = {
· · ·
42 'ft-flow/array-style-complex-type': [OFF, 'verbose'],
43 'ft-flow/array-style-simple-type': [OFF, 'verbose'], // TODO should be WARNING
44 'ft-flow/boolean-style': ERROR,
45 'ft-flow/no-dupe-keys': ERROR,
46 'ft-flow/no-primitive-constructor-types': ERROR,
· · ·
45 'ft-flow/no-dupe-keys': ERROR,
46 'ft-flow/no-primitive-constructor-types': ERROR,
47 'ft-flow/no-types-missing-file-annotation': OFF, // TODO should be ERROR
· · ·
46 'ft-flow/no-primitive-constructor-types': ERROR,
47 'ft-flow/no-types-missing-file-annotation': OFF, // TODO should be ERROR
48 'ft-flow/no-unused-expressions': ERROR,
· · ·
47 'ft-flow/no-types-missing-file-annotation': OFF, // TODO should be ERROR
48 'ft-flow/no-unused-expressions': ERROR,
49 // 'ft-flow/no-weak-types': WARNING,
+ 85 more matches in this file
compiler/.eslintrc.js JAVASCRIPT 7 matches · showing 5 view file →
8/**
9 * Our philosophy for linting is that lints should be very high-signal:
10 * - Error, don't warn. If it's worth mentioning it's worth fixing.
11 * - Enable rules that consistently identify real problems. If we frequently would have to
12 * disable the rule due to false positives, it isn't high-signal.
· · ·
42 "no-inner-declarations": "off",
43
44 "multiline-comment-style": ["error", "starred-block"],
45
46 /**
· · ·
53
54 /*
55 * Explicitly casting to/through any is sometimes required, often for error messages to
56 * assertExhaustive()
57 */
· · ·
66 // Being explicit provides value in cases where inference may later change
67 "@typescript-eslint/no-inferrable-types": "off",
68 "@typescript-eslint/explicit-function-return-type": "error",
69
70 /*
· · ·
74 */
75 "@typescript-eslint/no-unused-vars": [
76 "error",
77 {
78 argsIgnorePattern: "^_",
+ 2 more matches in this file
compiler/apps/playground/playwright.config.js JAVASCRIPT 1 matches view file →
54 // All available context options: https://playwright.dev/docs/api/class-browser#browser-new-context
55 // contextOptions: {
56 // ignoreHTTPSErrors: true,
57 // },
58 viewport: {width: 1920, height: 1080},
compiler/packages/babel-plugin-react-compiler/scripts/build-react-hooks-fixures.js JAVASCRIPT 6 matches · showing 5 view file →
42
43for (const fixture of fixtures) {
44 let error = null;
45 let passes = true;
46 try {
· · ·
72 }
73 } catch (e) {
74 error = e;
75 }
76 let code = fixture.code;
· · ·
77 let prefix = '';
78 if (error !== null) {
79 prefix = `todo.bail.`;
80 code = `// @skip\n// Unsupported input\n${code}`;
· · ·
81 } else if (fixture.valid === false) {
82 if (passes) {
83 prefix = `todo.error.invalid-`;
84 code = `// @skip\n// Passed but should have failed\n${code}`;
85 } else {
· · ·
86 prefix = `error.invalid-`;
87 code = `// Expected to fail\n${code}`;
88 }
+ 1 more matches in this file
compiler/packages/babel-plugin-react-compiler/scripts/eslint-plugin-react-hooks-test-cases.js JAVASCRIPT 51 matches · showing 5 view file →
295 function RegressionTest() {
296 if (page == null) {
297 throw new Error('oh no!');
298 }
299 useState();
· · ·
377 code: normalizeIndent`
378 // Valid because the neither the conditions before or after the hook affect the hook call
379 // Failed prior to implementing BigInt because pathsFromStartToEnd and allPathsFromStartToEnd were too big and had rounding errors
380 const useSomeHook = () => {};
381
· · ·
471 }
472 `,
473 errors: [],
474 },
475 {
· · ·
481 Hook.use_hook();
482 `,
483 errors: [],
484 },
485 {
· · ·
492 }
493 `,
494 errors: [],
495 },
496 {
+ 46 more matches in this file
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/capture-param-mutate.js JAVASCRIPT 1 matches view file →
18 typeof firstArg === 'string' &&
19 firstArg.slice(0, 9) === 'Warning: ' &&
20 logLevel >= LOG_LEVELS.error
21 ) {
22 logLevel = LOG_LEVELS.warn;
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/console-readonly.js JAVASCRIPT 1 matches view file →
7 console.info(x);
8 console.warn(x);
9 console.error(x);
10 console.trace(x);
11 console.table(x);
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/constant-propagation-template-literal.js JAVASCRIPT 1 matches view file →
4function foo() {
5 try {
6 identity(`${Symbol('0')}`); // Uncaught TypeError: Cannot convert a Symbol value to a string (leave as is)
7 } catch {}
8
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.bug-infer-mutation-aliasing-function-shadows-own-name.js JAVASCRIPT 4 matches view file →
1// @flow
2function Foo() {
3 function hasError() {
4 let hasError = false;
5 return hasError;
· · ·
4 let hasError = false;
5 return hasError;
6 }
· · ·
5 return hasError;
6 }
7 return <div x={hasError} />;
· · ·
7 return <div x={hasError} />;
8}
9
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.bug-invariant-local-or-context-references.js JAVASCRIPT 2 matches view file →
8 setState({
9 data,
10 error: null,
11 });
12 } catch (err) {
· · ·
13 setState(_prevState => ({
14 loading: false,
15 error: err,
16 }));
17 }
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.capitalized-function-call-aliased.js JAVASCRIPT 1 matches view file →
2function Foo() {
3 let x = Bar;
4 x(); // ERROR
5}
6
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.fault-tolerance-reports-multiple-errors.js JAVASCRIPT 5 matches view file →
2/**
3 * This fixture tests fault tolerance: the compiler should report
4 * multiple independent errors rather than stopping at the first one.
5 *
6 * Error 1: Ref access during render (ref.current)
· · ·
6 * Error 1: Ref access during render (ref.current)
7 * Error 2: Mutation of frozen value (props)
8 */
· · ·
7 * Error 2: Mutation of frozen value (props)
8 */
9function Component(props) {
· · ·
10 const ref = useRef(null);
11
12 // Error: reading ref during render
13 const value = ref.current;
14
· · ·
15 // Error: mutating frozen value (props, which is frozen after hook call)
16 props.items = [];
17
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.invalid-known-incompatible-function.js JAVASCRIPT 1 matches view file →
3function Component() {
4 const data = knownIncompatible();
5 return <div>Error</div>;
6}
7
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.invalid-known-incompatible-hook.js JAVASCRIPT 1 matches view file →
3function Component() {
4 const data = useKnownIncompatible();
5 return <div>Error</div>;
6}
7
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.invalid-mutation-in-closure.js JAVASCRIPT 1 matches view file →
1function useInvalidMutation(options) {
2 function test() {
3 foo(options.foo); // error should not point on this line
4 options.foo = 'bar';
5 }
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.invalid-nested-function-reassign-local-variable-in-effect.js JAVASCRIPT 1 matches view file →
28 // To protect against this, we disallow reassigning locals from
29 // functions that escape
30 throw new Error('`local` not updated!');
31 }
32 };
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.invalid-reassign-local-variable-in-async-callback.js JAVASCRIPT 1 matches view file →
4 await foo().then(result => {
5 // Reassigning a local variable in an async function is *always* mutating
6 // after render, so this should error regardless of where this ends up
7 // getting called
8 value = result;
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.invalid-reassign-local-variable-in-effect.js JAVASCRIPT 1 matches view file →
27 // To protect against this, we disallow reassigning locals from
28 // functions that escape
29 throw new Error('`local` not updated!');
30 }
31 };
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.invalid-reassign-local-variable-in-hook-argument.js JAVASCRIPT 1 matches view file →
28 // To protect against this, we disallow reassigning locals from
29 // functions that escape
30 throw new Error('`local` not updated!');
31 }
32 };
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.invalid-reassign-local-variable-in-jsx-callback.js JAVASCRIPT 1 matches view file →
25 // To protect against this, we disallow reassigning locals from
26 // functions that escape
27 throw new Error('`local` not updated!');
28 }
29 };
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.invalid-write-but-dont-read-ref-in-render.js JAVASCRIPT 1 matches view file →
4 // Writing to a ref in render is against the rules:
5 ref.current = value;
6 // returning a ref is allowed, so this alone doesn't trigger an error:
7 return ref;
8}
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.todo-for-loop-with-context-variable-iterator.js JAVASCRIPT 1 matches view file →
15 // is effectively const within the body and the "update" acts more like
16 // a re-initialization than a reassignment.
17 // Until we model this "new environment" semantic, we allow this case to error
18 for (let i = MIN; i <= MAX; i += INCREMENT) {
19 items.push(
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.todo-hir_loc_diff_1.js JAVASCRIPT 2 matches view file →
37 PureComponentCache.displayName = `PureComponentCache(${
38 /* $FlowFixMe[incompatible-type] (>=0.66.0 site=www) This comment
39 * suppresses an error found when Flow v0.66 was deployed. To see the
40 * error delete this comment and run Flow. */
41 Component.displayName
· · ·
40 * error delete this comment and run Flow. */
41 Component.displayName
42 })`;
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.todo-hir_unsupported_node_format.js JAVASCRIPT 1 matches view file →
1// HIR Pattern: UNSUPPORTED_NODE_FORMAT (186 files, 56%)
2// UnsupportedNode: TS includes type:"Import", Rust omits it
3// Also: error reason text differs
4
5const ConfirmationCodeInput = React.lazy(
compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/error.todo-repro-named-function-with-shadowed-local-same-name.js JAVASCRIPT 5 matches view file →
1function Component(props) {
2 function hasErrors() {
3 let hasErrors = false;
4 if (props.items == null) {
· · ·
3 let hasErrors = false;
4 if (props.items == null) {
5 hasErrors = true;
· · ·
5 hasErrors = true;
6 }
7 return hasErrors;
· · ·
7 return hasErrors;
8 }
9 return hasErrors();
· · ·
9 return hasErrors();
10}
11
Search syntax
auth loginboth terms (AND is implicit)
auth OR logineither term
NOT path:vendorexclude matches
"exact phrase"quoted exact match
/func\s+Test/regex
handler~1fuzzy (Levenshtein 1)
file:*_test.gofilename glob
path:pkg/auth/**full path glob
lang:golanguage filter

Search any public repo from your terminal

This page calls POST /api/v1/code_search. Same tool, available over MCP for Claude/Cursor/Copilot.