@mimik/local 5.0.4 → 5.0.7

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.
@@ -1,36 +1,71 @@
1
1
  {
2
- "env": {
3
- "node": true
4
- },
5
- "plugins": [
6
- "@mimik/document-env",
7
- "@mimik/dependencies"
2
+ "env": {
3
+ "node": true
4
+ },
5
+ "plugins": [
6
+ "@mimik/document-env",
7
+ "@mimik/dependencies"
8
+ ],
9
+ "extends": "airbnb",
10
+ "parserOptions": {
11
+ "ecmaVersion": 2020
12
+ },
13
+ "rules": {
14
+ "import/no-extraneous-dependencies": [
15
+ "error",
16
+ {
17
+ "devDependencies": true
18
+ }
19
+ ],
20
+ "import/no-unresolved": [
21
+ "error",
22
+ {
23
+ "amd": true,
24
+ "commonjs": true,
25
+ "caseSensitiveStrict": true
26
+ }
8
27
  ],
9
- "extends": "airbnb",
10
- "parserOptions": {
11
- "ecmaVersion": 2020
12
- },
13
- "rules": {
14
- "import/no-extraneous-dependencies": ["error", { "devDependencies": true }],
15
- "import/no-unresolved": ["error", { "amd": true, "commonjs": true, "caseSensitiveStrict": true }],
16
- "brace-style": [1, "stroustrup", { "allowSingleLine": true }],
17
- "no-confusing-arrow": [0],
18
- "max-len": [1, 180, { "ignoreComments": true }],
19
- "linebreak-style": 0,
20
- "quotes": [1, "single"],
21
- "semi": [1, "always"],
22
- "no-process-env": ["error"],
23
- "@mimik/document-env/validate-document-env": 2,
24
- "@mimik/dependencies/case-sensitive": 2,
25
- "@mimik/dependencies/no-cycles": 2,
26
- "@mimik/dependencies/require-json-ext": 2
27
- },
28
- "overrides": [
28
+ "brace-style": [
29
+ 1,
30
+ "stroustrup",
31
+ {
32
+ "allowSingleLine": true
33
+ }
34
+ ],
35
+ "no-confusing-arrow": [
36
+ 0
37
+ ],
38
+ "max-len": [
39
+ 1,
40
+ 180,
41
+ {
42
+ "ignoreComments": true
43
+ }
44
+ ],
45
+ "linebreak-style": 0,
46
+ "quotes": [
47
+ 1,
48
+ "single"
49
+ ],
50
+ "semi": [
51
+ 1,
52
+ "always"
53
+ ],
54
+ "no-process-env": [
55
+ "error"
56
+ ],
57
+ "@mimik/document-env/validate-document-env": 2,
58
+ "@mimik/dependencies/case-sensitive": 2,
59
+ "@mimik/dependencies/no-cycles": 2,
60
+ "@mimik/dependencies/require-json-ext": 2
61
+ },
62
+ "ignorePatterns": [
63
+ "manual-test/**/*.js"
64
+ ],
65
+ "overrides": [
29
66
  {
30
67
  "files": [
31
- "src/configuration/config.js",
32
- "test/**/*.js",
33
- "tools/**/*.js"
68
+ "src/configuration/config.js"
34
69
  ],
35
70
  "rules": {
36
71
  "no-process-env": "off"
@@ -42,23 +77,26 @@
42
77
  "tools/**/*.js"
43
78
  ],
44
79
  "rules": {
80
+ "no-process-env": "off",
81
+ "import/no-extraneous-dependencies": "off",
82
+ "import/no-dynamic-require": "off",
45
83
  "@mimik/document-env/validate-document-env": "off"
46
84
  }
47
85
  }
48
- ],
49
- "settings": {
50
- "react": {
51
- "version": "detect"
52
- },
53
- },
54
- "globals": {
55
- "module": true,
56
- "require": true,
57
- "const": false,
58
- "it": false,
59
- "describe": false,
60
- "before": true,
61
- "after": true,
62
- "JSON": true
86
+ ],
87
+ "settings": {
88
+ "react": {
89
+ "version": "detect"
63
90
  }
64
- }
91
+ },
92
+ "globals": {
93
+ "module": true,
94
+ "require": true,
95
+ "const": false,
96
+ "it": false,
97
+ "describe": false,
98
+ "before": true,
99
+ "after": true,
100
+ "JSON": true
101
+ }
102
+ }
package/lib/helpers.js CHANGED
@@ -33,11 +33,11 @@ const read = (filename, regType) => {
33
33
  return readFile;
34
34
  };
35
35
 
36
- const write = (fname, origContent, regType, withJSON) => {
37
- let content = origContent;
38
-
39
- if (withJSON) content = json.stringify(content, null, 2);
40
- try { fs.writeFileSync(fname, content); }
36
+ const write = (fname, content, regType, withJSON) => {
37
+ try {
38
+ if (withJSON) fs.writeFileSync(fname, json.stringify(content, null, 2));
39
+ else fs.writeFileSync(fname, content, null, 2);
40
+ }
41
41
  catch (err) { exitError(regType, err, fname); }
42
42
  return content;
43
43
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mimik/local",
3
- "version": "5.0.4",
3
+ "version": "5.0.7",
4
4
  "description": "Local setup configuration for normal and test opreration",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/scripts.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "scripts": {
3
3
  "lint": "eslint --ignore-path .gitignore .",
4
- "docs": "jsdoc2md index.js > README.md",
4
+ "docs": "jsdoc2md ./src/configuration/config.js > README.md",
5
5
  "pretest": "node ./local/testSetup.js",
6
- "test": "mocha --reporter mochawesome --bail --check-leaks test/",
6
+ "test": "mocha --reporter mochawesome --bail --check-leaks --exit test/",
7
7
  "test-ci": "nyc --reporter=lcov --reporter=text npm test",
8
8
  "prestart": "node ./local/setup.js",
9
9
  "start": "sh server-start.sh",