Skip to content

chore: fix issues introduced by updated nx configuration #11230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
9c97ee1
chore: fix issues introduced by updated `nx` configuration
aryaemami59 May 20, 2025
65f04fb
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 May 21, 2025
89e7198
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 May 27, 2025
f84029b
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 May 29, 2025
a17353c
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Jun 2, 2025
1b44a74
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Jun 2, 2025
dfb1481
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Jun 5, 2025
fe83681
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Jun 23, 2025
9d9b0f8
fix lint
aryaemami59 Jun 23, 2025
6e5c7e2
fix `nx` issue with `utils`
aryaemami59 Jun 23, 2025
e2a6e38
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Jun 24, 2025
3a69422
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Jun 30, 2025
a00ea9b
Merge branch 'main' into chore/fix-nx-config-issues
JamesHenry Jul 1, 2025
ac57f06
chore: fix yarn.lock
JamesHenry Jul 1, 2025
3a2efe0
Merge branch 'main' of https://github.com/typescript-eslint/typescrip…
aryaemami59 Jul 1, 2025
4e426b5
chore: fix snapshot and incorrect try wrapper
JamesHenry Jul 1, 2025
2c9f116
Merge branch 'chore/fix-nx-config-issues' of github.com:aryaemami59/t…
JamesHenry Jul 1, 2025
612f34c
chore: use unknown
JamesHenry Jul 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,5 @@ CHANGELOG.md
packages/website/.docusaurus
packages/website/build

# see the file header in eslint-base.test.js for more info
packages/rule-tester/tests/eslint-base

/.nx/cache
/.nx/workspace-data
2 changes: 0 additions & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ export default tseslint.config(
'packages/types/src/generated/**/*.ts',
// Playground types downloaded from the web
'packages/website/src/vendor/',
// see the file header in eslint-base.test.js for more info
'packages/rule-tester/tests/eslint-base/',
],
name: 'global-ignores',
},
Expand Down
42 changes: 28 additions & 14 deletions knip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,35 +54,40 @@ export default {
],
},
},

'packages/eslint-plugin': {
entry: ['tools/**'],
ignore: [
'tests/fixtures/**',
'typings/eslint-rules.d.ts',
'typings/typescript.d.ts',
],
ignoreDependencies: ['tsx'], // used in nx target definitions
ignore: ['typings/eslint-rules.d.ts', 'typings/typescript.d.ts'],

project: ['src/**/*.ts!', 'tools/**/*.mts'],

vitest: {
config: ['vitest.config.mts'],
entry: ['tests/**/*.{bench,test,test-d}.?(c|m)ts?(x)'],
project: ['tests/**', '!tests/fixtures/**'],
},
},

'packages/eslint-plugin-internal': {
ignore: ['tests/fixtures/**'],
},
'packages/integration-tests': {
ignore: ['fixtures/**'],
},
'packages/parser': {
ignore: ['tests/fixtures/**'],

'packages/parser': {
vitest: {
config: ['vitest.config.mts'],
entry: ['tests/lib/**/*.{bench,test,test-d}.?(c|m)ts?(x)'],
entry: [
'tests/lib/**/*.{bench,test,test-d}.?(c|m)ts?(x)',
'tests/test-utils/test-utils.ts',
'tests/test-utils/ts-error-serializer.ts',
],
project: ['tests/**', '!tests/fixtures/**'],
},
},

'packages/rule-tester': {
ignore: ['typings/eslint.d.ts'],

mocha: {
entry: ['tests/eslint-base/eslint-base.test.js'],
},
},
'packages/scope-manager': {
ignore: ['tests/fixtures/**'],
Expand All @@ -109,6 +114,15 @@ export default {
],
},
},

'packages/types': {
project: [
'src/**/*.ts!',
'!src/generated/**/*.ts',
'tools/copy-ast-spec.mts',
],
},

