{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["react"],
"categories": {
"correctness": "off"
},
"options": {
"reportUnusedDisableDirectives": "error"
},
"env": {
"builtin": true,
"browser": true,
"es2024": true
},
"ignorePatterns": ["**/node_modules", "**/public", "**/dist", "**/*.js", "**/*.cjs"],
"settings": {
"react": {
"version": "17.0.2"
}
},
"rules": {
"react/display-name": "error",
}
}
But also Playground, see below.
oxlint reports react/display-name even though it is not a component. Its name does not start with a capital letter and neither of the functions returns JSX.
What version of Oxlint are you using?
1.66.0, but saw it even earlier
What command did you run?
oxlint
What does your
.oxlintrc.json(oroxlint.config.ts) config file look like?{ "$schema": "./node_modules/oxlint/configuration_schema.json", "plugins": ["react"], "categories": { "correctness": "off" }, "options": { "reportUnusedDisableDirectives": "error" }, "env": { "builtin": true, "browser": true, "es2024": true }, "ignorePatterns": ["**/node_modules", "**/public", "**/dist", "**/*.js", "**/*.cjs"], "settings": { "react": { "version": "17.0.2" } }, "rules": { "react/display-name": "error", } }But also Playground, see below.
What happened?
oxlint reports react/display-name even though it is not a component. Its name does not start with a capital letter and neither of the functions returns JSX.
https://playground.oxc.rs/?lintRules=react%2Fdisplay-name&options=%7B%22run%22%3A%7B%22lint%22%3Atrue%2C%22formatter%22%3Afalse%2C%22transform%22%3Afalse%2C%22isolatedDeclarations%22%3Afalse%2C%22whitespace%22%3Afalse%2C%22mangle%22%3Afalse%2C%22compress%22%3Afalse%2C%22scope%22%3Atrue%2C%22symbol%22%3Atrue%2C%22cfg%22%3Afalse%7D%2C%22parser%22%3A%7B%22extension%22%3A%22tsx%22%2C%22allowReturnOutsideFunction%22%3Atrue%2C%22preserveParens%22%3Atrue%2C%22allowV8Intrinsics%22%3Atrue%2C%22semanticErrors%22%3Atrue%7D%2C%22linter%22%3A%7B%22config%22%3A%22%7B%5C%22categories%5C%22%3A%7B%5C%22correctness%5C%22%3A%5C%22off%5C%22%7D%2C%5C%22rules%5C%22%3A%7B%5C%22react%2Fdisplay-name%5C%22%3A%5C%22error%5C%22%7D%2C%5C%22plugins%5C%22%3A%5B%5C%22eslint%5C%22%2C%5C%22oxc%5C%22%2C%5C%22typescript%5C%22%2C%5C%22unicorn%5C%22%2C%5C%22react%5C%22%5D%7D%22%7D%2C%22formatter%22%3A%7B%22useTabs%22%3Afalse%2C%22tabWidth%22%3A2%2C%22endOfLine%22%3A%22lf%22%2C%22printWidth%22%3A80%2C%22singleQuote%22%3Afalse%2C%22jsxSingleQuote%22%3Afalse%2C%22quoteProps%22%3A%22as-needed%22%2C%22trailingComma%22%3A%22all%22%2C%22semi%22%3Atrue%2C%22arrowParens%22%3A%22always%22%2C%22bracketSpacing%22%3Atrue%2C%22bracketSameLine%22%3Afalse%2C%22objectWrap%22%3A%22preserve%22%2C%22singleAttributePerLine%22%3Afalse%7D%2C%22transformer%22%3A%7B%22target%22%3A%22es2022%22%2C%22useDefineForClassFields%22%3Atrue%2C%22experimentalDecorators%22%3Atrue%2C%22emitDecoratorMetadata%22%3Atrue%2C%22optimizeEnums%22%3Atrue%2C%22optimizeConstEnums%22%3Atrue%7D%2C%22isolatedDeclarations%22%3A%7B%22stripInternal%22%3Afalse%7D%2C%22codegen%22%3A%7B%22normal%22%3Atrue%2C%22jsdoc%22%3Atrue%2C%22annotation%22%3Atrue%2C%22legal%22%3Atrue%7D%2C%22compress%22%3A%7B%7D%2C%22mangle%22%3A%7B%22topLevel%22%3Atrue%2C%22keepNames%22%3Afalse%7D%2C%22controlFlow%22%3A%7B%22verbose%22%3Afalse%7D%2C%22inject%22%3A%7B%22inject%22%3A%7B%7D%7D%2C%22define%22%3A%7B%22define%22%3A%7B%7D%7D%7D&code=const+createHandler+%3D+%28%29+%3D%3E+%28%29+%3D%3E+%7B%0A++someGlobalFunc%28%3Cdiv+%2F%3E%29%3B%0A%7D%3B%0A