typescript-eslint 8.30.2-alpha.2 → 8.30.2-alpha.3
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/dist/config-helper.d.ts.map +1 -1
- package/dist/config-helper.js +30 -8
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-helper.d.ts","sourceRoot":"","sources":["../src/config-helper.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,MAAM,MAAM,8BAA8B,GACtC,iBAAiB,GACjB,8BAA8B,EAAE,CAAC;AAErC,MAAM,WAAW,iBAAkB,SAAQ,QAAQ,CAAC,UAAU,CAAC,MAAM;IACnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,OAAO,CAAC,EAAE,8BAA8B,EAAE,CAAC;CAC5C;AAGD,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,WAAW,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,MAAM,CACpB,GAAG,OAAO,EAAE,8BAA8B,EAAE,GAC3C,WAAW,
|
|
1
|
+
{"version":3,"file":"config-helper.d.ts","sourceRoot":"","sources":["../src/config-helper.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEzD,MAAM,MAAM,8BAA8B,GACtC,iBAAiB,GACjB,8BAA8B,EAAE,CAAC;AAErC,MAAM,WAAW,iBAAkB,SAAQ,QAAQ,CAAC,UAAU,CAAC,MAAM;IACnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAuCG;IACH,OAAO,CAAC,EAAE,8BAA8B,EAAE,CAAC;CAC5C;AAGD,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,WAAW,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,MAAM,CACpB,GAAG,OAAO,EAAE,8BAA8B,EAAE,GAC3C,WAAW,CAiEb"}
|
package/dist/config-helper.js
CHANGED
|
@@ -46,17 +46,39 @@ function config(...configs) {
|
|
|
46
46
|
throw new Error(`Your config at index ${configIndex}${configName} contains undefined` +
|
|
47
47
|
` extensions at the following indices: ${extensionIndices}.`);
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
const configArray = [];
|
|
50
|
+
for (const extension of extendsArrFlattened) {
|
|
51
|
+
const name = [config.name, extension.name].filter(Boolean).join('__');
|
|
52
|
+
if (isPossiblyGlobalIgnores(extension)) {
|
|
53
|
+
// If it's a global ignores, then just pass it along
|
|
54
|
+
configArray.push({
|
|
55
|
+
...extension,
|
|
56
|
+
...(name && { name }),
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
configArray.push({
|
|
53
61
|
...extension,
|
|
54
62
|
...(config.files && { files: config.files }),
|
|
55
63
|
...(config.ignores && { ignores: config.ignores }),
|
|
56
64
|
...(name && { name }),
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
// If the base config could form a global ignores object, then we mustn't include
|
|
69
|
+
// it in the output. Otherwise, we must add it in order for it to have effect.
|
|
70
|
+
if (!isPossiblyGlobalIgnores(config)) {
|
|
71
|
+
configArray.push(config);
|
|
72
|
+
}
|
|
73
|
+
return configArray;
|
|
61
74
|
});
|
|
62
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* This utility function returns false if the config objects contains any field
|
|
78
|
+
* that would prevent it from being considered a global ignores object and true
|
|
79
|
+
* otherwise. Note in particular that the `ignores` field may not be present and
|
|
80
|
+
* the return value can still be true.
|
|
81
|
+
*/
|
|
82
|
+
function isPossiblyGlobalIgnores(config) {
|
|
83
|
+
return Object.keys(config).every(key => ['name', 'ignores'].includes(key));
|
|
84
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "typescript-eslint",
|
|
3
|
-
"version": "8.30.2-alpha.
|
|
3
|
+
"version": "8.30.2-alpha.3",
|
|
4
4
|
"description": "Tooling which enables you to use TypeScript with ESLint",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"check-types": "npx nx typecheck"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@typescript-eslint/eslint-plugin": "8.30.2-alpha.
|
|
55
|
-
"@typescript-eslint/parser": "8.30.2-alpha.
|
|
56
|
-
"@typescript-eslint/utils": "8.30.2-alpha.
|
|
54
|
+
"@typescript-eslint/eslint-plugin": "8.30.2-alpha.3",
|
|
55
|
+
"@typescript-eslint/parser": "8.30.2-alpha.3",
|
|
56
|
+
"@typescript-eslint/utils": "8.30.2-alpha.3"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"eslint": "^8.57.0 || ^9.0.0",
|