'packages/typescript-estree': {
entry: ['src/use-at-your-own-risk.ts'],
ignore: ['tests/fixtures/**', 'typings/typescript.d.ts'],
Expand Down
23 changes: 15 additions & 8 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,8 @@
"plugin": "@nx/vite/plugin",
"exclude": ["*"],
"options": {
"testTargetName": "test"
}
},
{
"plugin": "@nx/eslint/plugin",
"include": ["packages/*"],
"options": {
"targetName": "lint"
"testTargetName": "test",
"typecheckTargetName": "vite:typecheck"
}
}
],
Expand All @@ -51,7 +45,20 @@
}
},
"targetDefaults": {
"lint": {
"cache": false,
"dependsOn": ["eslint-plugin-internal:build", "typescript-eslint:build"],
"options": {
"cwd": "{workspaceRoot}",
"config": "{workspaceRoot}/eslint.config.mjs",
"args": ["{projectRoot}"]
}
},
"test": {
"dependsOn": ["^build"],
"options": {
"config": "vitest.config.mts"
},
"outputs": ["{projectRoot}/coverage"]
}
},
Expand Down
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.26.0",
"@nx/devkit": "21.0.3",
"@nx/eslint": "21.0.3",
"@nx/js": "21.0.3",
"@nx/vite": "21.0.3",
"@nx/workspace": "21.0.3",
Expand Down Expand Up @@ -149,11 +148,11 @@
"cache": true
},
"lint": {
"command": "eslint . --ignore-pattern=packages --cache",
"dependsOn": [
"typescript-eslint:build",
"eslint-plugin-internal:build"
],
"command": "eslint",
"options": {
"cache": true,
"ignore-pattern": "packages"
},
"cache": false
},
"clean": {
Expand Down
8 changes: 7 additions & 1 deletion packages/ast-spec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"//": "These package scripts are mostly here for convenience. Task running is handled by Nx at the root level.",
"build": "yarn run -BT nx build",
"clean": "rimraf dist/ coverage/",
"clean-fixtures": "rimraf -g \"./src/**/fixtures/**/snapshots\"",
Expand Down Expand Up @@ -82,7 +81,14 @@
],
"cache": true
},
"lint": {
"command": "eslint"
},
"typecheck": {
"outputs": [
"{workspaceRoot}/dist",
"{projectRoot}/dist"
],
"dependsOn": [
"typescript-estree:build"
]
Expand Down
1 change: 1 addition & 0 deletions packages/ast-spec/tests/util/serialize-error.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { ParseError as BabelParseError } from '@babel/parser';

import { codeFrameColumns } from '@babel/code-frame';

import { TSError } from './parsers/typescript-estree-import';
Expand Down
5 changes: 5 additions & 0 deletions packages/ast-spec/vitest.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ const vitestConfig = mergeConfig(
'./tests/util/setupVitest.mts',
'./tests/util/custom-matchers/custom-matchers.ts',
],

typecheck: {
enabled: true,
tsconfig: path.join(import.meta.dirname, 'tsconfig.spec.json'),
},
},
}),
);
Expand Down
11 changes: 8 additions & 3 deletions packages/eslint-plugin-internal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"homepage": "https://typescript-eslint.io",
"license": "MIT",
"scripts": {
"//": "These package scripts are mostly here for convenience. Task running is handled by Nx at the root level.",
"build": "yarn run -BT nx build",
"clean": "rimraf dist/ coverage/",
"format": "yarn run -T format",
Expand All @@ -28,17 +27,23 @@
"@typescript-eslint/scope-manager": "workspace:*",
"@typescript-eslint/type-utils": "workspace:*",
"@typescript-eslint/utils": "workspace:*",
"prettier": "^3.2.5"
"prettier": "3.5.0"
},
"devDependencies": {
"@vitest/coverage-v8": "^3.1.3",
"eslint": "*",
"rimraf": "*",
"vitest": "^3.1.3"
},
"nx": {
"name": "eslint-plugin-internal",
"includedScripts": [
"clean"
]
],
"targets": {
"lint": {
"command": "eslint"
}
}
}
}
7 changes: 5 additions & 2 deletions packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,11 @@
"typescript"
],
"scripts": {
"//": "These package scripts are mostly here for convenience. Task running is handled by Nx at the root level.",
"build": "yarn run -BT nx build",
"clean": "rimraf dist/ coverage/",
"format": "yarn run -T format",
"generate-breaking-changes": "yarn run -BT nx generate-breaking-changes",
"generate-configs": "yarn run -T generate-configs",
"generate-configs": "yarn run -BT nx generate-configs repo",
"lint": "yarn run -BT nx lint",
"test": "yarn run -BT nx test",
"typecheck": "yarn run -BT nx typecheck"
Expand Down Expand Up @@ -84,6 +83,7 @@
"mdast-util-from-markdown": "^2.0.0",
"mdast-util-mdx": "^3.0.0",
"micromark-extension-mdxjs": "^3.0.0",
"prettier": "3.5.0",
"rimraf": "*",
"title-case": "^4.0.0",
"tsx": "*",
Expand Down Expand Up @@ -114,6 +114,9 @@
"dependsOn": [
"type-utils:build"
]
},
"lint": {
"command": "eslint"
}
}
}
Expand Down
19 changes: 17 additions & 2 deletions packages/integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,33 @@
"homepage": "https://typescript-eslint.io",
"license": "MIT",
"scripts": {
"//": "These package scripts are mostly here for convenience. Task running is handled by Nx at the root level.",
"format": "yarn run -T format",
"lint": "yarn run -BT nx lint",
"test": "yarn run -BT nx test",
"typecheck": "yarn run -BT nx typecheck"
},
"devDependencies": {
"@vitest/coverage-v8": "^3.1.3",
"eslint": "*",
"vitest": "^3.1.3"
},
"nx": {
"name": "integration-tests",
"includedScripts": []
"includedScripts": [],
"targets": {
"test": {
"dependsOn": [
{
"projects": [
"tag:npm:public"
],
"target": "build"
}
]
},
"lint": {
"command": "eslint"
}
}
}
}
24 changes: 12 additions & 12 deletions packages/integration-tests/tests/__snapshots__/vue-sfc.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,20 @@ export default Vue.extend({
{
"message": "ESLint Stylistic now maintains deprecated stylistic core rules.",
"plugin": {
"name": "@stylistic/eslint-plugin-js",
"url": "https://eslint.style/packages/js",
"name": "@stylistic/eslint-plugin",
"url": "https://eslint.style",
},
"rule": {
"name": "semi-spacing",
"url": "https://eslint.style/rules/js/semi-spacing",
"url": "https://eslint.style/rules/semi-spacing",
},
"url": "https://eslint.style/guide/migration",
},
],
"url": "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
},
"replacedBy": [
"@stylistic/js/semi-spacing",
"@stylistic/semi-spacing",
],
"ruleId": "semi-spacing",
},
Expand Down Expand Up @@ -130,20 +130,20 @@ export default class Utility {
{
"message": "ESLint Stylistic now maintains deprecated stylistic core rules.",
"plugin": {
"name": "@stylistic/eslint-plugin-js",
"url": "https://eslint.style/packages/js",
"name": "@stylistic/eslint-plugin",
"url": "https://eslint.style",
},
"rule": {
"name": "semi-spacing",
"url": "https://eslint.style/rules/js/semi-spacing",
"url": "https://eslint.style/rules/semi-spacing",
},
"url": "https://eslint.style/guide/migration",
},
],
"url": "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
},
"replacedBy": [
"@stylistic/js/semi-spacing",
"@stylistic/semi-spacing",
],
"ruleId": "semi-spacing",
},
Expand Down Expand Up @@ -209,20 +209,20 @@ export default Vue.extend({
{
"message": "ESLint Stylistic now maintains deprecated stylistic core rules.",
"plugin": {
"name": "@stylistic/eslint-plugin-js",
"url": "https://eslint.style/packages/js",
"name": "@stylistic/eslint-plugin",
"url": "https://eslint.style",
},
"rule": {
"name": "semi-spacing",
"url": "https://eslint.style/rules/js/semi-spacing",
"url": "https://eslint.style/rules/semi-spacing",
},
"url": "https://eslint.style/guide/migration",
},
],
"url": "https://eslint.org/blog/2023/10/deprecating-formatting-rules/",
},
"replacedBy": [
"@stylistic/js/semi-spacing",
"@stylistic/semi-spacing",
],
"ruleId": "semi-spacing",
},
Expand Down
5 changes: 3 additions & 2 deletions packages/integration-tests/tools/integration-test-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,15 @@ export function eslintIntegrationTest(
`"filePath": "<root>/${path.relative(testFolder, testFile)}"`,
)
.replaceAll(/C:\\\\(usr)\\\\(linked)\\\\(tsconfig.json)/g, '/$1/$2/$3');
let lintOutput: unknown;
try {
const lintOutput = JSON.parse(lintOutputRAW);
expect(lintOutput).toMatchSnapshot();
lintOutput = JSON.parse(lintOutputRAW);
} catch {
throw new Error(
`Lint output could not be parsed as JSON: \`${lintOutputRAW}\`.`,
);
}
expect(lintOutput).toMatchSnapshot();
});
}

Expand Down
Loading