Skip to content

Commit cf0c24c

Browse files
committed
fix(linter): improve message in react/prefer-es6-class diagnostic (#11516)
this PR makes the `es6` casing consistent between both class diagnostics
1 parent d7dfbf2 commit cf0c24c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

crates/oxc_linter/src/rules/react/prefer_es6_class.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fn unexpected_es6_class_diagnostic(span: Span) -> OxcDiagnostic {
1515
}
1616

1717
fn expected_es6_class_diagnostic(span: Span) -> OxcDiagnostic {
18-
OxcDiagnostic::warn("Components should use es6 class instead of createClass.").with_label(span)
18+
OxcDiagnostic::warn("Components should use ES6 class instead of createClass.").with_label(span)
1919
}
2020

2121
#[derive(Debug, Default, Clone)]

crates/oxc_linter/src/snapshots/react_prefer_es6_class.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
source: crates/oxc_linter/src/tester.rs
33
---
4-
eslint-plugin-react(prefer-es6-class): Components should use es6 class instead of createClass.
4+
eslint-plugin-react(prefer-es6-class): Components should use ES6 class instead of createClass.
55
╭─[prefer_es6_class.tsx:2:25]
66
1 │
77
2 │ var Hello = createReactClass({
88
· ────────────────
99
3 │ displayName: 'Hello',
1010
╰────
1111

12-
eslint-plugin-react(prefer-es6-class): Components should use es6 class instead of createClass.
12+
eslint-plugin-react(prefer-es6-class): Components should use ES6 class instead of createClass.
1313
╭─[prefer_es6_class.tsx:2:25]
1414
1 │
1515
2 │ var Hello = createReactClass({

0 commit comments

Comments
 (0)