eslint-plugin-react-naming-convention
Advanced tools
@@ -57,3 +57,3 @@ 'use strict'; | ||
var name2 = "eslint-plugin-react-naming-convention"; | ||
var version = "1.29.1-next.3"; | ||
var version = "1.29.1-next.4"; | ||
var createRule = shared.createRuleForPlugin("naming-convention"); | ||
@@ -216,6 +216,6 @@ | ||
docs: { | ||
description: "enforce context name to end with 'Context'" | ||
description: "enforces context name to be a valid component name with the suffix 'Context'" | ||
}, | ||
messages: { | ||
contextName: "Context name must end with 'Context'." | ||
contextName: "In React 19, you can render '<Context>' as a provider instead of '<Context.Provider>', it's name must be a valid component name with the suffix 'Context'." | ||
}, | ||
@@ -233,4 +233,3 @@ schema: [] | ||
const name3 = tsPattern.match(id).with({ type: types.AST_NODE_TYPES.Identifier, name: tsPattern.P.select() }, eff.identity).with({ type: types.AST_NODE_TYPES.MemberExpression, property: { name: tsPattern.P.select(tsPattern.P.string) } }, eff.identity).otherwise(() => eff._); | ||
if (name3 == null) return; | ||
if (name3.endsWith("Context")) return; | ||
if (name3 != null && /^[A-Z]/.test(name3) && name3.endsWith("Context")) return; | ||
context.report({ | ||
@@ -237,0 +236,0 @@ messageId: "contextName", |
{ | ||
"name": "eslint-plugin-react-naming-convention", | ||
"version": "1.29.1-next.3", | ||
"version": "1.29.1-next.4", | ||
"description": "ESLint React's ESLint plugin for naming convention related rules.", | ||
@@ -52,8 +52,8 @@ "keywords": [ | ||
"ts-pattern": "^5.6.2", | ||
"@eslint-react/ast": "1.29.1-next.3", | ||
"@eslint-react/jsx": "1.29.1-next.3", | ||
"@eslint-react/core": "1.29.1-next.3", | ||
"@eslint-react/var": "1.29.1-next.3", | ||
"@eslint-react/shared": "1.29.1-next.3", | ||
"@eslint-react/eff": "1.29.1-next.3" | ||
"@eslint-react/ast": "1.29.1-next.4", | ||
"@eslint-react/core": "1.29.1-next.4", | ||
"@eslint-react/eff": "1.29.1-next.4", | ||
"@eslint-react/jsx": "1.29.1-next.4", | ||
"@eslint-react/var": "1.29.1-next.4", | ||
"@eslint-react/shared": "1.29.1-next.4" | ||
}, | ||
@@ -60,0 +60,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
44133
0.72%258063
0.65%1067
-0.19%