@bigbinary/eslint-plugin-neeto 1.7.4 → 1.7.5
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 +19 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -68,6 +68,9 @@
|
|
|
68
68
|
exportnameCase: "camelCase"
|
|
69
69
|
},
|
|
70
70
|
configs: [{
|
|
71
|
+
filenameCase: "anycase",
|
|
72
|
+
includes: "/translations/**"
|
|
73
|
+
}, {
|
|
71
74
|
filenameCase: "camelCase",
|
|
72
75
|
exportnameCase: "CONSTANT_CASE",
|
|
73
76
|
includes: ["/**/constants.{js,jsx}", "/**/constants/**"]
|
|
@@ -209,6 +212,9 @@
|
|
|
209
212
|
exportnameCase: "camelCase"
|
|
210
213
|
},
|
|
211
214
|
configs: [{
|
|
215
|
+
filenameCase: "anycase",
|
|
216
|
+
includes: "/translations/**"
|
|
217
|
+
}, {
|
|
212
218
|
filenameCase: "camelCase",
|
|
213
219
|
exportnameCase: "CONSTANT_CASE",
|
|
214
220
|
includes: ["/**/constants.{js,jsx}", "/**/constants/**"]
|
|
@@ -324,7 +330,7 @@
|
|
|
324
330
|
}
|
|
325
331
|
|
|
326
332
|
var name = "@bigbinary/eslint-plugin-neeto";
|
|
327
|
-
var version = "1.7.
|
|
333
|
+
var version = "1.7.4";
|
|
328
334
|
var main = "dist/index.js";
|
|
329
335
|
var license = "UNLICENSED";
|
|
330
336
|
var scripts = {
|
|
@@ -5471,9 +5477,18 @@
|
|
|
5471
5477
|
|
|
5472
5478
|
var minimatch$1 = minimatch_1;
|
|
5473
5479
|
|
|
5480
|
+
var _CASE_REGEXES;
|
|
5474
5481
|
var EXPORT_PATTERN = {
|
|
5475
5482
|
type: ramda.includes(ramda.__, [TYPES.EXPORT_DEFAULT_DECLARATION, TYPES.EXPORT_NAMED_DECLARATION])
|
|
5476
5483
|
};
|
|
5484
|
+
var CASE_STYLES = {
|
|
5485
|
+
camel: "camelCase",
|
|
5486
|
+
constant: "CONSTANT_CASE",
|
|
5487
|
+
pascal: "PascalCase",
|
|
5488
|
+
snake: "snake_case",
|
|
5489
|
+
any: "anycase"
|
|
5490
|
+
};
|
|
5491
|
+
var CASE_REGEXES = (_CASE_REGEXES = {}, _defineProperty(_CASE_REGEXES, CASE_STYLES.camel, CAMEL_CASE_REGEX), _defineProperty(_CASE_REGEXES, CASE_STYLES.constant, CONSTANT_CASE_REGEX), _defineProperty(_CASE_REGEXES, CASE_STYLES.pascal, PASCAL_CASE_REGEX), _defineProperty(_CASE_REGEXES, CASE_STYLES.snake, SNAKE_CASE_REGEX), _CASE_REGEXES);
|
|
5477
5492
|
|
|
5478
5493
|
var isInsideBaseDirectory = function isInsideBaseDirectory(context) {
|
|
5479
5494
|
return context.getFilename().startsWith(context.options[0].basePath);
|
|
@@ -5483,15 +5498,9 @@
|
|
|
5483
5498
|
return Array.isArray(item) ? item : new Array(item);
|
|
5484
5499
|
};
|
|
5485
5500
|
var isCaseMatching = function isCaseMatching(text, caseStyle) {
|
|
5486
|
-
var
|
|
5487
|
-
if (!text) return true;
|
|
5488
|
-
|
|
5489
|
-
camelCase: CAMEL_CASE_REGEX,
|
|
5490
|
-
CONSTANT_CASE: CONSTANT_CASE_REGEX,
|
|
5491
|
-
PascalCase: PASCAL_CASE_REGEX,
|
|
5492
|
-
snake_case: SNAKE_CASE_REGEX
|
|
5493
|
-
};
|
|
5494
|
-
return (_regexes$caseStyle$te = (_regexes$caseStyle = regexes[caseStyle]) === null || _regexes$caseStyle === void 0 ? void 0 : _regexes$caseStyle.test(text)) !== null && _regexes$caseStyle$te !== void 0 ? _regexes$caseStyle$te : true;
|
|
5501
|
+
var _CASE_REGEXES$caseSty, _CASE_REGEXES$caseSty2;
|
|
5502
|
+
if (!text || caseStyle === CASE_STYLES.any) return true;
|
|
5503
|
+
return (_CASE_REGEXES$caseSty = (_CASE_REGEXES$caseSty2 = CASE_REGEXES[caseStyle]) === null || _CASE_REGEXES$caseSty2 === void 0 ? void 0 : _CASE_REGEXES$caseSty2.test(text)) !== null && _CASE_REGEXES$caseSty !== void 0 ? _CASE_REGEXES$caseSty : true;
|
|
5495
5504
|
};
|
|
5496
5505
|
var findMatchedConfig = function findMatchedConfig(context, configs) {
|
|
5497
5506
|
var fullFilePath = context.getFilename();
|