@nx/eslint 19.1.0-canary.20240509-8f705e3 → 19.1.0-canary.20240510-1a85787

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": "@nx/eslint",
3
- "version": "19.1.0-canary.20240509-8f705e3",
3
+ "version": "19.1.0-canary.20240510-1a85787",
4
4
  "private": false,
5
5
  "description": "The ESLint plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.",
6
6
  "repository": {
@@ -33,12 +33,12 @@
33
33
  "js-yaml": "4.1.0"
34
34
  },
35
35
  "dependencies": {
36
- "@nx/devkit": "19.1.0-canary.20240509-8f705e3",
37
- "@nx/js": "19.1.0-canary.20240509-8f705e3",
36
+ "@nx/devkit": "19.1.0-canary.20240510-1a85787",
37
+ "@nx/js": "19.1.0-canary.20240510-1a85787",
38
38
  "eslint": "^8.0.0",
39
39
  "tslib": "^2.3.0",
40
40
  "typescript": "~5.4.2",
41
- "@nx/linter": "19.1.0-canary.20240509-8f705e3"
41
+ "@nx/linter": "19.1.0-canary.20240510-1a85787"
42
42
  },
43
43
  "peerDependenciesMeta": {
44
44
  "js-yaml": {
@@ -514,7 +514,16 @@ function generateFlatOverride(override) {
514
514
  ];
515
515
  addTSObjectProperty(objectLiteralElements, 'files', files);
516
516
  addTSObjectProperty(objectLiteralElements, 'excludedFiles', excludedFiles);
517
- addTSObjectProperty(objectLiteralElements, 'rules', rules);
517
+ // Apply rules (and spread ...config.rules into it as the first assignment)
518
+ addTSObjectProperty(objectLiteralElements, 'rules', rules || {});
519
+ const rulesObjectAST = objectLiteralElements.pop();
520
+ const rulesObjectInitializer = rulesObjectAST.initializer;
521
+ const spreadAssignment = ts.factory.createSpreadAssignment(ts.factory.createIdentifier('config.rules'));
522
+ const updatedRulesProperties = [
523
+ spreadAssignment,
524
+ ...rulesObjectInitializer.properties,
525
+ ];
526
+ objectLiteralElements.push(ts.factory.createPropertyAssignment('rules', ts.factory.createObjectLiteralExpression(updatedRulesProperties, true)));
518
527
  if (parserOptions) {
519
528
  addTSObjectProperty(objectLiteralElements, 'languageSettings', {
520
529
  parserOptions,