@bigbinary/neeto-commons-frontend 2.0.76 → 2.0.77

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.
@@ -35,15 +35,11 @@ const generatePathGroupsFromAssets = assetsPath => {
35
35
 
36
36
  const buildPathGroupsBasedOnWebpackAliases = ({
37
37
  customAliasPath = "config/webpack/resolve.js",
38
+ commonAliasPath = "node_modules/@bigbinary/neeto-commons-frontend/configs/webpack/resolve.js",
38
39
  }) => {
39
40
  const rootOfProject = path.join(__dirname, "../../../../../../");
40
41
  const projectResolve = loadJS(path.join(rootOfProject, customAliasPath));
41
- const commonResolve = loadJS(
42
- path.join(
43
- rootOfProject,
44
- "node_modules/@bigbinary/neeto-commons-frontend/configs/webpack/resolve.js"
45
- )
46
- );
42
+ const commonResolve = loadJS(path.join(rootOfProject, commonAliasPath));
47
43
 
48
44
  const { dependencies = [], devDependencies = [] } = loadJS(
49
45
  path.join(rootOfProject, "package.json")
@@ -1,9 +1,16 @@
1
1
  const { assocPath } = require("ramda");
2
2
 
3
+ const {
4
+ buildPathGroupsBasedOnWebpackAliases,
5
+ } = require("../../../eslint/helpers");
3
6
  const commonConfig = require("../../../eslint/imports/order");
4
- const { buildPathGroupsBasedOnWebpackAliases } = require("../helpers");
5
7
 
6
- const pathGroups = buildPathGroupsBasedOnWebpackAliases({});
8
+ const pathGroups = buildPathGroupsBasedOnWebpackAliases({
9
+ customAliasPath: "resolve.js",
10
+ commonAliasPath:
11
+ "node_modules/@bigbinary/neeto-commons-frontend/configs/nanos/webpack/resolve.js",
12
+ });
13
+
7
14
  const pathGroupForKeepingReactImportsAtTop = {
8
15
  pattern: "react+(-native|)",
9
16
  group: "external",
@@ -0,0 +1,25 @@
1
+ const { assocPath } = require("ramda");
2
+
3
+ const {
4
+ buildPathGroupsBasedOnWebpackAliases,
5
+ } = require("../../../eslint/helpers");
6
+ const commonConfig = require("../../../eslint/imports/order");
7
+
8
+ const pathGroups = buildPathGroupsBasedOnWebpackAliases({
9
+ customAliasPath: "resolve.js",
10
+ commonAliasPath:
11
+ "node_modules/@bigbinary/neeto-commons-frontend/configs/nextjs/webpack/resolve.js",
12
+ });
13
+
14
+ const pathGroupForKeepingReactImportsAtTop = {
15
+ pattern: "react+(-native|)",
16
+ group: "external",
17
+ position: "before",
18
+ };
19
+ pathGroups.push(pathGroupForKeepingReactImportsAtTop);
20
+
21
+ module.exports = assocPath(
22
+ ["rules", "import/order", 1, "pathGroups"],
23
+ pathGroups,
24
+ commonConfig
25
+ );
@@ -0,0 +1,23 @@
1
+ const { mergeLeft } = require("ramda");
2
+
3
+ const commonConfiguration = require("../../eslint");
4
+
5
+ const nanosConfiguration = {
6
+ extends: [
7
+ "plugin:@bigbinary/neeto/recommended",
8
+ "plugin:cypress/recommended",
9
+ "plugin:json/recommended",
10
+ "eslint:recommended",
11
+ "plugin:react/recommended",
12
+ "./node_modules/@bigbinary/neeto-commons-frontend/configs/eslint/globals",
13
+ "./node_modules/@bigbinary/neeto-commons-frontend/configs/nextjs/eslint/imports/order",
14
+ "./node_modules/@bigbinary/neeto-commons-frontend/configs/eslint/overrides",
15
+ "./node_modules/@bigbinary/neeto-commons-frontend/configs/eslint/imports/enforced",
16
+ "./node_modules/@bigbinary/neeto-commons-frontend/configs/eslint/react",
17
+ "./node_modules/@bigbinary/neeto-commons-frontend/configs/eslint/promise",
18
+ "./node_modules/@bigbinary/neeto-commons-frontend/configs/nextjs/eslint/neeto",
19
+ "prettier",
20
+ ],
21
+ };
22
+
23
+ module.exports = mergeLeft(nanosConfiguration, commonConfiguration);
@@ -0,0 +1,33 @@
1
+ const path = require("path");
2
+
3
+ const { mergeDeepLeft } = require("ramda");
4
+
5
+ const rootOfTheProject = path.join(__dirname, "../../../../../../");
6
+ const pathToResolveFile = "resolve.js";
7
+
8
+ const loadJS = jsPath => {
9
+ try {
10
+ return require(path.join(rootOfTheProject, jsPath));
11
+ } catch {
12
+ return {};
13
+ }
14
+ };
15
+
16
+ const commonResolve = loadJS(
17
+ "node_modules/@bigbinary/neeto-commons-frontend/configs/nextjs/webpack/resolve.js"
18
+ );
19
+ const projectResolve = loadJS(pathToResolveFile);
20
+ const resolve = mergeDeepLeft(projectResolve, commonResolve);
21
+
22
+ module.exports = {
23
+ rules: {
24
+ "@bigbinary/neeto/file-name-and-export-name-standards": "off",
25
+ "@bigbinary/neeto/no-axios-import-outside-apis": "off",
26
+ "@bigbinary/neeto/no-missing-localization": "off",
27
+ "@bigbinary/neeto/prefix-neeto-ui-import-alias": ["error", resolve.alias],
28
+ "@bigbinary/neeto/use-react-query-for-managing-remote-data": "off",
29
+ "@bigbinary/neeto/use-webpack-alias": ["error", resolve.alias],
30
+ "@bigbinary/neeto/webpack-aliases-and-jsconfig-paths-should-be-in-sync":
31
+ "off",
32
+ },
33
+ };
@@ -0,0 +1 @@
1
+ module.exports = {};