Skip to content

Commit cfbf960

Browse files
authored
build(client): generate eslint 9 configs for all packages (#25989)
This change updates the shared eslint 9 config to be TypeScript and updates the script in scripts/generate-flat-eslint-configs.ts to support a `--typescript` flag to output typescript per-package configs instead of ESM. Also adds a `--finalize` flag that will do some additional cleanup once packages are fully migrated to eslint 9. Finally, there are lots of fixes to the script to handle ignore entries, inheritance from other configs, etc. The script now produces configs that work in my testing without any modifications. Even if that doesn't hold true once we are truly migrating (see #25932), merging this beforehand will simplify the review of those changes. All the configs were generated by the script using this command: ``` tsx scripts/generate-flat-eslint-configs.ts --typescript ```
1 parent fa7091a commit cfbf960

File tree

166 files changed

+5496
-170
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+5496
-170
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/* eslint-disable */
2+
/**
3+
* GENERATED FILE - DO NOT EDIT DIRECTLY.
4+
* To regenerate: pnpm tsx scripts/generate-flat-eslint-configs.ts --typescript
5+
*/
6+
import type { Linter } from "eslint";
7+
import { strict } from "../../../common/build/eslint-config-fluid/flat.mts";
8+
9+
const config: Linter.Config[] = [
10+
...strict,
11+
{
12+
files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
13+
languageOptions: {
14+
parserOptions: {
15+
projectService: false,
16+
project: ["./tsconfig.eslint.json"],
17+
},
18+
},
19+
},
20+
];
21+
22+
export default config;
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/* eslint-disable */
2+
/**
3+
* GENERATED FILE - DO NOT EDIT DIRECTLY.
4+
* To regenerate: pnpm tsx scripts/generate-flat-eslint-configs.ts --typescript
5+
*/
6+
import type { Linter } from "eslint";
7+
import { strict } from "../../../common/build/eslint-config-fluid/flat.mts";
8+
9+
const config: Linter.Config[] = [
10+
...strict,
11+
{
12+
rules: {
13+
"import-x/no-unassigned-import": "off",
14+
"@typescript-eslint/strict-boolean-expressions": "off",
15+
"unicorn/prevent-abbreviations": [
16+
"error",
17+
{
18+
"allowList": {
19+
"i": true,
20+
},
21+
},
22+
],
23+
},
24+
},
25+
{
26+
files: ["src/test/types/*"],
27+
rules: {
28+
"unicorn/prevent-abbreviations": "off",
29+
},
30+
},
31+
];
32+
33+
export default config;

common/build/eslint-config-fluid/flat.mjs

Lines changed: 0 additions & 132 deletions
This file was deleted.

0 commit comments

Comments
 (0)