@eui/tools 5.3.31 → 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.
@@ -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
- const tsLintPath = path.join(currentProject.paths.angularPath, 'tslint.json');
87
- var tsConfigPath = path.join(currentProject.paths.angularPath, 'tsconfig.app.json');
88
- if (!tools.isFileExists(tsConfigPath)) {
89
- tsConfigPath = path.join(currentProject.paths.angularPath, 'src', 'tsconfig.app.json');
90
- }
91
- if (tools.isFileExists(tsConfigPath)) {
92
- tools.logInfo(`running tslint -c ${tsLintPath} -p ${tsConfigPath}`);
93
- return tools.runScript(`tslint -c ${tsLintPath} -p ${tsConfigPath}`);
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
 
@@ -51,9 +51,9 @@ module.exports.build = (pkg, isMaster) => {
51
51
  if (tools.isFileExists(tsLintPath)) {
52
52
  // TODO: remove TSLint since it's deprecated and should not be used by projects in the future
53
53
  tools.logWarning('TSLint is deprecated and will be removed in the future. Consider migrating to ESLint')
54
- const tsConfigPath = path.join(pkg.paths.pkgRootDirectory, 'tsconfig.lib.json');
55
- tools.logInfo(`running tslint -c ${tsLintPath} -p ${tsConfigPath}`);
56
- return tools.runScript(`tslint -c ${tsLintPath} -p ${tsConfigPath} -t verbose`);
54
+ const script = `running tslint -c ${tsLintPath} -p ${pkg.paths.tsConfig} -t verbose`
55
+ tools.logInfo(script);
56
+ return tools.runScript(script);
57
57
  } else if(tools.isFileExists(esLintPath)) {
58
58
  // the project path information are located inside the .eslintrc.json
59
59
  tools.logInfo(`running ng lint ${pkg.name}`);
@@ -101,7 +101,7 @@ module.exports.build = (pkg, isMaster) => {
101
101
  return tools.rimraf(docDistPath);
102
102
  })
103
103
  .then(() => {
104
- return tools.runScript(`compodoc -p ${pkg.paths.pkgRootDirectory}/tsconfig.lib.json -d ${docDistPath} --theme material --disableGraph --disableCoverage --disableSourceCode --disableDomTree --disableProtected --disablePrivate --disableLifeCycleHooks --disableTemplateTab --disableStyleTab --hideGenerator --toggleMenuItems all`);
104
+ return tools.runScript(`compodoc -p ${pkg.paths.pkgRootDirectory}/${pkg.tsConfigFileName} -d ${docDistPath} --theme material --disableGraph --disableCoverage --disableSourceCode --disableDomTree --disableProtected --disablePrivate --disableLifeCycleHooks --disableTemplateTab --disableStyleTab --hideGenerator --toggleMenuItems all`);
105
105
  })
106
106
  .then(() => {
107
107
  tools.logSuccess();
@@ -217,7 +217,7 @@ module.exports.buildSubEntry = (pkg, subEntry) => {
217
217
  subEntryPath = subEntryPath.replace('/ng-package.json', '');
218
218
  tools.logInfo(`${subEntryPath} found... injecting angular.json for sub entry`);
219
219
 
220
- return configUtils.angular.registerAngularPackageSubEntry(subEntry, subEntryPath);
220
+ return configUtils.angular.registerAngularPackageSubEntry(subEntry, subEntryPath, pkg);
221
221
  };
222
222
  }
223
223
  })