@skyux-sdk/eslint-config 11.1.0 → 11.3.0
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 +5 -6
- package/recommended.json +2 -6
- package/src/schematics/migrations/migration-collection.json +1 -1
- package/src/schematics/ng-add/ng-add.schematic.js +3 -4
- package/src/schematics/ng-add/ng-add.schematic.js.map +1 -1
- package/src/schematics/shared/rules/install-dependencies.d.ts +0 -2
- package/src/schematics/shared/rules/install-dependencies.js +0 -23
- package/src/schematics/shared/rules/install-dependencies.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyux-sdk/eslint-config",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.3.0",
|
|
4
4
|
"author": "Blackbaud, Inc.",
|
|
5
5
|
"description": "Angular CLI schematics to implement recommended ESLint configuration",
|
|
6
6
|
"keywords": [
|
|
@@ -23,13 +23,11 @@
|
|
|
23
23
|
"ng-update": {
|
|
24
24
|
"migrations": "./src/schematics/migrations/migration-collection.json",
|
|
25
25
|
"packageGroup": {
|
|
26
|
-
"@skyux-sdk/eslint-config": "11.
|
|
27
|
-
"eslint-plugin-deprecation": "^3.0.0"
|
|
26
|
+
"@skyux-sdk/eslint-config": "11.3.0"
|
|
28
27
|
}
|
|
29
28
|
},
|
|
30
29
|
"peerDependencies": {
|
|
31
|
-
"@angular/cli": "^18.2.
|
|
32
|
-
"eslint-plugin-deprecation": "^3.0.0"
|
|
30
|
+
"@angular/cli": "^18.2.4"
|
|
33
31
|
},
|
|
34
32
|
"dependencies": {
|
|
35
33
|
"comment-json": "4.2.4",
|
|
@@ -38,5 +36,6 @@
|
|
|
38
36
|
"package-json": "7.0.0"
|
|
39
37
|
},
|
|
40
38
|
"main": "./src/index.js",
|
|
41
|
-
"type": "commonjs"
|
|
39
|
+
"type": "commonjs",
|
|
40
|
+
"types": "./src/index.d.ts"
|
|
42
41
|
}
|
package/recommended.json
CHANGED
|
@@ -15,12 +15,9 @@
|
|
|
15
15
|
"plugins": [
|
|
16
16
|
"@angular-eslint",
|
|
17
17
|
"@angular-eslint/template",
|
|
18
|
-
"@typescript-eslint"
|
|
19
|
-
"deprecation"
|
|
18
|
+
"@typescript-eslint"
|
|
20
19
|
],
|
|
21
20
|
"rules": {
|
|
22
|
-
"deprecation/deprecation": "warn",
|
|
23
|
-
|
|
24
21
|
"curly": "error",
|
|
25
22
|
"default-case": "error",
|
|
26
23
|
"default-case-last": "error",
|
|
@@ -76,6 +73,7 @@
|
|
|
76
73
|
"@typescript-eslint/no-base-to-string": "error",
|
|
77
74
|
"@typescript-eslint/no-confusing-non-null-assertion": "error",
|
|
78
75
|
"@typescript-eslint/no-confusing-void-expression": "error",
|
|
76
|
+
"@typescript-eslint/no-deprecated": "warn",
|
|
79
77
|
"@typescript-eslint/no-duplicate-enum-values": "error",
|
|
80
78
|
"@typescript-eslint/no-mixed-enums": "error",
|
|
81
79
|
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
|
|
@@ -105,9 +103,7 @@
|
|
|
105
103
|
"@typescript-eslint/prefer-reduce-type-parameter": "error",
|
|
106
104
|
"@typescript-eslint/prefer-return-this-type": "error",
|
|
107
105
|
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
|
108
|
-
"@typescript-eslint/semi": "error",
|
|
109
106
|
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
|
110
|
-
"@typescript-eslint/type-annotation-spacing": "error",
|
|
111
107
|
"@typescript-eslint/unbound-method": ["error", { "ignoreStatic": true }],
|
|
112
108
|
|
|
113
109
|
"@angular-eslint/no-lifecycle-call": "error",
|
|
@@ -4,7 +4,6 @@ exports.default = ngAdd;
|
|
|
4
4
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
5
|
const fs_extra_1 = require("fs-extra");
|
|
6
6
|
const path_1 = require("path");
|
|
7
|
-
const install_dependencies_1 = require("../shared/rules/install-dependencies");
|
|
8
7
|
const modify_eslint_config_1 = require("../shared/rules/modify-eslint-config");
|
|
9
8
|
const modify_tsconfig_1 = require("../shared/rules/modify-tsconfig");
|
|
10
9
|
const tree_1 = require("../shared/utility/tree");
|
|
@@ -23,13 +22,13 @@ function hardenPackageVersion() {
|
|
|
23
22
|
function ngAdd() {
|
|
24
23
|
return (tree) => {
|
|
25
24
|
const packageJson = getPackageJson(tree);
|
|
26
|
-
if (!packageJson.devDependencies?.['@angular-eslint/schematics']
|
|
27
|
-
|
|
25
|
+
if (!packageJson.devDependencies?.['@angular-eslint/schematics'] &&
|
|
26
|
+
!packageJson.devDependencies?.['angular-eslint']) {
|
|
27
|
+
throw new Error("The package 'angular-eslint' is not installed. " +
|
|
28
28
|
"Run 'ng add @angular-eslint/schematics' and try this command again.\n" +
|
|
29
29
|
'See: https://github.com/angular-eslint/angular-eslint#quick-start');
|
|
30
30
|
}
|
|
31
31
|
return (0, schematics_1.chain)([
|
|
32
|
-
(0, install_dependencies_1.installDependencies)(),
|
|
33
32
|
(0, modify_eslint_config_1.modifyEsLintConfig)(),
|
|
34
33
|
(0, modify_tsconfig_1.modifyTsConfig)(),
|
|
35
34
|
hardenPackageVersion(),
|
|
@@ -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":";;
|
|
1
|
+
{"version":3,"file":"ng-add.schematic.js","sourceRoot":"","sources":["../../../../../../../libs/sdk/eslint-config/src/schematics/ng-add/ng-add.schematic.ts"],"names":[],"mappings":";;AA4BA,wBAqBC;AAjDD,2DAA+D;AAE/D,uCAAoC;AACpC,+BAA+B;AAE/B,+EAA0E;AAC1E,qEAAiE;AAEjE,iDAA0D;AAE1D,SAAS,cAAc,CAAC,IAAU;IAChC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAA,uBAAgB,EAAC,IAAI,EAAE,eAAe,CAAC,CAAgB,CAAC;AAC5E,CAAC;AAED,SAAS,oBAAoB;IAC3B,OAAO,KAAK,EAAE,IAAI,EAAE,EAAE;QACpB,MAAM,eAAe,GAAG,MAAM,IAAA,mBAAQ,EACpC,IAAA,cAAO,EAAC,SAAS,EAAE,uBAAuB,CAAC,CAC5C,CAAC;QAEF,MAAM,WAAW,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;QACzC,WAAW,CAAC,eAAe,KAAK,EAAE,CAAC;QACnC,WAAW,CAAC,eAAe,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,OAAO,CAAC;QAE5E,IAAI,CAAC,SAAS,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;IAC7E,CAAC,CAAC;AACJ,CAAC;AAED,SAAwB,KAAK;IAC3B,OAAO,CAAC,IAAI,EAAE,EAAE;QACd,MAAM,WAAW,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;QAEzC,IACE,CAAC,WAAW,CAAC,eAAe,EAAE,CAAC,4BAA4B,CAAC;YAC5D,CAAC,WAAW,CAAC,eAAe,EAAE,CAAC,gBAAgB,CAAC,EAChD,CAAC;YACD,MAAM,IAAI,KAAK,CACb,iDAAiD;gBAC/C,uEAAuE;gBACvE,mEAAmE,CACtE,CAAC;QACJ,CAAC;QAED,OAAO,IAAA,kBAAK,EAAC;YACX,IAAA,yCAAkB,GAAE;YACpB,IAAA,gCAAc,GAAE;YAChB,oBAAoB,EAAE;SACvB,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.installDependencies = installDependencies;
|
|
4
|
-
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
|
5
|
-
const dependencies_1 = require("@schematics/angular/utility/dependencies");
|
|
6
|
-
const get_latest_version_1 = require("../utility/get-latest-version");
|
|
7
|
-
function installDependencies() {
|
|
8
|
-
return async (tree, context) => {
|
|
9
|
-
context.addTask(new tasks_1.NodePackageInstallTask());
|
|
10
|
-
const packages = {
|
|
11
|
-
'eslint-plugin-deprecation': await (0, get_latest_version_1.getLatestVersion)('eslint-plugin-deprecation', '^2.0.0'),
|
|
12
|
-
};
|
|
13
|
-
for (const [packageName, version] of Object.entries(packages)) {
|
|
14
|
-
(0, dependencies_1.addPackageJsonDependency)(tree, {
|
|
15
|
-
name: packageName,
|
|
16
|
-
type: dependencies_1.NodeDependencyType.Dev,
|
|
17
|
-
version,
|
|
18
|
-
overwrite: true,
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=install-dependencies.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"install-dependencies.js","sourceRoot":"","sources":["../../../../../../../../libs/sdk/eslint-config/src/schematics/shared/rules/install-dependencies.ts"],"names":[],"mappings":";;AASA,kDAoBC;AA5BD,4DAA0E;AAC1E,2EAGkD;AAElD,sEAAiE;AAEjE,SAAgB,mBAAmB;IACjC,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;QAC7B,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;QAE9C,MAAM,QAAQ,GAA2B;YACvC,2BAA2B,EAAE,MAAM,IAAA,qCAAgB,EACjD,2BAA2B,EAC3B,QAAQ,CACT;SACF,CAAC;QAEF,KAAK,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC9D,IAAA,uCAAwB,EAAC,IAAI,EAAE;gBAC7B,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,iCAAkB,CAAC,GAAG;gBAC5B,OAAO;gBACP,SAAS,EAAE,IAAI;aAChB,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
|