@bigbinary/eslint-plugin-neeto 1.1.40 → 1.1.41
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 +24 -20
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('path'), require('ramda'), require('@bigbinary/neeto-cist'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['path', 'ramda', '@bigbinary/neeto-cist', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global["@bigbinary/eslint-plugin-neeto"] = factory(global.path$2, global.ramda, global["@bigbinary/neeto-cist"], global.
|
|
5
|
-
})(this, (function (path$2, ramda, neetoCist,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('fs'), require('path'), require('ramda'), require('@bigbinary/neeto-cist'), require('@bigbinary/neeto-commons-frontend/constants')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['fs', 'path', 'ramda', '@bigbinary/neeto-cist', '@bigbinary/neeto-commons-frontend/constants'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global["@bigbinary/eslint-plugin-neeto"] = factory(global.fs, global.path$2, global.ramda, global["@bigbinary/neeto-cist"], global.neetoCommonsConstants));
|
|
5
|
+
})(this, (function (fs, path$2, ramda, neetoCist, neetoCommonsConstants) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -24,16 +24,16 @@
|
|
|
24
24
|
return Object.freeze(n);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
var path__default = /*#__PURE__*/_interopDefaultLegacy(path$2);
|
|
28
27
|
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
|
|
28
|
+
var path__default = /*#__PURE__*/_interopDefaultLegacy(path$2);
|
|
29
29
|
var neetoCommonsConstants__namespace = /*#__PURE__*/_interopNamespace(neetoCommonsConstants);
|
|
30
30
|
|
|
31
|
-
var absolutePath = function absolutePath(jsPath) {
|
|
31
|
+
var absolutePath$1 = function absolutePath(jsPath) {
|
|
32
32
|
return path__default["default"].resolve(__dirname, "../../../..", jsPath);
|
|
33
33
|
};
|
|
34
34
|
var loadJS$2 = function loadJS(jsPath) {
|
|
35
35
|
try {
|
|
36
|
-
return require(absolutePath(jsPath));
|
|
36
|
+
return require(absolutePath$1(jsPath));
|
|
37
37
|
} catch (_unused) {
|
|
38
38
|
return {};
|
|
39
39
|
}
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@bigbinary/neeto/ensure-zustand-stores-are-type-annotated": "error",
|
|
63
63
|
"@bigbinary/neeto/files-inside-react-query-folder-should-end-with-api": "warn",
|
|
64
64
|
"@bigbinary/neeto/file-name-and-export-name-standards": ["error", {
|
|
65
|
-
basePath:
|
|
65
|
+
basePath: absolutePath$1("app/javascript/src"),
|
|
66
66
|
"default": {
|
|
67
67
|
filenameCase: "camelCase",
|
|
68
68
|
exportnameCase: "camelCase"
|
|
@@ -111,9 +111,9 @@
|
|
|
111
111
|
"@bigbinary/neeto/no-globalProps-destructure": "error",
|
|
112
112
|
"@bigbinary/neeto/no-globalProps-reassignment": "error",
|
|
113
113
|
"@bigbinary/neeto/no-missing-localization": ["error", {
|
|
114
|
-
translationsDir: absolutePath("app/javascript/src/translations"),
|
|
114
|
+
translationsDir: absolutePath$1("app/javascript/src/translations"),
|
|
115
115
|
languages: ["en"],
|
|
116
|
-
nanosTranslationDir: [absolutePath("node_modules/@bigbinary/neeto-
|
|
116
|
+
nanosTranslationDir: [absolutePath$1("node_modules/@bigbinary/neeto-commons-frontend/translations")]
|
|
117
117
|
}],
|
|
118
118
|
"@bigbinary/neeto/no-multiple-components-in-a-file": "error",
|
|
119
119
|
"@bigbinary/neeto/no-multiple-translation-functions-under-same-parent": "error",
|
|
@@ -146,8 +146,8 @@
|
|
|
146
146
|
"@bigbinary/neeto/use-zustand-for-global-state-management": "error",
|
|
147
147
|
"@bigbinary/neeto/use-zustand-pick-transformer": "warn",
|
|
148
148
|
"@bigbinary/neeto/webpack-aliases-and-jsconfig-paths-should-be-in-sync": ["error", {
|
|
149
|
-
jsconfigFilePath:
|
|
150
|
-
aliasFilePath:
|
|
149
|
+
jsconfigFilePath: absolutePath$1("app/javascript/jsconfig.json"),
|
|
150
|
+
aliasFilePath: absolutePath$1("config/webpack/resolve.js")
|
|
151
151
|
}],
|
|
152
152
|
"@bigbinary/neeto/zustand-recommend-comparator-function-usage": "warn",
|
|
153
153
|
"@bigbinary/neeto/zustand-use-prop-to-pick-single-item": "error",
|
|
@@ -178,13 +178,16 @@
|
|
|
178
178
|
rules: rules
|
|
179
179
|
};
|
|
180
180
|
|
|
181
|
-
var
|
|
182
|
-
|
|
181
|
+
var absolutePath = function absolutePath(jsPath) {
|
|
182
|
+
return path__default["default"].resolve(__dirname, "../../../..", jsPath);
|
|
183
|
+
};
|
|
184
|
+
var srcPath = fs__default["default"].existsSync(absolutePath("src")) ? absolutePath("src") : absolutePath("app/javascript/src");
|
|
185
|
+
var pathToTranslationsDir = "".concat(srcPath, "/translations");
|
|
183
186
|
var pathToResolveFile$1 = "resolve.js";
|
|
184
187
|
var pathToJsConfigFile = "jsconfig.json";
|
|
185
188
|
var loadJS$1 = function loadJS(jsPath) {
|
|
186
189
|
try {
|
|
187
|
-
return require(
|
|
190
|
+
return require(absolutePath(jsPath));
|
|
188
191
|
} catch (_unused) {
|
|
189
192
|
return {};
|
|
190
193
|
}
|
|
@@ -195,7 +198,7 @@
|
|
|
195
198
|
var nanosRecommended = ramda.mergeDeepRight(recommended, {
|
|
196
199
|
rules: {
|
|
197
200
|
"@bigbinary/neeto/file-name-and-export-name-standards": ["warn", {
|
|
198
|
-
basePath:
|
|
201
|
+
basePath: srcPath,
|
|
199
202
|
"default": {
|
|
200
203
|
filenameCase: "camelCase",
|
|
201
204
|
exportnameCase: "camelCase"
|
|
@@ -234,14 +237,15 @@
|
|
|
234
237
|
}],
|
|
235
238
|
"@bigbinary/neeto/no-axios-import-outside-apis": ["error", resolve$1.alias],
|
|
236
239
|
"@bigbinary/neeto/no-missing-localization": ["error", {
|
|
237
|
-
translationsDir:
|
|
238
|
-
languages: ["en"]
|
|
240
|
+
translationsDir: pathToTranslationsDir,
|
|
241
|
+
languages: ["en"],
|
|
242
|
+
nanosTranslationDir: [absolutePath("node_modules/@bigbinary/neeto-commons-frontend/translations")]
|
|
239
243
|
}],
|
|
240
244
|
"@bigbinary/neeto/prefix-neeto-ui-import-alias": ["error", resolve$1.alias],
|
|
241
245
|
"@bigbinary/neeto/use-webpack-alias": ["error", resolve$1.alias],
|
|
242
246
|
"@bigbinary/neeto/webpack-aliases-and-jsconfig-paths-should-be-in-sync": ["error", {
|
|
243
|
-
jsconfigFilePath:
|
|
244
|
-
aliasFilePath:
|
|
247
|
+
jsconfigFilePath: absolutePath(pathToJsConfigFile),
|
|
248
|
+
aliasFilePath: absolutePath(pathToResolveFile$1)
|
|
245
249
|
}],
|
|
246
250
|
"@bigbinary/neeto/add-required-peer-dependencies": "error"
|
|
247
251
|
}
|