diff --git a/.prettierignore b/.prettierignore index c5f057dfff86..9a14c7180b0b 100644 --- a/.prettierignore +++ b/.prettierignore @@ -12,20 +12,7 @@ packages/eslint-plugin/tests/fixtures/indent/ # ignore all error fixtures cos they often have intentional syntax errors packages/ast-spec/src/*/*/fixtures/_error_/*/fixture.ts -# TS 5.6 -- string literal import/export specifiers # TODO - remove this once prettier supports it -packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/braced-identifier-aliased-to-string-literal-with-source/fixture.ts -packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/braced-identifier-aliased-to-string-literal-without-source/fixture.ts -packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/braced-string-literal-aliased-to-identifier-with-source/fixture.ts -packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/braced-string-literal-many-with-source/fixture.ts -packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/braced-string-literal-with-source/fixture.ts -packages/ast-spec/src/declaration/ImportDeclaration/fixtures/named-string-literal-aliased-to-identifier/fixture.ts -packages/ast-spec/src/special/ExportSpecifier/fixtures/literal-specifier/fixture.ts -packages/ast-spec/src/special/ExportSpecifier/fixtures/value-export-specifier/fixture.ts - -# TODO - remove this once prettier supports it -# https://github.com/prettier/prettier/issues/16072 -packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/fixture.ts # https://github.com/prettier/prettier/issues/17405 packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-trailing-comma-in-import-attributes/fixture.ts diff --git a/docs/maintenance/pull-requests/Dependency_Version_Upgrades.mdx b/docs/maintenance/pull-requests/Dependency_Version_Upgrades.mdx index 596c7ea0611e..a009e10aaa4b 100644 --- a/docs/maintenance/pull-requests/Dependency_Version_Upgrades.mdx +++ b/docs/maintenance/pull-requests/Dependency_Version_Upgrades.mdx @@ -112,7 +112,6 @@ See [feat: drop support for node v12](https://github.com/typescript-eslint/types We generally start the process of supporting a new TypeScript version just after the first beta release for that version is made available. 1. Create and pin an issue with a title like _TypeScript X.Y Support_, `accepting prs`, `AST`, `dependencies`, and `New TypeScript Version` labels, and the following contents: - 1. A link to the _TypeScript X.Y Iteration Plan_ issue from the Microsoft issue tracker 2. The following text: diff --git a/docs/packages/Parser.mdx b/docs/packages/Parser.mdx index 7e9336773f03..52a294e67e41 100644 --- a/docs/packages/Parser.mdx +++ b/docs/packages/Parser.mdx @@ -251,7 +251,6 @@ project: null; ``` - If `true`, each source file's parse will find the nearest `tsconfig.json` file to that source file. - - This is done by checking that source file's directory tree for the nearest `tsconfig.json`. - If you use project references, TypeScript will **not** automatically use project references to resolve files. This means that you will have to add each referenced tsconfig to the `project` field either separately, or via a glob. diff --git a/package.json b/package.json index dcacd743d00c..36f09ef6c9b1 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,7 @@ "lint-staged": "^15.2.2", "markdownlint-cli": "^0.44.0", "nx": "21.2.3", - "prettier": "3.5.0", + "prettier": "3.6.2", "rimraf": "^5.0.5", "semver": "7.7.0", "tsx": "*", @@ -111,7 +111,6 @@ "@types/node": "^22.0.0", "@types/react": "^18.2.14", "eslint-plugin-eslint-plugin@^5.5.0": "patch:eslint-plugin-eslint-plugin@npm%3A5.5.1#./.yarn/patches/eslint-plugin-eslint-plugin-npm-5.5.1-4206c2506d.patch", - "prettier": "3.5.0", "react-split-pane@^0.1.92": "patch:react-split-pane@npm%3A0.1.92#./.yarn/patches/react-split-pane-npm-0.1.92-93dbf51dff.patch", "tsx": "^4.7.2", "typescript": "5.9.2" diff --git a/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/fixture.ts b/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/fixture.ts index 79df9dadf881..25af9fe33ec6 100644 --- a/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/fixture.ts +++ b/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/fixture.ts @@ -1 +1 @@ -type A = import("A", { with: { type: "json" } }); +type A = import('A', { with: { type: 'json' } }); diff --git a/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/snapshots/1-TSESTree-AST.shot index 225e77e8303a..e20487325971 100644 --- a/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/snapshots/1-TSESTree-AST.shot @@ -22,7 +22,7 @@ Program { type: "TSLiteralType", literal: Literal { type: "Literal", - raw: ""A"", + raw: "'A'", value: "A", range: [16, 19], @@ -84,7 +84,7 @@ Program { shorthand: false, value: Literal { type: "Literal", - raw: ""json"", + raw: "'json'", value: "json", range: [37, 43], diff --git a/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/snapshots/2-TSESTree-Tokens.shot b/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/snapshots/2-TSESTree-Tokens.shot index d9a618899217..4aa87f31f614 100644 --- a/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/snapshots/2-TSESTree-Tokens.shot +++ b/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/snapshots/2-TSESTree-Tokens.shot @@ -51,7 +51,7 @@ }, String { type: "String", - value: ""A"", + value: "'A'", range: [16, 19], loc: { @@ -131,7 +131,7 @@ }, String { type: "String", - value: ""json"", + value: "'json'", range: [37, 43], loc: { diff --git a/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/snapshots/3-Babel-AST.shot b/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/snapshots/3-Babel-AST.shot index 76cbe3e5d77c..79fdc1382198 100644 --- a/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/snapshots/3-Babel-AST.shot +++ b/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/snapshots/3-Babel-AST.shot @@ -20,7 +20,7 @@ Program { type: "TSImportType", argument: Literal { type: "Literal", - raw: ""A"", + raw: "'A'", value: "A", range: [16, 19], @@ -75,7 +75,7 @@ Program { shorthand: false, value: Literal { type: "Literal", - raw: ""json"", + raw: "'json'", value: "json", range: [37, 43], diff --git a/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/snapshots/4-Babel-Tokens.shot b/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/snapshots/4-Babel-Tokens.shot index 91cd1f711197..352ef98a8d93 100644 --- a/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/snapshots/4-Babel-Tokens.shot +++ b/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/snapshots/4-Babel-Tokens.shot @@ -51,7 +51,7 @@ }, String { type: "String", - value: ""A"", + value: "'A'", range: [16, 19], loc: { @@ -131,7 +131,7 @@ }, String { type: "String", - value: ""json"", + value: "'json'", range: [37, 43], loc: { diff --git a/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/snapshots/5-AST-Alignment-AST.shot index 31b5f49ee553..668b4bceacd6 100644 --- a/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/snapshots/5-AST-Alignment-AST.shot @@ -29,11 +29,11 @@ Snapshot Diff: - type: 'TSLiteralType', - literal: Literal { - type: 'Literal', -- raw: '"A"', +- raw: '\'A\'', - value: 'A', + argument: Literal { + type: 'Literal', -+ raw: '"A"', ++ raw: '\'A\'', + value: 'A', - range: [16, 19], @@ -95,7 +95,7 @@ Snapshot Diff: shorthand: false, value: Literal { type: 'Literal', - raw: '"json"', + raw: '\'json\'', value: 'json', range: [37, 43], diff --git a/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/snapshots/6-AST-Alignment-Tokens.shot b/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/snapshots/6-AST-Alignment-Tokens.shot index 87fdac962d79..bbd22a21ad7c 100644 --- a/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/snapshots/6-AST-Alignment-Tokens.shot +++ b/packages/ast-spec/src/type/TSImportType/fixtures/type-import-type-with-import-attributes-with/snapshots/6-AST-Alignment-Tokens.shot @@ -58,7 +58,7 @@ Snapshot Diff: }, String { type: 'String', - value: '"A"', + value: '\'A\'', range: [16, 19], loc: { @@ -140,7 +140,7 @@ Snapshot Diff: }, String { type: 'String', - value: '"json"', + value: '\'json\'', range: [37, 43], loc: { diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index 20c9d4f6be11..9b105586f76a 100644 --- a/packages/eslint-plugin-internal/package.json +++ b/packages/eslint-plugin-internal/package.json @@ -27,7 +27,7 @@ "@typescript-eslint/scope-manager": "workspace:*", "@typescript-eslint/type-utils": "workspace:*", "@typescript-eslint/utils": "workspace:*", - "prettier": "3.5.0" + "prettier": "3.6.2" }, "devDependencies": { "@vitest/coverage-v8": "^3.1.3", diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index e38ecf7a466e..59a5b0a5428a 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -83,7 +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", + "prettier": "3.6.2", "rimraf": "*", "title-case": "^4.0.0", "tsx": "*", diff --git a/packages/eslint-plugin/tests/rules/no-confusing-void-expression.test.ts b/packages/eslint-plugin/tests/rules/no-confusing-void-expression.test.ts index 4fcb1b8b6865..9adc9e2403b6 100644 --- a/packages/eslint-plugin/tests/rules/no-confusing-void-expression.test.ts +++ b/packages/eslint-plugin/tests/rules/no-confusing-void-expression.test.ts @@ -110,13 +110,13 @@ ruleTester.run('no-confusing-void-expression', rule, { ` function cool(input: string) { - return console.log(input), input; + return (console.log(input), input); } `, { code: ` function cool(input: string) { - return input, console.log(input), input; + return (input, console.log(input), input); } `, }, @@ -487,10 +487,10 @@ test((() => { { code: ` function notcool(input: string) { - return input, console.log(input); + return (input, console.log(input)); } `, - errors: [{ column: 17, line: 3, messageId: 'invalidVoidExpr' }], + errors: [{ column: 18, line: 3, messageId: 'invalidVoidExpr' }], output: null, }, { diff --git a/packages/eslint-plugin/tests/rules/no-floating-promises.test.ts b/packages/eslint-plugin/tests/rules/no-floating-promises.test.ts index 4835087e7cb6..61467bf0099b 100644 --- a/packages/eslint-plugin/tests/rules/no-floating-promises.test.ts +++ b/packages/eslint-plugin/tests/rules/no-floating-promises.test.ts @@ -112,18 +112,18 @@ async function test() { `, ` async function test() { - Promise.resolve().catch(() => {}), 123; - 123, + (Promise.resolve().catch(() => {}), 123); + (123, Promise.resolve().then( () => {}, () => {}, - ); - 123, + )); + (123, Promise.resolve().then( () => {}, () => {}, ), - 123; + 123); } `, ` @@ -512,7 +512,7 @@ interface SafeThenable { ): SafeThenable; } let promise: SafeThenable = Promise.resolve(5); -0, promise; +(0, promise); `, options: [ { @@ -594,7 +594,7 @@ interface SafeThenable { ): SafeThenable; } let promise: () => SafeThenable = () => Promise.resolve(5); -0, promise(); +(0, promise()); `, options: [ { @@ -2000,9 +2000,9 @@ async function test() { { code: ` async function test() { - Promise.resolve(), 123; - 123, Promise.resolve(); - 123, Promise.resolve(), 123; + (Promise.resolve(), 123); + (123, Promise.resolve()); + (123, Promise.resolve(), 123); } `, errors: [ @@ -2014,9 +2014,9 @@ async function test() { messageId: 'floatingFixVoid', output: ` async function test() { - void (Promise.resolve(), 123); - 123, Promise.resolve(); - 123, Promise.resolve(), 123; + void ((Promise.resolve(), 123)); + (123, Promise.resolve()); + (123, Promise.resolve(), 123); } `, }, @@ -2024,9 +2024,9 @@ async function test() { messageId: 'floatingFixAwait', output: ` async function test() { - await (Promise.resolve(), 123); - 123, Promise.resolve(); - 123, Promise.resolve(), 123; + await ((Promise.resolve(), 123)); + (123, Promise.resolve()); + (123, Promise.resolve(), 123); } `, }, @@ -2040,9 +2040,9 @@ async function test() { messageId: 'floatingFixVoid', output: ` async function test() { - Promise.resolve(), 123; - void (123, Promise.resolve()); - 123, Promise.resolve(), 123; + (Promise.resolve(), 123); + void ((123, Promise.resolve())); + (123, Promise.resolve(), 123); } `, }, @@ -2050,9 +2050,9 @@ async function test() { messageId: 'floatingFixAwait', output: ` async function test() { - Promise.resolve(), 123; - await (123, Promise.resolve()); - 123, Promise.resolve(), 123; + (Promise.resolve(), 123); + await ((123, Promise.resolve())); + (123, Promise.resolve(), 123); } `, }, @@ -2066,9 +2066,9 @@ async function test() { messageId: 'floatingFixVoid', output: ` async function test() { - Promise.resolve(), 123; - 123, Promise.resolve(); - void (123, Promise.resolve(), 123); + (Promise.resolve(), 123); + (123, Promise.resolve()); + void ((123, Promise.resolve(), 123)); } `, }, @@ -2076,9 +2076,9 @@ async function test() { messageId: 'floatingFixAwait', output: ` async function test() { - Promise.resolve(), 123; - 123, Promise.resolve(); - await (123, Promise.resolve(), 123); + (Promise.resolve(), 123); + (123, Promise.resolve()); + await ((123, Promise.resolve(), 123)); } `, }, @@ -2194,7 +2194,7 @@ await /* ... */ returnsPromise(); async function returnsPromise() { return 'value'; } -1, returnsPromise(); +(1, returnsPromise()); `, errors: [ { @@ -2207,7 +2207,7 @@ async function returnsPromise() { async function returnsPromise() { return 'value'; } -await (1, returnsPromise()); +await ((1, returnsPromise())); `, }, ], @@ -4516,7 +4516,7 @@ await promiseIntersection.finally(() => {}); }, { code: ` -Promise.resolve().finally(() => {}), 123; +(Promise.resolve().finally(() => {}), 123); `, errors: [ { @@ -4526,13 +4526,13 @@ Promise.resolve().finally(() => {}), 123; { messageId: 'floatingFixVoid', output: ` -void (Promise.resolve().finally(() => {}), 123); +void ((Promise.resolve().finally(() => {}), 123)); `, }, { messageId: 'floatingFixAwait', output: ` -await (Promise.resolve().finally(() => {}), 123); +await ((Promise.resolve().finally(() => {}), 123)); `, }, ], diff --git a/packages/eslint-plugin/tests/rules/no-unused-expressions.test.ts b/packages/eslint-plugin/tests/rules/no-unused-expressions.test.ts index fa3159a96aa2..ca860a304a9d 100644 --- a/packages/eslint-plugin/tests/rules/no-unused-expressions.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unused-expressions.test.ts @@ -87,11 +87,11 @@ ruleTester.run('no-unused-expressions', rule, { ], }, { - code: 'f(0), {};', + code: '(f(0), {});', errors: [ { column: 1, - endColumn: 10, + endColumn: 12, endLine: 1, line: 1, messageId: 'unusedExpression', @@ -99,11 +99,11 @@ ruleTester.run('no-unused-expressions', rule, { ], }, { - code: 'a, b();', + code: '(a, b());', errors: [ { column: 1, - endColumn: 8, + endColumn: 10, endLine: 1, line: 1, messageId: 'unusedExpression', diff --git a/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars-eslint.test.ts b/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars-eslint.test.ts index c9048412d8c0..d05d538d2731 100644 --- a/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars-eslint.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars-eslint.test.ts @@ -1566,15 +1566,15 @@ foo*/ { code: ` let x = 0; -x++, (x = 0); +(x++, (x = 0)); `, - errors: [{ ...assignedError('x'), column: 7, line: 3 }], + errors: [{ ...assignedError('x'), column: 8, line: 3 }], languageOptions: { parserOptions: { ecmaVersion: 2015 } }, }, { code: ` let x = 0; -x++, (x = 0); +(x++, (x = 0)); x = 3; `, errors: [{ ...assignedError('x'), column: 1, line: 4 }], @@ -1583,25 +1583,25 @@ x = 3; { code: ` let x = 0; -x++, 0; +(x++, 0); `, - errors: [{ ...assignedError('x'), column: 1, line: 3 }], + errors: [{ ...assignedError('x'), column: 2, line: 3 }], languageOptions: { parserOptions: { ecmaVersion: 2015 } }, }, { code: ` let x = 0; -0, x++; +(0, x++); `, - errors: [{ ...assignedError('x'), column: 4, line: 3 }], + errors: [{ ...assignedError('x'), column: 5, line: 3 }], languageOptions: { parserOptions: { ecmaVersion: 2015 } }, }, { code: ` let x = 0; -0, (1, x++); +(0, (1, x++)); `, - errors: [{ ...assignedError('x'), column: 8, line: 3 }], + errors: [{ ...assignedError('x'), column: 9, line: 3 }], languageOptions: { parserOptions: { ecmaVersion: 2015 } }, }, { @@ -1623,25 +1623,25 @@ foo = ((0, x++), 0); { code: ` let x = 0; -(x += 1), 0; +((x += 1), 0); `, - errors: [{ ...assignedError('x'), column: 2, line: 3 }], + errors: [{ ...assignedError('x'), column: 3, line: 3 }], languageOptions: { parserOptions: { ecmaVersion: 2015 } }, }, { code: ` let x = 0; -0, (x += 1); +(0, (x += 1)); `, - errors: [{ ...assignedError('x'), column: 5, line: 3 }], + errors: [{ ...assignedError('x'), column: 6, line: 3 }], languageOptions: { parserOptions: { ecmaVersion: 2015 } }, }, { code: ` let x = 0; -0, (1, (x += 1)); +(0, (1, (x += 1))); `, - errors: [{ ...assignedError('x'), column: 9, line: 3 }], + errors: [{ ...assignedError('x'), column: 10, line: 3 }], languageOptions: { parserOptions: { ecmaVersion: 2015 } }, }, { @@ -1665,15 +1665,15 @@ foo = ((0, (x += 1)), 0); { code: ` let z = 0; -(z = z + 1), (z = 2); +((z = z + 1), (z = 2)); `, - errors: [{ ...assignedError('z'), column: 15, line: 3 }], + errors: [{ ...assignedError('z'), column: 16, line: 3 }], languageOptions: { parserOptions: { ecmaVersion: 2020 } }, }, { code: ` let z = 0; -(z = z + 1), (z = 2); +((z = z + 1), (z = 2)); z = 3; `, errors: [{ ...assignedError('z'), column: 1, line: 4 }], @@ -1682,7 +1682,7 @@ z = 3; { code: ` let z = 0; -(z = z + 1), (z = 2); +((z = z + 1), (z = 2)); z = z + 3; `, errors: [{ ...assignedError('z'), column: 1, line: 4 }], @@ -1691,17 +1691,17 @@ z = z + 3; { code: ` let x = 0; -0, (x = x + 1); +(0, (x = x + 1)); `, - errors: [{ ...assignedError('x'), column: 5, line: 3 }], + errors: [{ ...assignedError('x'), column: 6, line: 3 }], languageOptions: { parserOptions: { ecmaVersion: 2020 } }, }, { code: ` let x = 0; -(x = x + 1), 0; +((x = x + 1), 0); `, - errors: [{ ...assignedError('x'), column: 2, line: 3 }], + errors: [{ ...assignedError('x'), column: 3, line: 3 }], languageOptions: { parserOptions: { ecmaVersion: 2020 } }, }, { @@ -1723,9 +1723,9 @@ foo = ((x = x + 1), 0); { code: ` let x = 0; -0, (1, (x = x + 1)); +(0, (1, (x = x + 1))); `, - errors: [{ ...assignedError('x'), column: 9, line: 3 }], + errors: [{ ...assignedError('x'), column: 10, line: 3 }], languageOptions: { parserOptions: { ecmaVersion: 2020 } }, }, { @@ -1972,7 +1972,11 @@ const _b = _a + 5; errors: [usedIgnoredError('_a', '. Used vars must not match /^_/u')], languageOptions: { parserOptions: { ecmaVersion: 6 } }, options: [ - { args: 'all', reportUsedIgnorePattern: true, varsIgnorePattern: '^_' }, + { + args: 'all', + reportUsedIgnorePattern: true, + varsIgnorePattern: '^_', + }, ], }, { @@ -1983,7 +1987,11 @@ foo(() => _a); errors: [usedIgnoredError('_a', '. Used vars must not match /^_/u')], languageOptions: { parserOptions: { ecmaVersion: 6 } }, options: [ - { args: 'all', reportUsedIgnorePattern: true, varsIgnorePattern: '^_' }, + { + args: 'all', + reportUsedIgnorePattern: true, + varsIgnorePattern: '^_', + }, ], }, { @@ -1994,7 +2002,11 @@ foo(() => _a); `, errors: [usedIgnoredError('_a', '. Used args must not match /^_/u')], options: [ - { args: 'all', argsIgnorePattern: '^_', reportUsedIgnorePattern: true }, + { + args: 'all', + argsIgnorePattern: '^_', + reportUsedIgnorePattern: true, + }, ], }, { @@ -2010,7 +2022,10 @@ console.log(a + _b); ], languageOptions: { parserOptions: { ecmaVersion: 6 } }, options: [ - { destructuredArrayIgnorePattern: '^_', reportUsedIgnorePattern: true }, + { + destructuredArrayIgnorePattern: '^_', + reportUsedIgnorePattern: true, + }, ], }, { @@ -3449,7 +3464,11 @@ const _c = a + 5; `, languageOptions: { parserOptions: { ecmaVersion: 6 } }, options: [ - { args: 'all', reportUsedIgnorePattern: true, varsIgnorePattern: '^_' }, + { + args: 'all', + reportUsedIgnorePattern: true, + varsIgnorePattern: '^_', + }, ], }, { @@ -3459,7 +3478,11 @@ const _c = a + 5; })(5); `, options: [ - { args: 'all', argsIgnorePattern: '^_', reportUsedIgnorePattern: true }, + { + args: 'all', + argsIgnorePattern: '^_', + reportUsedIgnorePattern: true, + }, ], }, { @@ -3469,7 +3492,10 @@ console.log(a + c); `, languageOptions: { parserOptions: { ecmaVersion: 6 } }, options: [ - { destructuredArrayIgnorePattern: '^_', reportUsedIgnorePattern: true }, + { + destructuredArrayIgnorePattern: '^_', + reportUsedIgnorePattern: true, + }, ], }, ], diff --git a/packages/eslint-plugin/tests/rules/prefer-optional-chain/prefer-optional-chain.test.ts b/packages/eslint-plugin/tests/rules/prefer-optional-chain/prefer-optional-chain.test.ts index 12c73b04eea7..b72289d020b2 100644 --- a/packages/eslint-plugin/tests/rules/prefer-optional-chain/prefer-optional-chain.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-optional-chain/prefer-optional-chain.test.ts @@ -1515,8 +1515,7 @@ describe('hand-crafted cases', () => { errors: [{ messageId: 'preferOptionalChain', suggestions: null }], options: [ { - allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing: - true, + allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing: true, }, ], output: ` @@ -1545,8 +1544,7 @@ describe('hand-crafted cases', () => { ], options: [ { - allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing: - false, + allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing: false, }, ], output: null, @@ -1560,8 +1558,7 @@ describe('hand-crafted cases', () => { errors: [{ messageId: 'preferOptionalChain' }], options: [ { - allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing: - true, + allowPotentiallyUnsafeFixesThatModifyTheReturnTypeIKnowWhatImDoing: true, }, ], output: ` diff --git a/packages/rule-schema-to-typescript-types/package.json b/packages/rule-schema-to-typescript-types/package.json index 74d9ffd401e3..8b61f154b058 100644 --- a/packages/rule-schema-to-typescript-types/package.json +++ b/packages/rule-schema-to-typescript-types/package.json @@ -35,7 +35,7 @@ "@typescript-eslint/type-utils": "8.40.0", "@typescript-eslint/utils": "8.40.0", "natural-compare": "^1.4.0", - "prettier": "3.5.0" + "prettier": "3.6.2" }, "devDependencies": { "@vitest/coverage-v8": "^3.1.3", diff --git a/packages/website/package.json b/packages/website/package.json index 528850f495fd..a8c3c676af7b 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -43,7 +43,7 @@ "json5": "^2.2.3", "konamimojisplosion": "^0.5.2", "lz-string": "^1.5.0", - "prettier": "3.5.0", + "prettier": "3.6.2", "prism-react-renderer": "^2.3.1", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/yarn.lock b/yarn.lock index da06edc171f7..20eb695c94e8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5724,7 +5724,7 @@ __metadata: "@typescript-eslint/utils": "workspace:*" "@vitest/coverage-v8": ^3.1.3 eslint: "*" - prettier: 3.5.0 + prettier: 3.6.2 rimraf: "*" vitest: ^3.1.3 languageName: unknown @@ -5756,7 +5756,7 @@ __metadata: mdast-util-mdx: ^3.0.0 micromark-extension-mdxjs: ^3.0.0 natural-compare: ^1.4.0 - prettier: 3.5.0 + prettier: 3.6.2 rimraf: "*" title-case: ^4.0.0 ts-api-utils: ^2.1.0 @@ -5827,7 +5827,7 @@ __metadata: "@vitest/coverage-v8": ^3.1.3 eslint: "*" natural-compare: ^1.4.0 - prettier: 3.5.0 + prettier: 3.6.2 rimraf: "*" typescript: "*" vitest: ^3.1.3 @@ -5970,7 +5970,7 @@ __metadata: lint-staged: ^15.2.2 markdownlint-cli: ^0.44.0 nx: 21.2.3 - prettier: 3.5.0 + prettier: 3.6.2 rimraf: ^5.0.5 semver: 7.7.0 tsx: "*" @@ -16532,12 +16532,12 @@ __metadata: languageName: node linkType: hard -"prettier@npm:3.5.0": - version: 3.5.0 - resolution: "prettier@npm:3.5.0" +"prettier@npm:3.6.2": + version: 3.6.2 + resolution: "prettier@npm:3.6.2" bin: prettier: bin/prettier.cjs - checksum: 5b451b701a437f4561b7413d1e5c1da92b1af52bf5995a429ce67c84a8525145f90992c00fe2eefd471c307d261d6f160b4bac045e0ca38f1aa4aba5e9bfdf0f + checksum: 0206f5f437892e8858f298af8850bf9d0ef1c22e21107a213ba56bfb9c2387a2020bfda244a20161d8e3dad40c6b04101609a55d370dece53d0a31893b64f861 languageName: node linkType: hard @@ -20228,7 +20228,7 @@ __metadata: mdast-util-from-markdown: ^2.0.1 mdast-util-mdx: ^3.0.0 monaco-editor: ~0.52.0 - prettier: 3.5.0 + prettier: 3.6.2 prism-react-renderer: ^2.3.1 raw-loader: ^4.0.2 react: ^18.2.0