Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: eslint/rewrite
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a957ee351c27ac1bf22966768cf8aac8c12ce0d2
Choose a base ref
...
head repository: eslint/rewrite
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dd8d161c635450f3e37109f833737bf69f54db55
Choose a head ref
  • 7 commits
  • 45 files changed
  • 5 contributors

Commits on Nov 22, 2024

  1. chore: fully type check packages/*/src files (#117)

    Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
    JoshuaKGoldberg and nzakas authored Nov 22, 2024
    Copy the full SHA
    8852527 View commit details

Commits on Nov 27, 2024

  1. fix: Update RuleVisitor type (#135)

    Co-authored-by: Francesco Trotta <github@fasttime.org>
    nzakas and fasttime authored Nov 27, 2024
    Copy the full SHA
    156d601 View commit details

Commits on Dec 1, 2024

  1. docs: Update README sponsors

    GitHub Actions Bot committed Dec 1, 2024
    Copy the full SHA
    5a18ce6 View commit details

Commits on Dec 3, 2024

  1. docs: Update README sponsors

    GitHub Actions Bot committed Dec 3, 2024
    Copy the full SHA
    b280b8b View commit details

Commits on Dec 4, 2024

  1. docs: Update README sponsors

    GitHub Actions Bot committed Dec 4, 2024
    Copy the full SHA
    44d812d View commit details
  2. chore: add type tests for core package (#137)

    fasttime authored Dec 4, 2024
    Copy the full SHA
    f7cb7e2 View commit details
  3. chore: release main (#136)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Dec 4, 2024
    Copy the full SHA
    dd8d161 View commit details
Showing with 516 additions and 160 deletions.
  1. +1 −1 .github/PULL_REQUEST_TEMPLATE.md
  2. +18 −0 .github/workflows/ci.yml
  3. +6 −6 .release-please-manifest.json
  4. +40 −0 CONTRIBUTING.md
  5. +6 −6 README.md
  6. +1 −1 decisions/001-rewrite-core.md
  7. +5 −5 decisions/004-types.md
  8. +4 −2 package.json
  9. +14 −0 packages/compat/CHANGELOG.md
  10. +5 −5 packages/compat/README.md
  11. +1 −1 packages/compat/jsr.json
  12. +2 −2 packages/compat/package.json
  13. +2 −8 packages/compat/tsconfig.json
  14. +14 −0 packages/config-array/CHANGELOG.md
  15. +18 −18 packages/config-array/README.md
  16. +1 −1 packages/config-array/jsr.json
  17. +2 −2 packages/config-array/package.json
  18. +2 −8 packages/config-array/tsconfig.json
  19. +7 −0 packages/core/CHANGELOG.md
  20. +1 −1 packages/core/README.md
  21. +1 −1 packages/core/jsr.json
  22. +6 −2 packages/core/package.json
  23. +5 −8 packages/core/src/types.ts
  24. +9 −0 packages/core/tests/types/tsconfig.json
  25. +241 −0 packages/core/tests/types/types.test.ts
  26. +2 −8 packages/core/tsconfig.json
  27. +14 −0 packages/migrate-config/CHANGELOG.md
  28. +4 −4 packages/migrate-config/README.md
  29. +2 −2 packages/migrate-config/package.json
  30. +2 −8 packages/migrate-config/tsconfig.json
  31. +7 −0 packages/object-schema/CHANGELOG.md
  32. +11 −11 packages/object-schema/README.md
  33. +1 −1 packages/object-schema/jsr.json
  34. +1 −1 packages/object-schema/package.json
  35. +2 −8 packages/object-schema/tsconfig.json
  36. +14 −0 packages/plugin-kit/CHANGELOG.md
  37. +15 −15 packages/plugin-kit/README.md
  38. +1 −1 packages/plugin-kit/jsr.json
  39. +3 −2 packages/plugin-kit/package.json
  40. +0 −8 packages/plugin-kit/src/@types/levn.d.ts
  41. +2 −2 packages/plugin-kit/src/config-comment-parser.js
  42. +2 −9 packages/plugin-kit/tsconfig.json
  43. +2 −2 scripts/build.js
  44. +11 −0 tsconfig.base.json
  45. +8 −0 tsconfig.json
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@

#### Prerequisites checklist

- [ ] I have read the [contributing guidelines](https://github.com/eslint/eslint/blob/HEAD/CONTRIBUTING.md).
- [ ] I have read the [contributing guidelines](https://github.com/eslint/eslint/blob/HEAD/CONTRIBUTING.md).

<!--
Please ensure your pull request is ready:
18 changes: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -54,6 +54,24 @@ jobs:
env:
CI: true

test_types:
name: Test Types (core)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"

- name: npm install and test types
working-directory: packages/core
run: |
npm install
npm run build
npm run test:types
jsr_test:
name: Verify JSR Publish
runs-on: ubuntu-latest
12 changes: 6 additions & 6 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"packages/compat": "1.2.3",
"packages/config-array": "0.19.0",
"packages/core": "0.9.0",
"packages/migrate-config": "1.3.4",
"packages/object-schema": "2.1.4",
"packages/plugin-kit": "0.2.3"
"packages/compat": "1.2.4",
"packages/config-array": "0.19.1",
"packages/core": "0.9.1",
"packages/migrate-config": "1.3.5",
"packages/object-schema": "2.1.5",
"packages/plugin-kit": "0.2.4"
}
40 changes: 40 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Contributing

Please be sure to read the contribution guidelines before making or requesting a change.

## Code of Conduct

This project adheres to the [OpenJS Foundation Code of Conduct](https://eslint.org/conduct). We kindly request that you read over our code of conduct before contributing.

## Commands

### Building

[Rollup](https://rollupjs.org) and [TypeScript](https://www.typescriptlang.org) are used to turn source files in `packages/*/src/` into outputs in `packages/*/dist/`.

```shell
npm run build
```

### Linting

ESLint is linted using ESLint.
[Building](#building) the project must be done before it can lint itself.

```shell
npm run lint
```

### Type Checking

This project is written in JavaScript and uses [TypeScript](https://www.typescriptlang.org) to validate types declared in JSDoc comments.

```shell
npm run test:types
```

Add `--watch` to run in a "watch" mode:

```shell
npm run test:types -- --watch
```
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -6,11 +6,11 @@ Monorepo for the rewrite of ESLint.

This repository is the home of the following packages:

- [`@eslint/core`](packages/core)
- [`@eslint/compat`](packages/compat)
- [`@eslint/config-array`](packages/config-array)
- [`@eslint/object-schema`](packages/object-schema)
- [`@eslint/migrate-config`](packages/migrate-config)
- [`@eslint/core`](packages/core)
- [`@eslint/compat`](packages/compat)
- [`@eslint/config-array`](packages/config-array)
- [`@eslint/object-schema`](packages/object-schema)
- [`@eslint/migrate-config`](packages/migrate-config)

<!-- NOTE: This section is autogenerated. Do not manually edit.-->
<!--sponsorsstart-->
@@ -24,7 +24,7 @@ to get your logo on our READMEs and [website](https://eslint.org/sponsors).
<p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="128"></a></p><h3>Gold Sponsors</h3>
<p><a href="https://trunk.io/"><img src="https://images.opencollective.com/trunkio/fb92d60/avatar.png" alt="trunk.io" height="96"></a></p><h3>Silver Sponsors</h3>
<p><a href="https://www.serptriumph.com/"><img src="https://images.opencollective.com/serp-triumph5/fea3074/logo.png" alt="SERP Triumph" height="64"></a> <a href="https://www.jetbrains.com/"><img src="https://images.opencollective.com/jetbrains/fe76f99/logo.png" alt="JetBrains" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301?v=4" alt="American Express" height="64"></a> <a href="https://www.workleap.com"><img src="https://avatars.githubusercontent.com/u/53535748?u=d1e55d7661d724bf2281c1bfd33cb8f99fe2465f&v=4" alt="Workleap" height="64"></a></p><h3>Bronze Sponsors</h3>
<p><a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://syntax.fm"><img src="https://github.com/syntaxfm.png" alt="Syntax" height="32"></a> <a href="https://www.wordhint.net/"><img src="https://images.opencollective.com/wordhint/be86813/avatar.png" alt="WordHint" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340?v=4" alt="GitBook" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104?v=4" alt="Nx" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774?v=4" alt="HeroCoders" height="32"></a></p>
<p><a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://www.wordhint.net/"><img src="https://images.opencollective.com/wordhint/be86813/avatar.png" alt="WordHint" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340?v=4" alt="GitBook" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104?v=4" alt="Nx" height="32"></a> <a href="https://opensource.mercedes-benz.com/"><img src="https://avatars.githubusercontent.com/u/34240465?v=4" alt="Mercedes-Benz Group" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774?v=4" alt="HeroCoders" height="32"></a></p>
<h3>Technology Sponsors</h3>
Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.
<p><a href="https://netlify.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/netlify-icon.svg" alt="Netlify" height="32"></a> <a href="https://algolia.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/algolia-icon.svg" alt="Algolia" height="32"></a> <a href="https://1password.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/1password-icon.svg" alt="1Password" height="32"></a></p>
2 changes: 1 addition & 1 deletion decisions/001-rewrite-core.md
Original file line number Diff line number Diff line change
@@ -25,4 +25,4 @@ When the new core is ready, we will need to be careful about the migration plan

## See Also

- <https://github.com/eslint/eslint/discussions/16557>
- <https://github.com/eslint/eslint/discussions/16557>
10 changes: 5 additions & 5 deletions decisions/004-types.md
Original file line number Diff line number Diff line change
@@ -26,13 +26,13 @@ We do not intend to take over full maintenance of `@types/eslint`. Instead, we w

For the ESLint team, this decision will:

- Ensure we have control over our type definitions.
- Allow us to design a more coherent and well-integrated type system in the new `@eslint/core`.
- Provide a clear path for integrating these types with `@types/eslint`, improving consistency across the ecosystem.
- Ensure we have control over our type definitions.
- Allow us to design a more coherent and well-integrated type system in the new `@eslint/core`.
- Provide a clear path for integrating these types with `@types/eslint`, improving consistency across the ecosystem.

For the community, this decision may:

- Require adjustments to adapt to the new type definitions in `@eslint/core`.
- Improve the accuracy and reliability of type definitions used in ESLint-related projects.
- Require adjustments to adapt to the new type definitions in `@eslint/core`.
- Improve the accuracy and reliability of type definitions used in ESLint-related projects.

We recognize that this may frustrate or anger some contributors, but we believe that this approach balances the need for accurate type definitions with the practicalities of maintaining a complex project like ESLint.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,8 @@
"lint:fix": "eslint --fix .",
"fmt": "prettier --write .",
"fmt:check": "prettier --check .",
"test:jsr": "npm run test:jsr --workspaces --if-present"
"test:jsr": "npm run test:jsr --workspaces --if-present",
"test:types": "tsc"
},
"workspaces": [
"packages/*"
@@ -27,11 +28,12 @@
"!(*.{js,ts})": "prettier --write --ignore-unknown"
},
"devDependencies": {
"@types/mocha": "^10.0.7",
"eslint": "^9.11.1",
"eslint-config-eslint": "^11.0.0",
"got": "^14.4.1",
"lint-staged": "^15.2.0",
"prettier": "^3.1.1",
"prettier": "^3.4.1",
"typescript": "^5.5.3",
"typescript-eslint": "^8.0.0",
"yorkie": "^2.0.0"
14 changes: 14 additions & 0 deletions packages/compat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## [1.2.4](https://github.com/eslint/rewrite/compare/compat-v1.2.3...compat-v1.2.4) (2024-12-04)


### Bug Fixes

* Update RuleVisitor type ([#135](https://github.com/eslint/rewrite/issues/135)) ([156d601](https://github.com/eslint/rewrite/commit/156d601181deb362a2864c4d47d4e3da8609500b))


### Dependencies

* The following workspace dependencies were updated
* devDependencies
* @eslint/core bumped from ^0.9.0 to ^0.9.1

## [1.2.3](https://github.com/eslint/rewrite/compare/compat-v1.2.2...compat-v1.2.3) (2024-11-14)


10 changes: 5 additions & 5 deletions packages/compat/README.md
Original file line number Diff line number Diff line change
@@ -30,10 +30,10 @@ deno add @eslint/compat

This package exports the following functions in both ESM and CommonJS format:

- `fixupRule(rule)` - wraps the given rule in a compatibility layer and returns the result
- `fixupPluginRules(plugin)` - wraps each rule in the given plugin using `fixupRule()` and returns a new object that represents the plugin with the fixed-up rules
- `fixupConfigRules(configs)` - wraps all plugins found in an array of config objects using `fixupPluginRules()`
- `includeIgnoreFile(path)` - reads an ignore file (like `.gitignore`) and converts the patterns into the correct format for the config file
- `fixupRule(rule)` - wraps the given rule in a compatibility layer and returns the result
- `fixupPluginRules(plugin)` - wraps each rule in the given plugin using `fixupRule()` and returns a new object that represents the plugin with the fixed-up rules
- `fixupConfigRules(configs)` - wraps all plugins found in an array of config objects using `fixupPluginRules()`
- `includeIgnoreFile(path)` - reads an ignore file (like `.gitignore`) and converts the patterns into the correct format for the config file

### Fixing Rules

@@ -199,7 +199,7 @@ to get your logo on our READMEs and [website](https://eslint.org/sponsors).
<p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="128"></a></p><h3>Gold Sponsors</h3>
<p><a href="https://trunk.io/"><img src="https://images.opencollective.com/trunkio/fb92d60/avatar.png" alt="trunk.io" height="96"></a></p><h3>Silver Sponsors</h3>
<p><a href="https://www.serptriumph.com/"><img src="https://images.opencollective.com/serp-triumph5/fea3074/logo.png" alt="SERP Triumph" height="64"></a> <a href="https://www.jetbrains.com/"><img src="https://images.opencollective.com/jetbrains/fe76f99/logo.png" alt="JetBrains" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301?v=4" alt="American Express" height="64"></a> <a href="https://www.workleap.com"><img src="https://avatars.githubusercontent.com/u/53535748?u=d1e55d7661d724bf2281c1bfd33cb8f99fe2465f&v=4" alt="Workleap" height="64"></a></p><h3>Bronze Sponsors</h3>
<p><a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://syntax.fm"><img src="https://github.com/syntaxfm.png" alt="Syntax" height="32"></a> <a href="https://www.wordhint.net/"><img src="https://images.opencollective.com/wordhint/be86813/avatar.png" alt="WordHint" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340?v=4" alt="GitBook" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104?v=4" alt="Nx" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774?v=4" alt="HeroCoders" height="32"></a></p>
<p><a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://www.wordhint.net/"><img src="https://images.opencollective.com/wordhint/be86813/avatar.png" alt="WordHint" height="32"></a> <a href="https://www.crosswordsolver.org/anagram-solver/"><img src="https://images.opencollective.com/anagram-solver/2666271/logo.png" alt="Anagram Solver" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340?v=4" alt="GitBook" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104?v=4" alt="Nx" height="32"></a> <a href="https://opensource.mercedes-benz.com/"><img src="https://avatars.githubusercontent.com/u/34240465?v=4" alt="Mercedes-Benz Group" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774?v=4" alt="HeroCoders" height="32"></a></p>
<h3>Technology Sponsors</h3>
Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.
<p><a href="https://netlify.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/netlify-icon.svg" alt="Netlify" height="32"></a> <a href="https://algolia.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/algolia-icon.svg" alt="Algolia" height="32"></a> <a href="https://1password.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/1password-icon.svg" alt="1Password" height="32"></a></p>
2 changes: 1 addition & 1 deletion packages/compat/jsr.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eslint/compat",
"version": "1.2.3",
"version": "1.2.4",
"exports": "./dist/esm/index.js",
"publish": {
"include": [
4 changes: 2 additions & 2 deletions packages/compat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eslint/compat",
"version": "1.2.3",
"version": "1.2.4",
"description": "Compatibility utilities for ESLint",
"type": "module",
"main": "dist/esm/index.js",
@@ -48,7 +48,7 @@
},
"homepage": "https://github.com/eslint/rewrite#readme",
"devDependencies": {
"@eslint/core": "^0.9.0",
"@eslint/core": "^0.9.1",
"c8": "^9.1.0",
"eslint": "^9.11.0",
"mocha": "^10.4.0",
10 changes: 2 additions & 8 deletions packages/compat/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"files": ["src/index.js"],
"compilerOptions": {
"declaration": true,
"emitDeclarationOnly": true,
"allowJs": true,
"checkJs": true,
"outDir": "dist/esm",
"target": "ES2022",
"moduleResolution": "NodeNext",
"module": "NodeNext"
"outDir": "dist/esm"
}
}
14 changes: 14 additions & 0 deletions packages/config-array/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## [0.19.1](https://github.com/eslint/rewrite/compare/config-array-v0.19.0...config-array-v0.19.1) (2024-12-04)


### Bug Fixes

* Update RuleVisitor type ([#135](https://github.com/eslint/rewrite/issues/135)) ([156d601](https://github.com/eslint/rewrite/commit/156d601181deb362a2864c4d47d4e3da8609500b))


### Dependencies

* The following workspace dependencies were updated
* dependencies
* @eslint/object-schema bumped from ^2.1.4 to ^2.1.5

## [0.19.0](https://github.com/eslint/rewrite/compare/config-array-v0.18.0...config-array-v0.19.0) (2024-10-25)


Loading