Skip to content

Commit

Permalink
feat(eslint-config-fluid): Add strict-biome config for use in conjunc…
Browse files Browse the repository at this point in the history
…tion with Biome linter (microsoft#22960)

Adds a strict config to the shared eslint package that can be used in
projects to use Biome for linting in conjunction with eslint. This
config is the same as the strict config, but disables rules that have a
Biome equivalent.

To make it easier to see the differences, I also updated the strict
config - this __will not__ be merged.
  • Loading branch information
tylerbutler authored Nov 22, 2024
1 parent d34877e commit 4e4b3e7
Show file tree
Hide file tree
Showing 6 changed files with 2,131 additions and 12 deletions.
10 changes: 9 additions & 1 deletion common/build/eslint-config-fluid/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# @fluidframework/eslint-config-fluid Changelog

## [5.5.2](https://github.com/microsoft/FluidFramework/releases/tag/eslint-config-fluid_v5.5.2)
## [5.6.0](https://github.com/microsoft/FluidFramework/releases/tag/eslint-config-fluid_v5.6.0)

### New config for use with Biome linter

A new strict-biome config is available that disables all rules that Biome's recommended config includes.
This config is intended to be used in projects that use both eslint and Biome for linting.
This config is considered experimental.

### Auto-fix behavior change for @typescript-eslint/consistent-type-exports

Update auto-fix policy for `@typescript-eslint/consistent-type-exports` to prefer inline `type` annotations, rather than splitting exports into type-only and non-type-only groups.
This makes it easier to tell at a glance how the auto-fix changes affect individual exports when a list of exports is large.
Expand Down
7 changes: 7 additions & 0 deletions common/build/eslint-config-fluid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ In particular, use of this config is encouraged for libraries with public facing

Imported via `@fluidframework/eslint-config-fluid/strict`.

### Strict-Biome

A version of the "strict" config that disables rules that are supported by Biome's "recommended" lint config.
This config is intended to be used in projects that use both eslint and Biome for linting.
This config is considered experimental.

## Changing the lint config

If you want to change the shared lint config (that is, this package), you need to do the following:
Expand Down Expand Up @@ -64,6 +70,7 @@ a diff to review as part of a PR -- just like we do with API reports for code ch
| `print-config:react` | `eslint --config ./index.js --print-config ./src/file.tsx > ./printed-configs/react.json` |
| `print-config:recommended` | `eslint --config ./recommended.js --print-config ./src/file.ts > ./printed-configs/recommended.json` |
| `print-config:strict` | `eslint --config ./strict.js --print-config ./src/file.ts > ./printed-configs/strict.json` |
| `print-config:strict-biome` | `eslint --config ./strict-biome.js --print-config ./src/file.ts > ./printed-configs/strict-biome.json` |
| `print-config:test` | Print the eslint config for test files (`eslint --config index.js --print-config src/test/file.ts`). |
| `test` | `echo TODO: add tests in @fluidframework/eslint-config-fluid` |

Expand Down
6 changes: 4 additions & 2 deletions common/build/eslint-config-fluid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fluidframework/eslint-config-fluid",
"version": "5.5.2",
"version": "5.6.0",
"description": "Shareable ESLint config for the Fluid Framework",
"homepage": "https://fluidframework.com",
"repository": {
Expand All @@ -24,17 +24,19 @@
"print-config:react": "eslint --config ./index.js --print-config ./src/file.tsx > ./printed-configs/react.json",
"print-config:recommended": "eslint --config ./recommended.js --print-config ./src/file.ts > ./printed-configs/recommended.json",
"print-config:strict": "eslint --config ./strict.js --print-config ./src/file.ts > ./printed-configs/strict.json",
"print-config:strict-biome": "eslint --config ./strict-biome.js --print-config ./src/file.ts > ./printed-configs/strict-biome.json",
"print-config:test": "eslint --config ./index.js --print-config ./src/test/file.ts > ./printed-configs/test.json",
"test": "echo TODO: add tests"
},
"dependencies": {
"@fluid-internal/eslint-plugin-fluid": "^0.1.2",
"@fluid-internal/eslint-plugin-fluid": "^0.1.3",
"@microsoft/tsdoc": "^0.14.2",
"@rushstack/eslint-patch": "~1.4.0",
"@rushstack/eslint-plugin": "~0.13.1",
"@rushstack/eslint-plugin-security": "~0.7.1",
"@typescript-eslint/eslint-plugin": "~6.7.5",
"@typescript-eslint/parser": "~6.7.5",
"eslint-config-biome": "~1.9.3",
"eslint-config-prettier": "~9.0.0",
"eslint-import-resolver-typescript": "~3.6.3",
"eslint-plugin-eslint-comments": "~3.2.0",
Expand Down
24 changes: 15 additions & 9 deletions common/build/eslint-config-fluid/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4e4b3e7

Please sign in to comment.