Skip to content

Commit c4286d2

Browse files
nirgaclaude
andcommitted
refactor: centralize lint configuration in nx.json targetDefaults
- Move duplicate lint and lint:fix configurations from all project.json files to nx.json targetDefaults - Simplify project.json files to use empty lint targets that inherit from centralized defaults - Reduces duplication across 31 packages while maintaining same functionality - Uses ruff ^0.12.7 consistently for linting 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 2f718ec commit c4286d2

File tree

32 files changed

+297
-368
lines changed

32 files changed

+297
-368
lines changed

nx.json

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
{
22
"extends": "nx/presets/npm.json",
33
"$schema": "./node_modules/nx/schemas/nx-schema.json",
4-
"plugins": ["@nxlv/python"]
4+
"plugins": ["@nxlv/python"],
5+
"targetDefaults": {
6+
"lint": {
7+
"executor": "@nxlv/python:ruff-check",
8+
"options": {
9+
"lintFilePatterns": [
10+
"**/*.py"
11+
]
12+
}
13+
},
14+
"lint:fix": {
15+
"executor": "@nxlv/python:ruff-check",
16+
"options": {
17+
"lintFilePatterns": [
18+
"**/*.py"
19+
],
20+
"fix": true
21+
}
22+
}
23+
}
524
}

packages/opentelemetry-instrumentation-alephalpha/project.json

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
},
2626
"build": {
2727
"executor": "@nxlv/python:build",
28-
"outputs": ["{projectRoot}/dist"],
28+
"outputs": [
29+
"{projectRoot}/dist"
30+
],
2931
"options": {
3032
"outputPath": "packages/opentelemetry-instrumentation-alephalpha/dist",
3133
"publish": false,
@@ -43,15 +45,7 @@
4345
"debug": false
4446
}
4547
},
46-
"lint": {
47-
"executor": "@nxlv/python:flake8",
48-
"outputs": [
49-
"{workspaceRoot}/reports/packages/opentelemetry-instrumentation-alephalpha/pylint.txt"
50-
],
51-
"options": {
52-
"outputFile": "reports/packages/opentelemetry-instrumentation-alephalpha/pylint.txt"
53-
}
54-
},
48+
"lint": {},
5549
"test": {
5650
"executor": "@nxlv/python:run-commands",
5751
"outputs": [
@@ -72,7 +66,10 @@
7266
],
7367
"cwd": "packages/opentelemetry-instrumentation-alephalpha"
7468
}
75-
}
69+
},
70+
"lint:fix": {}
7671
},
77-
"tags": ["instrumentation"]
72+
"tags": [
73+
"instrumentation"
74+
]
7875
}

packages/opentelemetry-instrumentation-anthropic/project.json

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
},
2626
"build": {
2727
"executor": "@nxlv/python:build",
28-
"outputs": ["{projectRoot}/dist"],
28+
"outputs": [
29+
"{projectRoot}/dist"
30+
],
2931
"options": {
3032
"outputPath": "packages/opentelemetry-instrumentation-anthropic/dist",
3133
"publish": false,
@@ -43,15 +45,7 @@
4345
"debug": false
4446
}
4547
},
46-
"lint": {
47-
"executor": "@nxlv/python:flake8",
48-
"outputs": [
49-
"{workspaceRoot}/reports/packages/opentelemetry-instrumentation-anthropic/pylint.txt"
50-
],
51-
"options": {
52-
"outputFile": "reports/packages/opentelemetry-instrumentation-anthropic/pylint.txt"
53-
}
54-
},
48+
"lint": {},
5549
"test": {
5650
"executor": "@nxlv/python:run-commands",
5751
"outputs": [
@@ -72,7 +66,10 @@
7266
],
7367
"cwd": "packages/opentelemetry-instrumentation-anthropic"
7468
}
75-
}
69+
},
70+
"lint:fix": {}
7671
},
77-
"tags": ["instrumentation"]
72+
"tags": [
73+
"instrumentation"
74+
]
7875
}

