@eui/tools 5.3.33 → 5.3.34
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/.version.properties
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
5.3.
|
|
1
|
+
5.3.34
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## 5.3.34 (2022-07-14)
|
|
2
|
+
|
|
3
|
+
##### Chores
|
|
4
|
+
|
|
5
|
+
* **other:**
|
|
6
|
+
* support esLint for apps - EUI-6231 [EUI-6231](https://webgate.ec.europa.eu/CITnet/jira/browse/EUI-6231) ([6d211c50](https://webgate.ec.europa.eu/CITnet/stash/scm/csdr/eui-tools.git/commits/6d211c50cd08ec43d1d129fca64ec0bf010dec1c))
|
|
7
|
+
|
|
8
|
+
* * *
|
|
9
|
+
* * *
|
|
1
10
|
## 5.3.33 (2022-07-14)
|
|
2
11
|
|
|
3
12
|
##### Chores
|
package/package.json
CHANGED
|
@@ -58,6 +58,17 @@ const getProjectPaths = (prj) => {
|
|
|
58
58
|
nodeModulesPath: nodeModulesPath,
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
+
// locate and find the TSLint or ESLint configuration files
|
|
62
|
+
if(tools.isFileExists(path.join(rootPath, 'src', 'tslint.json'))) {
|
|
63
|
+
tools.logWarning('TSLint is deprecated and will be removed in the future. Consider migrating to ESLint')
|
|
64
|
+
paths.tslintPath = path.join(rootPath, 'src', 'tslint.json');
|
|
65
|
+
} else if(tools.isFileExists(path.join(rootPath, '.tslint.json'))) {
|
|
66
|
+
tools.logWarning('TSLint is deprecated and will be removed in the future. Consider migrating to ESLint')
|
|
67
|
+
paths.tslintPath = path.join(rootPath, '.tslint.json');
|
|
68
|
+
} else if(tools.isFileExists(path.join(rootPath, 'src', '.eslintrc.json'))) {
|
|
69
|
+
paths.eslintPath = path.join(rootPath, 'src', '.eslintrc.json');
|
|
70
|
+
}
|
|
71
|
+
|
|
61
72
|
return { paths: paths };
|
|
62
73
|
}
|
|
63
74
|
|
|
@@ -83,15 +83,29 @@ module.exports.angular = (envTarget, isSnapshot, version, configEnvTargetIn) =>
|
|
|
83
83
|
.then(() => {
|
|
84
84
|
if (!skipLint) {
|
|
85
85
|
tools.logInfo(`TS Linting application...`);
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
86
|
+
let tsLintPath = currentProject.paths.tslintPath;
|
|
87
|
+
let esLintPath = currentProject.paths.eslintPath;
|
|
88
|
+
|
|
89
|
+
// TODO: remove TSLint since it's deprecated and should not be used by projects in the future
|
|
90
|
+
if(tsLintPath) {
|
|
91
|
+
tsLintPath = path.join(tsLintPath);
|
|
92
|
+
let tsConfigPath = path.join(currentProject.paths.angularPath, 'tsconfig.app.json');
|
|
93
|
+
tools.logWarning('TSLint is deprecated and will be removed in the future. Consider migrating to ESLint')
|
|
94
|
+
if (!tools.isFileExists(tsConfigPath)) {
|
|
95
|
+
tsConfigPath = path.join(currentProject.paths.angularPath, 'src', 'tsconfig.app.json');
|
|
96
|
+
}
|
|
97
|
+
if (tools.isFileExists(tsConfigPath)) {
|
|
98
|
+
tools.logInfo(`running tslint -c ${tsLintPath} -p ${tsConfigPath}`);
|
|
99
|
+
return tools.runScript(`tslint -c ${tsLintPath} -p ${tsConfigPath}`);
|
|
100
|
+
}
|
|
101
|
+
} else if (esLintPath) {
|
|
102
|
+
// the project path information are located inside the .eslintrc.json
|
|
103
|
+
tools.logInfo(`running ng lint ${currentProject.name}`);
|
|
104
|
+
return tools.runScript(`ng lint ${currentProject.name}`);
|
|
105
|
+
} else {
|
|
106
|
+
tools.logError(`No ESLint or TSLint configuration found for the project`);
|
|
94
107
|
}
|
|
108
|
+
|
|
95
109
|
}
|
|
96
110
|
})
|
|
97
111
|
|