🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

eslint-plugin-react-naming-convention

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-react-naming-convention - npm Package Compare versions

Comparing version

to
2.0.0-next.16

@@ -22,4 +22,2 @@ import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';

allowAllCaps?: boolean;
allowLeadingUnderscore?: boolean;
allowNamespace?: boolean;
excepts?: readonly string[];

@@ -31,3 +29,2 @@ rule?: "CONSTANT_CASE" | "PascalCase";

excepts?: readonly string[];
extensions?: readonly string[];
rule?: "PascalCase" | "camelCase" | "kebab-case" | "snake_case";

@@ -59,4 +56,2 @@ } | undefined], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;

allowAllCaps?: boolean;
allowLeadingUnderscore?: boolean;
allowNamespace?: boolean;
excepts?: readonly string[];

@@ -68,3 +63,2 @@ rule?: "CONSTANT_CASE" | "PascalCase";

excepts?: readonly string[];
extensions?: readonly string[];
rule?: "PascalCase" | "camelCase" | "kebab-case" | "snake_case";

@@ -71,0 +65,0 @@ } | undefined], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;

@@ -32,3 +32,3 @@ import * as AST from '@eslint-react/ast';

var name2 = "eslint-plugin-react-naming-convention";
var version = "2.0.0-next.14";
var version = "2.0.0-next.16";
var createRule = ESLintUtils.RuleCreator(getDocsUrl("naming-convention"));

@@ -56,12 +56,2 @@

allowAllCaps: { type: "boolean" },
/**
* @todo Remove in the next major version
* @deprecated
*/
allowLeadingUnderscore: { type: "boolean" },
/**
* @todo Remove in the next major version
* @deprecated
*/
allowNamespace: { type: "boolean" },
excepts: {

@@ -195,3 +185,2 @@ type: "array",

excepts: ["^index$"],
extensions: [".js", ".jsx", ".ts", ".tsx"],
rule: "PascalCase"

@@ -249,5 +238,5 @@ }

const rule = typeof options === "string" ? options : options.rule ?? "PascalCase";
const excepts = typeof options === "string" ? [] : options.excepts ?? [];
const excepts = typeof options === "string" ? [] : (options.excepts ?? []).map((s) => RegExp.toRegExp(s));
function validate(name3, casing = rule, ignores = excepts) {
const shouldIgnore = ignores.map((s) => RegExp.toRegExp(s)).some((pattern) => pattern.test(name3));
const shouldIgnore = ignores.some((pattern) => pattern.test(name3));
if (shouldIgnore) return true;

@@ -254,0 +243,0 @@ return match(casing).with("PascalCase", () => RegExp.PASCAL_CASE.test(name3)).with("camelCase", () => RegExp.CAMEL_CASE.test(name3)).with("kebab-case", () => RegExp.KEBAB_CASE.test(name3)).with("snake_case", () => RegExp.SNAKE_CASE.test(name3)).exhaustive();

{
"name": "eslint-plugin-react-naming-convention",
"version": "2.0.0-next.14",
"version": "2.0.0-next.16",
"description": "ESLint React's ESLint plugin for naming convention related rules.",

@@ -38,17 +38,17 @@ "keywords": [

"dependencies": {
"@typescript-eslint/scope-manager": "^8.31.1",
"@typescript-eslint/type-utils": "^8.31.1",
"@typescript-eslint/types": "^8.31.1",
"@typescript-eslint/utils": "^8.31.1",
"@typescript-eslint/scope-manager": "^8.32.0",
"@typescript-eslint/type-utils": "^8.32.0",
"@typescript-eslint/types": "^8.32.0",
"@typescript-eslint/utils": "^8.32.0",
"string-ts": "^2.2.1",
"ts-pattern": "^5.7.0",
"@eslint-react/ast": "2.0.0-next.14",
"@eslint-react/core": "2.0.0-next.14",
"@eslint-react/eff": "2.0.0-next.14",
"@eslint-react/kit": "2.0.0-next.14",
"@eslint-react/shared": "2.0.0-next.14",
"@eslint-react/var": "2.0.0-next.14"
"@eslint-react/ast": "2.0.0-next.16",
"@eslint-react/core": "2.0.0-next.16",
"@eslint-react/eff": "2.0.0-next.16",
"@eslint-react/kit": "2.0.0-next.16",
"@eslint-react/shared": "2.0.0-next.16",
"@eslint-react/var": "2.0.0-next.16"
},
"devDependencies": {
"@types/react": "^19.1.2",
"@types/react": "^19.1.3",
"@types/react-dom": "^19.1.3",

@@ -55,0 +55,0 @@ "tsup": "^8.4.0",