@skyux-sdk/eslint-config 8.2.1 → 8.2.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyux-sdk/eslint-config",
3
- "version": "8.2.1",
3
+ "version": "8.2.2",
4
4
  "author": "Blackbaud, Inc.",
5
5
  "description": "Angular CLI schematics to implement recommended ESLint configuration",
6
6
  "keywords": [
@@ -28,13 +28,7 @@
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@angular/cli": "^15.2.8",
31
- "@angular-eslint/eslint-plugin": "^15.2.1",
32
- "@angular-eslint/eslint-plugin-template": "^15.2.1",
33
- "@angular-eslint/template-parser": "^15.2.1",
34
- "@typescript-eslint/eslint-plugin": "^5.59.5",
35
- "@typescript-eslint/parser": "^5.59.5",
36
- "eslint-plugin-deprecation": "^1.4.1",
37
- "eslint": "^8.36.0"
31
+ "eslint-plugin-deprecation": "^1.4.1"
38
32
  },
39
33
  "dependencies": {
40
34
  "comment-json": "4.2.3"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schematics": {
3
3
  "noop": {
4
- "version": "8.2.1",
4
+ "version": "8.2.2",
5
5
  "factory": "./noop/noop.schematic",
6
6
  "description": "Update ESLint dependencies"
7
7
  }
@@ -3,8 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const schematics_1 = require("@angular-devkit/schematics");
4
4
  const install_dependencies_1 = require("../shared/rules/install-dependencies");
5
5
  const modify_eslint_config_1 = require("../shared/rules/modify-eslint-config");
6
+ const tree_1 = require("../shared/utility/tree");
6
7
  function ngAdd() {
7
- return () => {
8
+ return (tree) => {
9
+ const packageJson = JSON.parse((0, tree_1.readRequiredFile)(tree, '/package.json'));
10
+ if (!packageJson.devDependencies?.['@angular-eslint/schematics']) {
11
+ throw new Error("The package '@angular-eslint/schematics' is not installed. " +
12
+ "Run 'ng add @angular-eslint/schematics' and try this command again.\n" +
13
+ 'See: https://github.com/angular-eslint/angular-eslint#quick-start');
14
+ }
8
15
  return (0, schematics_1.chain)([(0, install_dependencies_1.installDependencies)(), (0, modify_eslint_config_1.modifyEsLintConfig)()]);
9
16
  };
10
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ng-add.schematic.js","sourceRoot":"","sources":["../../../../../../../libs/sdk/eslint-config/src/schematics/ng-add/ng-add.schematic.ts"],"names":[],"mappings":";;AAAA,2DAAyD;AAEzD,+EAA2E;AAC3E,+EAA0E;AAE1E,SAAwB,KAAK;IAC3B,OAAO,GAAG,EAAE;QACV,OAAO,IAAA,kBAAK,EAAC,CAAC,IAAA,0CAAmB,GAAE,EAAE,IAAA,yCAAkB,GAAE,CAAC,CAAC,CAAC;IAC9D,CAAC,CAAC;AACJ,CAAC;AAJD,wBAIC"}
1
+ {"version":3,"file":"ng-add.schematic.js","sourceRoot":"","sources":["../../../../../../../libs/sdk/eslint-config/src/schematics/ng-add/ng-add.schematic.ts"],"names":[],"mappings":";;AAAA,2DAAyD;AAEzD,+EAA2E;AAC3E,+EAA0E;AAE1E,iDAA0D;AAE1D,SAAwB,KAAK;IAC3B,OAAO,CAAC,IAAI,EAAE,EAAE;QACd,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAC5B,IAAA,uBAAgB,EAAC,IAAI,EAAE,eAAe,CAAC,CACzB,CAAC;QAEjB,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE,CAAC,4BAA4B,CAAC,EAAE;YAChE,MAAM,IAAI,KAAK,CACb,6DAA6D;gBAC3D,uEAAuE;gBACvE,mEAAmE,CACtE,CAAC;SACH;QAED,OAAO,IAAA,kBAAK,EAAC,CAAC,IAAA,0CAAmB,GAAE,EAAE,IAAA,yCAAkB,GAAE,CAAC,CAAC,CAAC;IAC9D,CAAC,CAAC;AACJ,CAAC;AAhBD,wBAgBC"}
@@ -7,13 +7,7 @@ function installDependencies() {
7
7
  return (tree, context) => {
8
8
  context.addTask(new tasks_1.NodePackageInstallTask());
9
9
  const packages = {
10
- '@angular-eslint/eslint-plugin': '^15.2.1',
11
- '@angular-eslint/eslint-plugin-template': '^15.2.1',
12
- '@angular-eslint/template-parser': '^15.2.1',
13
- '@typescript-eslint/eslint-plugin': '^5.59.5',
14
- '@typescript-eslint/parser': '^5.59.5',
15
10
  'eslint-plugin-deprecation': '^1.4.1',
16
- eslint: '^8.36.0',
17
11
  };
18
12
  for (const [packageName, version] of Object.entries(packages)) {
19
13
  (0, dependencies_1.addPackageJsonDependency)(tree, {
@@ -1 +1 @@
1
- {"version":3,"file":"install-dependencies.js","sourceRoot":"","sources":["../../../../../../../../libs/sdk/eslint-config/src/schematics/shared/rules/install-dependencies.ts"],"names":[],"mappings":";;;AACA,4DAA0E;AAC1E,2EAGkD;AAElD,SAAgB,mBAAmB;IACjC,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;QACvB,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;QAE9C,MAAM,QAAQ,GAA2B;YACvC,+BAA+B,EAAE,SAAS;YAC1C,wCAAwC,EAAE,SAAS;YACnD,iCAAiC,EAAE,SAAS;YAC5C,kCAAkC,EAAE,SAAS;YAC7C,2BAA2B,EAAE,SAAS;YACtC,2BAA2B,EAAE,QAAQ;YACrC,MAAM,EAAE,SAAS;SAClB,CAAC;QAEF,KAAK,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YAC7D,IAAA,uCAAwB,EAAC,IAAI,EAAE;gBAC7B,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,iCAAkB,CAAC,GAAG;gBAC5B,OAAO;gBACP,SAAS,EAAE,IAAI;aAChB,CAAC,CAAC;SACJ;IACH,CAAC,CAAC;AACJ,CAAC;AAvBD,kDAuBC"}
1
+ {"version":3,"file":"install-dependencies.js","sourceRoot":"","sources":["../../../../../../../../libs/sdk/eslint-config/src/schematics/shared/rules/install-dependencies.ts"],"names":[],"mappings":";;;AACA,4DAA0E;AAC1E,2EAGkD;AAElD,SAAgB,mBAAmB;IACjC,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;QACvB,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;QAE9C,MAAM,QAAQ,GAA2B;YACvC,2BAA2B,EAAE,QAAQ;SACtC,CAAC;QAEF,KAAK,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YAC7D,IAAA,uCAAwB,EAAC,IAAI,EAAE;gBAC7B,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,iCAAkB,CAAC,GAAG;gBAC5B,OAAO;gBACP,SAAS,EAAE,IAAI;aAChB,CAAC,CAAC;SACJ;IACH,CAAC,CAAC;AACJ,CAAC;AAjBD,kDAiBC"}
@@ -0,0 +1,4 @@
1
+ export interface PackageJson {
2
+ dependencies?: Record<string, string>;
3
+ devDependencies?: Record<string, string>;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=package-json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-json.js","sourceRoot":"","sources":["../../../../../../../../libs/sdk/eslint-config/src/schematics/shared/types/package-json.ts"],"names":[],"mappings":""}