@eui/tools 6.3.21 → 6.3.22

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 +1 @@
1
- 6.3.21
1
+ 6.3.22
package/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 6.3.22 (2023-02-08)
2
+
3
+ ##### Chores
4
+
5
+ * **other:**
6
+ * add lint-app for project linting - EUI-6799 [EUI-6799](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-6799) ([7f883d57](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/7f883d57d7db4891927e1f27c653be04c67ec056))
7
+
8
+ * * *
9
+ * * *
1
10
  ## 6.3.21 (2023-02-07)
2
11
 
3
12
  ##### Chores
@@ -21,6 +21,7 @@ const scriptIndex = args.findIndex(
21
21
  x === 'serve-element' ||
22
22
  x === 'serve-remote' ||
23
23
  x === 'serve-mock' ||
24
+ x === 'lint-app' ||
24
25
  x === 'start-symfony' ||
25
26
  x === 'a11y-app' ||
26
27
  x === 'commit' ||
@@ -63,6 +64,7 @@ switch (script) {
63
64
  case 'serve-element':
64
65
  case 'serve-remote':
65
66
  case 'serve-mock':
67
+ case 'lint-app':
66
68
  case 'start-symfony':
67
69
  case 'a11y-app':
68
70
  case 'commit':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eui/tools",
3
- "version": "6.3.21",
3
+ "version": "6.3.22",
4
4
  "tag": "latest",
5
5
  "license": "EUPL-1.1",
6
6
  "description": "eUI common tools and scripts",
@@ -5,10 +5,7 @@ const path = require('path');
5
5
  const tools = require('../../tools');
6
6
  const configUtils = require('../../../csdr/config/config-utils');
7
7
 
8
- let {
9
- skipLint, skipTest, baseHref, maxSpaceSize, sourceMap,
10
- } = tools.getArgs();
11
-
8
+ let { skipLint, fix } = tools.getArgs();
12
9
 
13
10
  const getProjectInfos = () => {
14
11
  // getting the project from installed config
@@ -29,28 +26,13 @@ module.exports.run = () => {
29
26
 
30
27
  const currentProject = getProjectInfos();
31
28
 
32
- const ng = path.resolve(currentProject.paths.nodeModulesPath, '@angular', 'cli', 'bin', 'ng');
33
-
34
29
  // getting param from project config
35
30
  if (currentProject.build) {
36
31
  if (currentProject.build.skipLint) {
37
32
  skipLint = true;
38
33
  }
39
- if (currentProject.build.skipTest) {
40
- skipTest = true;
41
- }
42
- if (currentProject.build.maxSpaceSize) {
43
- maxSpaceSize = true;
44
- }
45
- if (currentProject.build.sourceMap) {
46
- sourceMap = true;
47
- }
48
- // getting baseHref from project config, dynamic or staticly defined
49
- baseHref = configUtils.projects.getBaseHref(currentProject, version, baseHref);
50
- tools.logInfo(`base-href found : ${baseHref}`);
51
34
  }
52
35
 
53
-
54
36
  return Promise.resolve()
55
37
  .then(() => {
56
38
  if (!skipLint) {
@@ -72,10 +54,14 @@ module.exports.run = () => {
72
54
  }
73
55
  } else if (esLintPath) {
74
56
  // the project path information are located inside the .eslintrc.json
75
- tools.logInfo(`running ng lint ${currentProject.name}`);
76
- return tools.runScript(`ng lint ${currentProject.name}`);
57
+ let script = `ng lint ${currentProject.name}`;
58
+ if (fix) {
59
+ script += ' --fix';
60
+ }
61
+ tools.logInfo(`running ${script}`);
62
+ return tools.runScript(script);
77
63
  } else {
78
- tools.logError(`No ESLint or TSLint configuration found for the project`);
64
+ tools.logError(`No ESLint or TSLint configuration found for the project...skipping`);
79
65
  }
80
66
 
81
67
  }