packages/opentelemetry-instrumentation-bedrock/project.json

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
},
2626
"build": {
2727
"executor": "@nxlv/python:build",
28-
"outputs": ["{projectRoot}/dist"],
28+
"outputs": [
29+
"{projectRoot}/dist"
30+
],
2931
"options": {
3032
"outputPath": "packages/opentelemetry-instrumentation-bedrock/dist",
3133
"publish": false,
@@ -43,15 +45,7 @@
4345
"debug": false
4446
}
4547
},
46-
"lint": {
47-
"executor": "@nxlv/python:flake8",
48-
"outputs": [
49-
"{workspaceRoot}/reports/packages/opentelemetry-instrumentation-bedrock/pylint.txt"
50-
],
51-
"options": {
52-
"outputFile": "reports/packages/opentelemetry-instrumentation-bedrock/pylint.txt"
53-
}
54-
},
48+
"lint": {},
5549
"test": {
5650
"executor": "@nxlv/python:run-commands",
5751
"outputs": [
@@ -72,7 +66,10 @@
7266
],
7367
"cwd": "packages/opentelemetry-instrumentation-bedrock"
7468
}
75-
}
69+
},
70+
"lint:fix": {}
7671
},
77-
"tags": ["instrumentation"]
72+
"tags": [
73+
"instrumentation"
74+
]
7875
}

packages/opentelemetry-instrumentation-chromadb/project.json

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
},
2626
"build": {
2727
"executor": "@nxlv/python:build",
28-
"outputs": ["{projectRoot}/dist"],
28+
"outputs": [
29+
"{projectRoot}/dist"
30+
],
2931
"options": {
3032
"outputPath": "packages/opentelemetry-instrumentation-chromadb/dist",
3133
"publish": false,
@@ -43,15 +45,7 @@
4345
"debug": false
4446
}
4547
},
46-
"lint": {
47-
"executor": "@nxlv/python:flake8",
48-
"outputs": [
49-
"{workspaceRoot}/reports/packages/opentelemetry-instrumentation-chromadb/pylint.txt"
50-
],
51-
"options": {
52-
"outputFile": "reports/packages/opentelemetry-instrumentation-chromadb/pylint.txt"
53-
}
54-
},
48+
"lint": {},
5549
"test": {
5650
"executor": "@nxlv/python:run-commands",
5751
"outputs": [
@@ -72,7 +66,10 @@
7266
],
7367
"cwd": "packages/opentelemetry-instrumentation-chromadb"
7468
}
75-
}
69+
},
70+
"lint:fix": {}
7671
},
77-
"tags": ["instrumentation"]
72+
"tags": [
73+
"instrumentation"
74+
]
7875
}

packages/opentelemetry-instrumentation-cohere/project.json

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
},
2626
"build": {
2727
"executor": "@nxlv/python:build",
28-
"outputs": ["{projectRoot}/dist"],
28+
"outputs": [
29+
"{projectRoot}/dist"
30+
],
2931
"options": {
3032
"outputPath": "packages/opentelemetry-instrumentation-cohere/dist",
3133
"publish": false,
@@ -43,15 +45,7 @@
4345
"debug": false
4446
}
4547
},
46-
"lint": {
47-
"executor": "@nxlv/python:flake8",
48-
"outputs": [
49-
"{workspaceRoot}/reports/packages/opentelemetry-instrumentation-cohere/pylint.txt"
50-
],
51-
"options": {
52-
"outputFile": "reports/packages/opentelemetry-instrumentation-cohere/pylint.txt"
53-
}
54-
},
48+
"lint": {},
5549
"test": {
5650
"executor": "@nxlv/python:run-commands",
5751
"outputs": [
@@ -72,7 +66,10 @@
7266
],
7367
"cwd": "packages/opentelemetry-instrumentation-cohere"
7468
}
75-
}
69+
},
70+
"lint:fix": {}
7671
},
77-
"tags": ["instrumentation"]
72+
"tags": [
73+
"instrumentation"
74+
]
7875
}

packages/opentelemetry-instrumentation-crewai/project.json

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
},
2626
"build": {
2727
"executor": "@nxlv/python:build",
28-
"outputs": ["{projectRoot}/dist"],
28+
"outputs": [
29+
"{projectRoot}/dist"
30+
],
2931
"options": {
3032
"outputPath": "packages/opentelemetry-instrumentation-crewai/dist",
3133
"publish": false,
@@ -43,15 +45,7 @@
4345
"debug": false
4446
}
4547
},
46-
"lint": {
47-
"executor": "@nxlv/python:flake8",
48-
"outputs": [
49-
"{workspaceRoot}/reports/packages/opentelemetry-instrumentation-crewai/pylint.txt"
50-
],
51-
"options": {
52-
"outputFile": "reports/packages/opentelemetry-instrumentation-crewai/pylint.txt"
53-
}
54-
},
48+
"lint": {},
5549
"test": {
5650
"executor": "@nxlv/python:run-commands",
5751
"outputs": [
@@ -72,7 +66,10 @@
7266
],
7367
"cwd": "packages/opentelemetry-instrumentation-crewai"
7468
}
75-
}
69+
},
70+
"lint:fix": {}
7671
},
77-
"tags": ["instrumentation"]
72+
"tags": [
73+
"instrumentation"
74+
]
7875
}

