eslint-plugin-react-naming-convention 1.16.2-next.7 → 1.16.2-next.8

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 CHANGED
@@ -35,7 +35,7 @@ var path__default = /*#__PURE__*/_interopDefault(path);
35
35
 
36
36
  // package.json
37
37
  var name = "eslint-plugin-react-naming-convention";
38
- var version = "1.16.2-next.7";
38
+ var version = "1.16.2-next.8";
39
39
  var createRule = shared.createRuleForPlugin("naming-convention");
40
40
 
41
41
  // src/rules/component-name.ts
@@ -251,7 +251,7 @@ var RULE_NAME2 = "filename";
251
251
  var defaultOptions2 = [
252
252
  {
253
253
  excepts: ["^index$"],
254
- extensions: [".jsx", ".tsx"],
254
+ extensions: [".js", ".jsx", ".ts", ".tsx"],
255
255
  rule: "PascalCase"
256
256
  }
257
257
  ];
@@ -302,10 +302,7 @@ var filename_default = createRule({
302
302
  const options = context.options[0] ?? defaultOptions2[0];
303
303
  const rule = tools.isString(options) ? options : options.rule ?? "PascalCase";
304
304
  const excepts = tools.isString(options) ? [] : options.excepts ?? [];
305
- const extensions = tools.isObject(options) && "extensions" in options ? options.extensions : defaultOptions2[0].extensions;
306
305
  const filename = context.filename;
307
- const fileNameExt = filename.slice(filename.lastIndexOf("."));
308
- if (!extensions.includes(fileNameExt)) return {};
309
306
  function validate2(name2, casing = rule, ignores = excepts) {
310
307
  if (ignores.map((pattern) => new RegExp(pattern, "u")).some((pattern) => pattern.test(name2))) {
311
308
  return true;
package/dist/index.mjs CHANGED
@@ -9,7 +9,7 @@ import { AST_NODE_TYPES } from '@typescript-eslint/types';
9
9
 
10
10
  // package.json
11
11
  var name = "eslint-plugin-react-naming-convention";
12
- var version = "1.16.2-next.7";
12
+ var version = "1.16.2-next.8";
13
13
  var createRule = createRuleForPlugin("naming-convention");
14
14
 
15
15
  // src/rules/component-name.ts
@@ -225,7 +225,7 @@ var RULE_NAME2 = "filename";
225
225
  var defaultOptions2 = [
226
226
  {
227
227
  excepts: ["^index$"],
228
- extensions: [".jsx", ".tsx"],
228
+ extensions: [".js", ".jsx", ".ts", ".tsx"],
229
229
  rule: "PascalCase"
230
230
  }
231
231
  ];
@@ -276,10 +276,7 @@ var filename_default = createRule({
276
276
  const options = context.options[0] ?? defaultOptions2[0];
277
277
  const rule = isString(options) ? options : options.rule ?? "PascalCase";
278
278
  const excepts = isString(options) ? [] : options.excepts ?? [];
279
- const extensions = isObject(options) && "extensions" in options ? options.extensions : defaultOptions2[0].extensions;
280
279
  const filename = context.filename;
281
- const fileNameExt = filename.slice(filename.lastIndexOf("."));
282
- if (!extensions.includes(fileNameExt)) return {};
283
280
  function validate2(name2, casing = rule, ignores = excepts) {
284
281
  if (ignores.map((pattern) => new RegExp(pattern, "u")).some((pattern) => pattern.test(name2))) {
285
282
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-naming-convention",
3
- "version": "1.16.2-next.7",
3
+ "version": "1.16.2-next.8",
4
4
  "description": "ESLint React's ESLint plugin for naming convention related rules.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -46,12 +46,12 @@
46
46
  "@typescript-eslint/types": "^8.15.0",
47
47
  "@typescript-eslint/utils": "^8.15.0",
48
48
  "ts-pattern": "^5.5.0",
49
- "@eslint-react/ast": "1.16.2-next.7",
50
- "@eslint-react/shared": "1.16.2-next.7",
51
- "@eslint-react/types": "1.16.2-next.7",
52
- "@eslint-react/tools": "1.16.2-next.7",
53
- "@eslint-react/jsx": "1.16.2-next.7",
54
- "@eslint-react/core": "1.16.2-next.7"
49
+ "@eslint-react/ast": "1.16.2-next.8",
50
+ "@eslint-react/jsx": "1.16.2-next.8",
51
+ "@eslint-react/shared": "1.16.2-next.8",
52
+ "@eslint-react/tools": "1.16.2-next.8",
53
+ "@eslint-react/core": "1.16.2-next.8",
54
+ "@eslint-react/types": "1.16.2-next.8"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@types/react": "^18.3.12",