Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
5a2af35
⬆️ eslint 10 toolchain: manifests to ESM + exports maps, peer eslint …
uPaymeiFixit Aug 11, 2026
3993dee
♻️ eslint-plugin-nest: flat-first configs, ESM, retarget no-barreling…
uPaymeiFixit Aug 11, 2026
cc3c50b
♻️ rewrite all 10 eslint config packages as ESLint 10 flat configs
uPaymeiFixit Aug 11, 2026
5a74b3d
♻️ repo self-lint on flat config: eslint.config.mjs per root/package,…
uPaymeiFixit Aug 11, 2026
23487d3
♻️ test harness + package tests on flat config ESLint 10
uPaymeiFixit Aug 11, 2026
5ae0927
🐛 scope typescript-eslint's eslint-recommended disables to TS files only
uPaymeiFixit Aug 11, 2026
30251cc
♻️ create-configs emits eslint.config.mjs
uPaymeiFixit Aug 11, 2026
87178e4
👷 CI: node 20.19/22/24 test matrix + scaffolder e2e smoke job
uPaymeiFixit Aug 11, 2026
02f1c7f
📝 docs for the v3 flat-config line: migration guide, README snippets,…
uPaymeiFixit Aug 11, 2026
88f9295
🐛 build eslint-plugin-nest before the workspaces that import it
uPaymeiFixit Oct 22, 2026
9c1e95c
⏪ revert changes outside the ESLint migration's scope
uPaymeiFixit Oct 22, 2026
e434c1a
⬆️ rebuild the lockfile incrementally from main's
uPaymeiFixit Oct 22, 2026
8bbfb05
♻️ restore the original package layout and export configs by name
uPaymeiFixit Oct 22, 2026
6668a91
🐛 re-apply the testing override to all of utils' test globs
uPaymeiFixit Oct 22, 2026
5d5bd87
🐛 stop tracking the remaining tsbuildinfo build state
uPaymeiFixit Oct 22, 2026
9ea9ff9
🐛 keep typescript-eslint out of single-run mode in tests
uPaymeiFixit Oct 22, 2026
ac7cd48
🐛 no-barreling: only delete the `export *` declarations
uPaymeiFixit Oct 22, 2026
b711e47
🐛 put each test/lenient relaxation in the package that owns the rule
uPaymeiFixit Oct 22, 2026
d1a1df0
✨ create-configs carries local eslintrc settings into eslint.config.mjs
uPaymeiFixit Oct 22, 2026
91af996
👷 publish prereleases under the `next` dist-tag
uPaymeiFixit Oct 22, 2026
9f88e63
✨ export the typescript & jest configs' file globs; document customizing
uPaymeiFixit Oct 22, 2026
97e4722
🐛 create-configs: fix verify_missing's delete race and ignored results
uPaymeiFixit Oct 23, 2026
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
18 changes: 0 additions & 18 deletions .eslintrc.yaml

This file was deleted.

9 changes: 6 additions & 3 deletions .github/workflows/build-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,17 @@ jobs:
with:
install-modules: false

- name: 'Get package version 🔖'
id: 'get-package-version'
run: 'echo "version=v$(npm pkg get version | jq --raw-output)" >> "$GITHUB_OUTPUT"'

- name: 'Publish to NPM 🚀'
env:
NODE_AUTH_TOKEN: '${{ secrets.NPM_AUTH_TOKEN }}'
# keep prereleases off the `latest` dist-tag
npm_config_tag: "${{ contains(steps.get-package-version.outputs.version, '-') && 'next' || 'latest' }}"
uses: 'dudeofawesome/actions/npm-publish@a850bdff4354bdb891a86116f0378f8a890e2c16' # v1

- name: 'Get package version 🔖'
id: 'get-package-version'
run: 'echo "version=v$(npm pkg get version | jq --raw-output)" >> "$GITHUB_OUTPUT"'
- name: 'Build jsonschema 🏗️'
run: 'npm run build:jsonschema --workspace packages/code-style'
- name: 'Publish files to Github Releases 🚀'
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ code-style-*-*.*.*.tgz

# caches
.eslintcache
*.tsbuildinfo
2 changes: 0 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,11 @@
}
],
"material-icon-theme.files.associations": {
"eslint-config*/*.yaml": "eslint",
"styleint-config/*.yaml": "stylelint",
"typescript-configs/**/*.json": "tsconfig",
"javascript-configs/**/*.json": "jsconfig"
},
"yaml.schemas": {
"https://json.schemastore.org/eslintrc": ["eslint-config*/**/*.yaml"],
"https://json.schemastore.org/stylelintrc.json": ["stylelint-config/*.yaml"]
},
"cSpell.words": ["esmodule"]
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

See [create-configs](/packages/create-configs/README.md) for usage information.

To add your own rules on top, see [docs/customizing-eslint.md](/docs/customizing-eslint.md).

Upgrading from v2? See [docs/migrating-v2-to-v3.md](/docs/migrating-v2-to-v3.md).

## Contributing