packages/opentelemetry-instrumentation-google-generativeai/project.json

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
},
2626
"build": {
2727
"executor": "@nxlv/python:build",
28-
"outputs": ["{projectRoot}/dist"],
28+
"outputs": [
29+
"{projectRoot}/dist"
30+
],
2931
"options": {
3032
"outputPath": "packages/opentelemetry-instrumentation-google-generativeai/dist",
3133
"publish": false,
@@ -43,15 +45,7 @@
4345
"debug": false
4446
}
4547
},
46-
"lint": {
47-
"executor": "@nxlv/python:flake8",
48-
"outputs": [
49-
"{workspaceRoot}/reports/packages/opentelemetry-instrumentation-google-generativeai/pylint.txt"
50-
],
51-
"options": {
52-
"outputFile": "reports/packages/opentelemetry-instrumentation-google-generativeai/pylint.txt"
53-
}
54-
},
48+
"lint": {},
5549
"test": {
5650
"executor": "@nxlv/python:run-commands",
5751
"outputs": [
@@ -72,7 +66,10 @@
7266
],
7367
"cwd": "packages/opentelemetry-instrumentation-google-generativeai"
7468
}
75-
}
69+
},
70+
"lint:fix": {}
7671
},
77-
"tags": ["instrumentation"]
72+
"tags": [
73+
"instrumentation"
74+
]
7875
}

packages/opentelemetry-instrumentation-groq/project.json

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
},
2626
"build": {
2727
"executor": "@nxlv/python:build",
28-
"outputs": ["{projectRoot}/dist"],
28+
"outputs": [
29+
"{projectRoot}/dist"
30+
],
2931
"options": {
3032
"outputPath": "packages/opentelemetry-instrumentation-groq/dist",
3133
"publish": false,
@@ -43,15 +45,7 @@
4345
"debug": false
4446
}
4547
},
46-
"lint": {
47-
"executor": "@nxlv/python:flake8",
48-
"outputs": [
49-
"{workspaceRoot}/reports/packages/opentelemetry-instrumentation-groq/pylint.txt"
50-
],
51-
"options": {
52-
"outputFile": "reports/packages/opentelemetry-instrumentation-groq/pylint.txt"
53-
}
54-
},
48+
"lint": {},
5549
"test": {
5650
"executor": "@nxlv/python:run-commands",
5751
"outputs": [
@@ -72,7 +66,10 @@
7266
],
7367
"cwd": "packages/opentelemetry-instrumentation-groq"
7468
}
75-
}
69+
},
70+
"lint:fix": {}
7671
},
77-
"tags": ["instrumentation"]
72+
"tags": [
73+
"instrumentation"
74+
]
7875
}

packages/opentelemetry-instrumentation-haystack/project.json

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
},
2626
"build": {
2727
"executor": "@nxlv/python:build",
28-
"outputs": ["{projectRoot}/dist"],
28+
"outputs": [
29+
"{projectRoot}/dist"
30+
],
2931
"options": {
3032
"outputPath": "packages/opentelemetry-instrumentation-haystack/dist",
3133
"publish": false,
@@ -43,15 +45,7 @@
4345
"debug": false
4446
}
4547
},
46-
"lint": {
47-
"executor": "@nxlv/python:flake8",
48-
"outputs": [
49-
"{workspaceRoot}/reports/packages/opentelemetry-instrumentation-haystack/pylint.txt"
50-
],
51-
"options": {
52-
"outputFile": "reports/packages/opentelemetry-instrumentation-haystack/pylint.txt"
53-
}
54-
},
48+
"lint": {},
5549
"test": {
5650
"executor": "@nxlv/python:run-commands",
5751
"outputs": [
@@ -72,7 +66,10 @@
7266
],
7367
"cwd": "packages/opentelemetry-instrumentation-haystack"
7468
}
75-
}
69+
},
70+
"lint:fix": {}
7671
},
77-
"tags": ["instrumentation"]
72+
"tags": [
73+
"instrumentation"
74+
]
7875
}

0 commit comments

Comments
 (0)