@eui/tools 6.20.17 → 6.20.18

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.
@@ -8,26 +8,17 @@
8
8
  "files": [
9
9
  "*.ts"
10
10
  ],
11
- "plugins": [
12
- "prefer-arrow"
13
- ],
14
11
  "extends": [
15
- "eslint:recommended",
16
12
  "plugin:@typescript-eslint/recommended",
17
13
  "plugin:@angular-eslint/recommended",
18
14
  "plugin:@angular-eslint/template/process-inline-templates"
19
15
  ],
16
+ "plugins": [
17
+ "prefer-arrow",
18
+ "jsdoc"
19
+ ],
20
20
  "rules": {
21
21
  "@typescript-eslint/ban-ts-comment": "off",
22
- "@typescript-eslint/ban-types": [
23
- "error",
24
- {
25
- "types": {
26
- "Function": false
27
- },
28
- "extendDefaults": true
29
- }
30
- ],
31
22
  "@typescript-eslint/consistent-type-definitions": "off",
32
23
  "@typescript-eslint/dot-notation": "off",
33
24
  "@typescript-eslint/explicit-member-accessibility": [
@@ -38,7 +29,6 @@
38
29
  ],
39
30
  "@typescript-eslint/no-require-imports": "error",
40
31
  "@typescript-eslint/no-unused-vars": "off",
41
- "@typescript-eslint/no-var-requires": "error",
42
32
  "@typescript-eslint/require-await": "error",
43
33
  "brace-style": [
44
34
  "error",
@@ -52,7 +42,6 @@
52
42
  "id-match": "off",
53
43
  "no-duplicate-case": "error",
54
44
  "no-duplicate-imports": "off",
55
- "no-invalid-this": "error",
56
45
  "no-multiple-empty-lines": [
57
46
  "error",
58
47
  {
@@ -77,7 +66,7 @@
77
66
  }
78
67
  ],
79
68
  "@typescript-eslint/member-ordering": [
80
- "error",
69
+ "warn",
81
70
  {
82
71
  "default": [
83
72
  "public-static-field",
@@ -92,31 +81,38 @@
92
81
  ]
93
82
  }
94
83
  ],
95
- "quote-props": ["error", "as-needed"],
96
- "prefer-const": "error",
97
- "@typescript-eslint/no-empty-function": ["error"],
98
- "prefer-arrow/prefer-arrow-functions": [
99
- "error",
84
+
85
+ "@angular-eslint/no-output-on-prefix": ["warn"],
86
+ "@angular-eslint/no-empty-lifecycle-method": ["warn"],
87
+ "@typescript-eslint/no-empty-function": ["warn"],
88
+ "jsdoc/newline-after-description": ["off"],
89
+ "@typescript-eslint/adjacent-overload-signatures": ["warn"],
90
+ "@typescript-eslint/ban-types": ["warn"],
91
+ "@typescript-eslint/no-this-alias": ["warn"],
92
+ "@typescript-eslint/no-empty-interface": ["warn"],
93
+ "no-var": ["warn"],
94
+ "quote-props": ["off"],
95
+ "jsdoc/check-alignment": ["warn"],
96
+ "@typescript-eslint/member-delimiter-style": [
97
+ "off",
100
98
  {
101
- "disallowPrototype": false,
102
- "singleReturnOnly": false,
103
- "classPropertiesAllowed": false,
104
- "allowStandaloneDeclarations": true
99
+ "multiline": {
100
+ "delimiter": "comma",
101
+ "requireLast": true
102
+ },
103
+ "singleline": {
104
+ "delimiter": "comma",
105
+ "requireLast": false
106
+ },
107
+ "multilineDetection": "brackets"
105
108
  }
106
109
  ],
107
- "@typescript-eslint/no-inferrable-types": ["error"],
108
- "@typescript-eslint/explicit-function-return-type": "error",
109
- "@angular-eslint/no-output-on-prefix": ["error"],
110
- "@angular-eslint/no-output-native": ["error"],
111
- "@angular-eslint/no-outputs-metadata-property": ["error"],
112
- "@typescript-eslint/prefer-for-of": ["error"],
113
- "@angular-eslint/no-empty-lifecycle-method": ["error"],
114
- "@typescript-eslint/no-explicit-any": ["error"],
115
- "@typescript-eslint/no-unsafe-declaration-merging": ["error"],
116
- "no-empty": "error",
117
- "object-curly-spacing": ["error", "always"],
118
- "quotes": ["error", "single"],
119
- "@angular-eslint/use-lifecycle-interface": ["error"]
110
+ "arrow-body-style": ["off", "as-needed", { "requireReturnForObjectLiteral": true }],
111
+ "object-shorthand": ["off", "properties"],
112
+ "prefer-arrow/prefer-arrow-functions": ["warn"],
113
+ "@typescript-eslint/no-inferrable-types": ["warn"],
114
+ "@typescript-eslint/no-explicit-any": ["off"],
115
+ "@angular-eslint/template/no-negated-async": ["off"]
120
116
  }
121
117
  },
122
118
  {
@@ -101,7 +101,12 @@ module.exports.install = (providedDeps) => {
101
101
 
102
102
  const configDeps = { ...resolvedDeps, ...fixedDeps };
103
103
 
104
- return innerCommon.getResolvedCarretDeps(configDeps, false, true);
104
+ if (configUtils.global.isCsdr()) {
105
+ return innerCommon.getResolvedCarretDeps(configDeps, false, true);
106
+ } else {
107
+ return innerCommon.getResolvedCarretDepsStandalone(configDeps, false, true);
108
+ }
109
+
105
110
  })
106
111
 
107
112
 
@@ -14,7 +14,7 @@ const innerCommon = require('./common');
14
14
  const innerProjects = require('./projects');
15
15
 
16
16
  // FETCH ARGS
17
- const { skipLocalPackagesDeps } = tools.getArgs();
17
+ const { skipLocalPackagesDeps, skipInstall } = tools.getArgs();
18
18
 
19
19
 
20
20
 
@@ -291,6 +291,11 @@ module.exports.installDeps = (prj, pkg, isMaster) => {
291
291
  module.exports.installDepsStandalone = (pkg, isMaster) => {
292
292
  let localPkgDeps, localPkgCompositeDeps, remappedDeps, localPkgBaseDeps;
293
293
 
294
+ if (skipInstall) {
295
+ tools.logInfo('skipInstall active...skipiing');
296
+ return {};
297
+ }
298
+
294
299
  return Promise.resolve()
295
300
  // fetching depedencies composite deps
296
301
  .then(() => {
@@ -16,8 +16,8 @@ const innerCommon = require('./common');
16
16
  // LOCAL TEST :
17
17
  // - symlink eUI tools sources to node_modules of standalone pkg folder node_modules to test
18
18
  // - execute this command on the standalone pkg folder :
19
- // npx @eui/tools release-package-standalone --dryRun --pkgName zzz-test-package-ui --branch develop --debug --debugNotification --skipCommitsCheck --skipPublish --skipGitUpdates --skipLint --skipTest
20
-
19
+ // npx @eui/tools release-package-standalone --pkgName zzz-test-package-ui --branch develop --debug --debugNotification --skipCommitsCheck --skipPublish --skipGitUpdates
20
+ // npx @eui/tools release-package-standalone --pkgName baep-sample-host-shell-ui --branch develop --debug --debugNotification --skipCommitsCheck --skipPublish --skipGitUpdates --skipInstall
21
21
 
22
22
  module.exports.run = () => {
23
23
  const { dryRun } = utils.tools.getArgs();
@@ -50,7 +50,7 @@ module.exports.run = () => {
50
50
 
51
51
  // CLONE CONFIG REPOSITORY - for gathering central remotes config
52
52
  .then(() => {
53
- return initUtils.remotes.cloneRemotesConfigStandalone();
53
+ return configUtils.global.cloneConfig();
54
54
  })
55
55
 
56
56
  // GET REMOTE OBJECT
@@ -21,6 +21,27 @@ module.exports.build = (pkg, isMaster) => {
21
21
 
22
22
  let auditStylesReport;
23
23
 
24
+ // standalone switch of eslint / temp solution, as angular.json eslintconfig file is not taken into account
25
+ const swapEslintStandalone = (reset = false) => {
26
+ const eslintStandalone = path.join(pkg.paths.root, '.eslintrc.standalone.json');
27
+ const eslint = path.join(pkg.paths.root, '.eslintrc.json');
28
+ const eslinttemp = path.join(pkg.paths.root, '.eslintrc.temp.json');
29
+
30
+ tools.logInfo('Swap eslint config for standalone release of pkg');
31
+
32
+ if (reset) {
33
+ tools.logInfo(`copy : ${eslinttemp} tp ${eslint}`);
34
+ tools.copy(eslinttemp, eslint);
35
+ tools.logInfo(`delete : ${eslinttemp}`);
36
+ tools.remove(eslinttemp);
37
+ } else {
38
+ tools.logInfo(`copy : ${eslint} tp ${eslinttemp}`);
39
+ tools.copy(eslint, eslinttemp);
40
+ tools.logInfo(`move : ${eslintStandalone} tp ${eslint}`);
41
+ tools.copy(eslintStandalone, eslint);
42
+ }
43
+ }
44
+
24
45
  return Promise.resolve()
25
46
  .then(() => {
26
47
  if (deps === true) {
@@ -52,13 +73,37 @@ module.exports.build = (pkg, isMaster) => {
52
73
  // the project path information are located inside the .eslintrc.json
53
74
  tools.logInfo(`running ng lint ${pkg.name}`);
54
75
 
55
- if (build && pkg.msteamsActive) {
56
- let args = ['--max_old_space_size=8096', ng, 'lint', pkg.name];
57
- return tools.runNodeScriptProcessOutput(args, pkg.paths.root);
76
+ return Promise.resolve()
77
+ .then(() => {
78
+ if (pkg.standalone) {
79
+ swapEslintStandalone();
80
+ }
81
+ })
82
+ .then(() => {
83
+ if (build && pkg.msteamsActive) {
84
+ let args = ['--max_old_space_size=8096', ng, 'lint', pkg.name];
85
+ return tools.runNodeScriptProcessOutput(args, pkg.paths.root);
86
+
87
+ } else {
88
+ return tools.runScript(`ng lint ${pkg.name}`);
89
+ }
90
+ })
91
+
92
+ .then(() => {
93
+ if (!skipLint) {
94
+ tools.logSuccess();
95
+ if (pkg.standalone) {
96
+ swapEslintStandalone(true);
97
+ }
98
+ }
99
+ })
58
100
 
59
- } else {
60
- return tools.runScript(`ng lint ${pkg.name}`);
61
- }
101
+ .catch((e) => {
102
+ if (pkg.standalone) {
103
+ swapEslintStandalone(true);
104
+ }
105
+ throw e;
106
+ })
62
107
 
63
108
  } else {
64
109
  tools.logError(`No ESLint or TSLint configuration found for the project`);
@@ -66,9 +111,6 @@ module.exports.build = (pkg, isMaster) => {
66
111
  }
67
112
  })
68
113
  .then(() => {
69
- if (!skipLint) {
70
- tools.logSuccess();
71
- }
72
114
  if (!skipAudit) {
73
115
  return auditUtils.styles.audit(pkg);
74
116
  }
@@ -1,44 +0,0 @@
1
- {
2
- "extends": ".eslintrc.eui18.standalone.json",
3
- "ignorePatterns": [
4
- "!**/*",
5
- "**/*.d.ts",
6
- "dist",
7
- "test",
8
- "coverage",
9
- "externals",
10
- "legacy",
11
- "node_modules"
12
- ],
13
- "overrides": [
14
- {
15
- "files": [
16
- "*.ts"
17
- ],
18
- "parserOptions": {
19
- "project": [
20
- "tsconfig.lib.standalone.json",
21
- "tsconfig.spec.standalone.json"
22
- ]
23
- },
24
- "rules": {
25
- "@angular-eslint/component-selector": [
26
- "error",
27
- {
28
- "type": "element",
29
- "prefix": ["zzz"],
30
- "style": "kebab-case"
31
- }
32
- ],
33
- "@angular-eslint/directive-selector": [
34
- "error",
35
- {
36
- "type": "attribute",
37
- "prefix": ["zzz"],
38
- "style": "camelCase"
39
- }
40
- ]
41
- }
42
- }
43
- ]
44
- }