@nx/eslint 23.1.0 → 23.2.0-beta.1
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.
|
@@ -1172,8 +1172,17 @@ function generateFlatOverride(_override, format, importsMap) {
|
|
|
1172
1172
|
},
|
|
1173
1173
|
});
|
|
1174
1174
|
}
|
|
1175
|
-
// At this point we are applying the flat config compat tooling to the override
|
|
1176
|
-
|
|
1175
|
+
// At this point we are applying the flat config compat tooling to the override.
|
|
1176
|
+
// Only destructure what Nx must remap or merge itself. Everything else, including
|
|
1177
|
+
// parser and parserOptions, stays in `rest` so FlatCompat translates it: it resolves
|
|
1178
|
+
// the parser to a module reference and hoists ecmaVersion/sourceType out of
|
|
1179
|
+
// parserOptions, which re-emitting them by hand does not do.
|
|
1180
|
+
let { excludedFiles, rules, files, ...rest } = override;
|
|
1181
|
+
// eslintrc accepts `parser: null` to mean "use the default parser". Flat config
|
|
1182
|
+
// has no null-parser concept and FlatCompat throws on it, so omit the key.
|
|
1183
|
+
if (rest.parser === null) {
|
|
1184
|
+
delete rest.parser;
|
|
1185
|
+
}
|
|
1177
1186
|
const objectLiteralElements = [
|
|
1178
1187
|
ts.factory.createSpreadAssignment(ts.factory.createIdentifier('config')),
|
|
1179
1188
|
];
|
|
@@ -1211,11 +1220,6 @@ function generateFlatOverride(_override, format, importsMap) {
|
|
|
1211
1220
|
...rulesObjectInitializer.properties,
|
|
1212
1221
|
];
|
|
1213
1222
|
objectLiteralElements.push(ts.factory.createPropertyAssignment('rules', ts.factory.createObjectLiteralExpression(updatedRulesProperties, true)));
|
|
1214
|
-
if (parserOptions) {
|
|
1215
|
-
addTSObjectProperty(objectLiteralElements, 'languageOptions', {
|
|
1216
|
-
parserOptions,
|
|
1217
|
-
});
|
|
1218
|
-
}
|
|
1219
1223
|
return ts.factory.createSpreadElement(ts.factory.createCallExpression(ts.factory.createPropertyAccessExpression(ts.factory.createCallExpression(ts.factory.createPropertyAccessExpression(ts.factory.createIdentifier('compat'), ts.factory.createIdentifier('config')), undefined, [generateAst(rest)]), ts.factory.createIdentifier('map')), undefined, [
|
|
1220
1224
|
ts.factory.createArrowFunction(undefined, undefined, [
|
|
1221
1225
|
ts.factory.createParameterDeclaration(undefined, undefined, 'config'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/eslint",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.2.0-beta.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"files": [
|
|
@@ -73,17 +73,17 @@
|
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"@zkochan/js-yaml": "0.0.7",
|
|
75
75
|
"eslint": "^9.0.0 || ^10.0.0",
|
|
76
|
-
"@nx/jest": "23.
|
|
76
|
+
"@nx/jest": "23.2.0-beta.1"
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
79
|
"semver": "^7.6.3",
|
|
80
80
|
"tslib": "^2.3.0",
|
|
81
81
|
"typescript": "~6.0.3",
|
|
82
|
-
"@nx/devkit": "23.
|
|
83
|
-
"@nx/js": "23.
|
|
82
|
+
"@nx/devkit": "23.2.0-beta.1",
|
|
83
|
+
"@nx/js": "23.2.0-beta.1"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"nx": "23.
|
|
86
|
+
"nx": "23.2.0-beta.1"
|
|
87
87
|
},
|
|
88
88
|
"peerDependenciesMeta": {
|
|
89
89
|
"@nx/jest": {
|