{"record":{"id":"e5bb1e4c2058af73","repo":"oxc-project/oxc","slug":"filename-should-be-in-cases","errorCode":null,"errorMessage":"Filename should be in {cases}","messagePattern":"Filename should be in (.+?)","errorType":"validation","errorClass":"OxcDiagnostic","httpStatus":null,"severity":"error","filePath":"crates/oxc_linter/src/rules/unicorn/filename_case.rs","lineNumber":18,"sourceCode":"use convert_case::{Boundary, Case, Converter};\nuse cow_utils::CowUtils;\nuse lazy_regex::Regex;\nuse schemars::JsonSchema;\nuse serde::{Deserialize, Serialize};\n\nuse oxc_diagnostics::OxcDiagnostic;\nuse oxc_macros::declare_oxc_lint;\nuse oxc_span::Span;\n\nuse crate::{\n    context::{ContextHost, LintContext},\n    rule::{DefaultRuleConfig, Rule},\n    utils::{default_true, deserialize_regex_vec},\n};\n\nfn filename_case_diagnostic(message: String, help_message: String) -> OxcDiagnostic {\n    OxcDiagnostic::warn(message).with_label(Span::default()).with_help(help_message)\n}\n\n#[derive(Debug, Clone, Default)]\npub struct FilenameCase(Box<FilenameCaseConfig>);\n\nimpl std::ops::Deref for FilenameCase {\n    type Target = FilenameCaseConfig;\n\n    fn deref(&self) -> &Self::Target {\n        &self.0\n    }\n}\n\n#[derive(Debug, Clone)]\npub struct FilenameCaseConfig {\n    kebab_case: bool,\n    camel_case: bool,\n    snake_case: bool,","sourceCodeStart":1,"sourceCodeEnd":36,"githubUrl":"https://github.com/oxc-project/oxc/blob/e1e7af627c8843ab64044ed466b128fcc21a035b/crates/oxc_linter/src/rules/unicorn/filename_case.rs#L1-L36","documentation":"Raised by unicorn/filename-case when a file's name does not match the configured casing convention (e.g. camelCase, kebab-case, pascalCase, snakeCase). Enforces consistent file naming across the project.","triggerScenarios":"Thrown at crates/oxc_linter/src/rules/unicorn/filename_case.rs:18 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Rename the file to the configured case (the help message shows the exact suggestion).","Adjust the rule's cases option to allow the current convention.","Add the file to the rule's ignore list if the name is fixed by convention (e.g. LICENSE)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e1e7af627c8843ab64044ed466b128fcc21a035b","analyzedAt":"2026-08-20T07:01:07.079Z","contentChangedAt":"2026-08-20T07:01:07.079Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}