eslint-plugin-react-naming-convention 2.0.0-beta.64 → 2.0.0-beta.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -6
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ const rules = { "react-naming-convention/context-name": "warn" };
|
|
|
31
31
|
//#endregion
|
|
32
32
|
//#region package.json
|
|
33
33
|
var name = "eslint-plugin-react-naming-convention";
|
|
34
|
-
var version = "2.0.0-beta.
|
|
34
|
+
var version = "2.0.0-beta.65";
|
|
35
35
|
|
|
36
36
|
//#endregion
|
|
37
37
|
//#region src/utils/create-rule.ts
|
|
@@ -185,10 +185,10 @@ const RULE_NAME$2 = "filename";
|
|
|
185
185
|
const defaultOptions$1 = [{
|
|
186
186
|
excepts: [
|
|
187
187
|
"index",
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
188
|
+
String.raw`/^_/`,
|
|
189
|
+
String.raw`/^\$/`,
|
|
190
|
+
String.raw`/^[0-9]+$/`,
|
|
191
|
+
String.raw`/^\[[^\]]+\]$/`
|
|
192
192
|
],
|
|
193
193
|
rule: "PascalCase"
|
|
194
194
|
}];
|
|
@@ -248,7 +248,7 @@ function create$2(context) {
|
|
|
248
248
|
const excepts = typeof options === "string" ? [] : (options.excepts ?? []).map((s) => RegExp.toRegExp(s));
|
|
249
249
|
function validate(name$2, casing = rule, ignores = excepts) {
|
|
250
250
|
if (ignores.some((pattern) => pattern.test(name$2))) return true;
|
|
251
|
-
const filteredName = name$2.match(/[\w
|
|
251
|
+
const filteredName = name$2.match(/[\w.-]/gu)?.join("") ?? "";
|
|
252
252
|
if (filteredName.length === 0) return true;
|
|
253
253
|
return match(casing).with("PascalCase", () => RegExp.PASCAL_CASE.test(filteredName)).with("camelCase", () => RegExp.CAMEL_CASE.test(filteredName)).with("kebab-case", () => RegExp.KEBAB_CASE.test(filteredName)).with("snake_case", () => RegExp.SNAKE_CASE.test(filteredName)).exhaustive();
|
|
254
254
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-naming-convention",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.65",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for naming convention related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
"@typescript-eslint/utils": "^8.42.0",
|
|
42
42
|
"string-ts": "^2.2.1",
|
|
43
43
|
"ts-pattern": "^5.8.0",
|
|
44
|
-
"@eslint-react/ast": "2.0.0-beta.
|
|
45
|
-
"@eslint-react/core": "2.0.0-beta.
|
|
46
|
-
"@eslint-react/
|
|
47
|
-
"@eslint-react/shared": "2.0.0-beta.
|
|
48
|
-
"@eslint-react/var": "2.0.0-beta.
|
|
49
|
-
"@eslint-react/
|
|
44
|
+
"@eslint-react/ast": "2.0.0-beta.65",
|
|
45
|
+
"@eslint-react/core": "2.0.0-beta.65",
|
|
46
|
+
"@eslint-react/kit": "2.0.0-beta.65",
|
|
47
|
+
"@eslint-react/shared": "2.0.0-beta.65",
|
|
48
|
+
"@eslint-react/var": "2.0.0-beta.65",
|
|
49
|
+
"@eslint-react/eff": "2.0.0-beta.65"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@types/react": "^19.1.12",
|