See [`CONTRIBUTING.md`](./CONTRIBUTING.md)
2 changes: 0 additions & 2 deletions code-style.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,11 @@
},
],
"material-icon-theme.files.associations": {
"eslint-config*/*.yaml": "eslint",
"styleint-config/*.yaml": "stylelint",
"typescript-configs/**/*.json": "tsconfig",
"javascript-configs/**/*.json": "jsconfig",
},
"yaml.schemas": {
"https://json.schemastore.org/eslintrc": ["eslint-config*/**/*.yaml"],
"https://json.schemastore.org/stylelintrc.json": [
"stylelint-config/*.yaml",
],
Expand Down
37 changes: 37 additions & 0 deletions docs/customizing-eslint.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Customizing the ESLint configs

Add your own changes after the `@code-style` configs in your `eslint.config.mjs`. Later configs win.

```js
import { defineConfig, globalIgnores } from 'eslint/config';

import { config as base } from '@code-style/eslint-config';
import { config as node } from '@code-style/eslint-config-node';
import {
config as typescript,
files as typescript_files,
} from '@code-style/eslint-config-typescript';

export default defineConfig(
globalIgnores(['generated/']),
base,
node,
typescript,
{
rules: {
'max-lines': ['error', { max: 500 }],
},
},
{
files: typescript_files,
rules: {
'@typescript-eslint/no-explicit-any': 'warn',
},
},
);
```

- **Scope changes to `@typescript-eslint/*` and `jest/*` rules with the config's `files`.** `@code-style/eslint-config-typescript` and `@code-style/eslint-config-jest` only load their plugins for the files they lint, so changing one of their rules for every file fails with `Could not find plugin`. Both packages export their `files`. Turning a rule `'off'` works without them.
- **Setting only a severity keeps the rule's options, but setting options replaces all of them.** `'max-lines': 'warn'` keeps `max: 2000`, while `['error', { max: 500 }]` also drops `skipBlankLines` and `skipComments`, so restate any options you want to keep.
- **Order matters.** Put each `/lenient` config right after the config it relaxes, and `@code-style/eslint-config-esmodule` after `@code-style/eslint-config-node`. [create-configs](../packages/create-configs/README.md) writes them in the right order.
- **To find where a rule's setting comes from**, run `npx eslint --inspect-config`. Each config is named after its package (eg: `@code-style/eslint-config/rule-sets/footguns`).
32 changes: 32 additions & 0 deletions docs/migrating-v2-to-v3.md

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should add a migration script to automate this

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. create-configs already does most of it: re-running it with overwrite writes eslint.config.mjs and removes the old .eslintrc* and .eslintignore. The gap is rules you've added to your own .eslintrc.yaml, which it drops. I'd rather teach create-configs to carry those over than add a separate script, but I'll do that in a follow-up so this PR stays focused. I've also cut this doc down to just the steps (8bbfb05).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update: done in create-configs instead of a separate script. When overwrite replaces an old .eslintrc, it now carries over the project's rules, ignore patterns, overrides' rules, and .eslintignore into eslint.config.mjs, and warns about anything it can't migrate (eg: env) (d1a1df0).

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Migrating from v2 to v3

v3 replaces the `.eslintrc` configs with [flat configs](https://eslint.org/docs/latest/use/configure/configuration-files) for **ESLint 10**, which requires Node `^20.19.0 || ^22.13.0 || >=24`.

The easiest way to migrate is to re-run [create-configs](../packages/create-configs/README.md) with `overwrite` enabled. It replaces your `.eslintrc` & `.eslintignore` with an `eslint.config.mjs`, carrying over your rules, ignore patterns, and overrides' rules. It warns about any other settings (eg: `env`), which you'll need to add yourself.

To migrate by hand:

1. Replace your `.eslintrc.yaml` with an `eslint.config.mjs` that layers the same configs in the same order.

```js
import { defineConfig } from 'eslint/config';

import { config as base } from '@code-style/eslint-config';
import { config as node } from '@code-style/eslint-config-node';
import { config as node_lenient } from '@code-style/eslint-config-node/lenient';

export default defineConfig(base, node, node_lenient);
```

1. Move any `.eslintignore` patterns into `globalIgnores([...])` from `eslint/config`.
1. Install `eslint` as a dev dependency, and remove `@rushstack/eslint-patch`, `@types/eslint`, `eslint-plugin-import`, `@typescript-eslint/eslint-plugin`, and `@typescript-eslint/parser`.
1. Remove `--ext` from your `eslint` scripts.

`eslint-plugin-react` and `eslint-plugin-jsx-a11y` don't yet declare ESLint 10 support, so if you use `@code-style/eslint-config-react`, add the following to your `package.json`:

```json
"overrides": {
"eslint-plugin-react": { "eslint": "$eslint" },
"eslint-plugin-jsx-a11y": { "eslint": "$eslint" }
}
```
15 changes: 0 additions & 15 deletions docs/upgrading-to-eslint-flat-config.md

This file was deleted.

29 changes: 29 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { defineConfig, globalIgnores } from 'eslint/config';

import { config as base } from '@code-style/eslint-config';
import { config as node } from '@code-style/eslint-config-node';
import { config as cli } from '@code-style/eslint-config-cli';
import { config as jest } from '@code-style/eslint-config-jest';
import { config as typescript } from '@code-style/eslint-config-typescript';
import { config as esmodule } from '@code-style/eslint-config-esmodule';

export default defineConfig(
globalIgnores([
'.prettierrc.mjs',
'**/test/*/**',
// these packages lint themselves with their own eslint.config.mjs
'packages/code-style/',
'packages/create-configs/',
'packages/eslint-config/',
'packages/eslint-config-typescript/',
'packages/eslint-plugin-nest/',
'packages/jest-configs/',
'utils/',
]),
base,
node,
cli,
jest,
typescript,
esmodule,
);
Loading
Loading