FluidFramework/biome.jsonc

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

241 строка
6.3 KiB
Plaintext
Исходник Постоянная ссылка Обычный вид История

{
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"root": ".",
"useIgnoreFile": true,
"defaultBranch": "main"
},
"files": {
"ignoreUnknown": true,
"ignore": [
// Build output
"**/dist/*",
"**/lib/*",
"**/*.done.build.log",
"**/.next", // NextJS
// test collateral
"**/_package.json",
"**/fluid-runner/src/test/localOdspSnapshots/**",
"**/fluid-runner/src/test/telemetryExpectedOutputs/**",
"**/snapshots/*.json",
"**/snapshots/content",
// Generated files
"**/src/**/test/types/*.generated.ts",
"**/src/packageVersion.ts",
// Dependencies
"**/node_modules/*",
// Used by API-Extractor
"**/_api-extractor-temp/*",
"**/api-report/*",
"**/*.api.md",
// Templates
".changeset/templates/",
"*.hbs",
// Test json
"build-tools/packages/build-tools/src/test/data/biome/empty.jsonc",
"experimental/dds/tree/src/test/documents/**",
"packages/dds/map/src/test/mocha/snapshots/**/*.json",
"packages/dds/matrix/src/test/results/**/*.json",
"packages/dds/merge-tree/src/test/literature/*.txt",
"packages/dds/merge-tree/src/test/results/*.json",
"packages/dds/sequence/src/test/snapshots/**/*.json",
"packages/dds/sequence/src/test/results/**/*.json",
"packages/dds/sequence/src/test/fuzz/**/*.json",
"packages/dds/tree/src/test/snapshots/**/*.json",
"packages/dds/tree/src/test/shared-tree/fuzz/failures/**/*.json",
"packages/drivers/odsp-driver/src/test/**/*.json",
"packages/framework/attributor/src/test/attribution/documents/**/*.json",
"packages/test/snapshots/content/**",
"packages/tools/fluid-runner/src/test/localOdspSnapshots/**",
"packages/tools/fluid-runner/src/test/telemetryExpectedOutputs/**",
"tools/api-markdown-documenter/src/test/snapshots/**",
// TODO: why does examples/apps/tree-cli-app/*.json not work?
"**/data/*.json",
// Generated type-tests
"**/*.generated.ts",
// Generated bundle analysis files
"**/bundleAnalysis/**",
// Generated oclif manifest files
"**/oclif.manifest.json",
// es5 build output
"packages/framework/data-object-base/es5",
// Test coverage reports
"**/coverage/*",
"**/nyc/*",
// Git configuration file
".git-blame-ignore-revs",
// Generated by policy-check
"**/assertionShortCodesMap.ts",
// This is a test file
"tools/markdown-magic/test/include.md",
// Autogenerated file
".github/fabricbot.json",
// These are actually templates, not pure YAML files
"**/templates/*.yaml",
// These files are auto-generated according to the comments in the files
"**/charts/**/Chart.yaml",
// Reports generated by dependency-cruiser
"**/.dependency-cruiser-known-violations.json",
// Reports generated by our benchmark tests
".timeTestsOutput/**",
".memoryTestsOutput/**",
".customBenchmarksOutput/**",
// The paths below are not formatted by Biome. We ignore them explicitly so other tools that read this ignore
// list, like fluid-build, know to ignore these files as well.
"**/*.md",
"**/.gitignore",
"**/.npmignore",
"**/LICENSE",
"**/.changeset/**",
// Paths below are outside the client release group and aren't configured for biome.
"common/build/**",
"common/lib/**",
"docs/**",
"server/**",
"tools/api-markdown-documenter/**",
"tools/benchmark/**",
"tools/changelog-generator-wrapper/**",
"tools/getkeys/**",
"tools/markdown-magic/**",
"tools/pipelines/**",
"tools/telemetry-generator/**",
"tools/test-tools/**"
],
"maxSize": 2097152
},
"organizeImports": {
build(client): Add biome formatting scripts (#19380) ## Summary Adds several scripts that can be run to convert projects in the client release group to use the biome formatter. The process can be effectively reversed by running another script, so projects can switch between prettier and biome using the scripts and the build will continue to work. After enabling biome formatting, you can manually format using biome with the `format:biome`script. Once projects are completely on biome and we no longer need to port changes between prettier branches and biome branches, then we can remove prettier completely using the remove-prettier script. We should only do that once the last release branch using prettier is no longer in service. ## Scripts ### add-biome.sh This script adds biome formatting scripts to a project. It also adds a local biome config file to the project if needed. The `format:prettier` and `check:prettier` tasks are left intact, and the `format` task still calls prettier. This enables one to manually format using biome while leaving the overall build using prettier. After running this script, you can clean up the package.json files by running `pnpm policy-check:fix`. **This PR includes the changes made by running this script across the client release group.** ### enable-biome.sh This script enables biome formatting in a project. It updates the `format` and `check:format` scripts to call biome. It should only be run on projects that have already had biome added to it. ### enable-prettier.sh This script enables prettier formatting in a project. It updates the `format` and `check:format` scripts to call prettier. It's the opposite of the enable-biome.sh script. ### remove-prettier.sh Once a project is completely switched to biome and no longer needs prettier, this script will remove the prettier dependency and any related scripts and config files.
2024-06-11 21:13:59 +03:00
"enabled": false
},
"linter": {
"enabled": false,
"rules": {
"recommended": true
}
},
"formatter": {
build(client): Add biome formatting scripts (#19380) ## Summary Adds several scripts that can be run to convert projects in the client release group to use the biome formatter. The process can be effectively reversed by running another script, so projects can switch between prettier and biome using the scripts and the build will continue to work. After enabling biome formatting, you can manually format using biome with the `format:biome`script. Once projects are completely on biome and we no longer need to port changes between prettier branches and biome branches, then we can remove prettier completely using the remove-prettier script. We should only do that once the last release branch using prettier is no longer in service. ## Scripts ### add-biome.sh This script adds biome formatting scripts to a project. It also adds a local biome config file to the project if needed. The `format:prettier` and `check:prettier` tasks are left intact, and the `format` task still calls prettier. This enables one to manually format using biome while leaving the overall build using prettier. After running this script, you can clean up the package.json files by running `pnpm policy-check:fix`. **This PR includes the changes made by running this script across the client release group.** ### enable-biome.sh This script enables biome formatting in a project. It updates the `format` and `check:format` scripts to call biome. It should only be run on projects that have already had biome added to it. ### enable-prettier.sh This script enables prettier formatting in a project. It updates the `format` and `check:format` scripts to call prettier. It's the opposite of the enable-biome.sh script. ### remove-prettier.sh Once a project is completely switched to biome and no longer needs prettier, this script will remove the prettier dependency and any related scripts and config files.
2024-06-11 21:13:59 +03:00
"enabled": true,
"ignore": ["**/dist/**", "**/lib/**"],
"formatWithErrors": true,
"indentStyle": "tab",
"lineWidth": 95,
"lineEnding": "lf"
},
"javascript": {
"formatter": {
"arrowParentheses": "always",
"jsxQuoteStyle": "double",
"semicolons": "always",
"trailingCommas": "all",
"quoteProperties": "preserve",
"quoteStyle": "double",
"bracketSpacing": true
}
},
"json": {
"formatter": {
"indentStyle": "tab"
}
},
"overrides": [
{
// @fluid-experimental/tree FORMATTING
// This configuration is used to format the @fluid-experimental/tree package, which uses different settings than
// most projects. This override is needed to ensure that the formatter is applied correctly when run from the root
// of the repo.
//
// This configuration should be kept up-to-date with the settings in `experimental/dds/tree/biome.jsonc`.
"include": ["experimental/dds/tree/**"],
"formatter": {
"lineWidth": 120
},
"javascript": {
"formatter": {
"jsxQuoteStyle": "single",
"trailingCommas": "es5",
"quoteStyle": "single"
}
}
},
{
// JSONC WITHOUT TRAILING COMMAS JSONC is not a standard, and support for trailing commas is not universal. For
// simplicity and safety, we parse most JSONC files in a liberal way -- allowing comments and trailing commas, but
// format them conservatively without trailing commas.
//
// See also: https://github.com/microsoft/vscode/issues/102061
build(client): Add biome formatting scripts (#19380) ## Summary Adds several scripts that can be run to convert projects in the client release group to use the biome formatter. The process can be effectively reversed by running another script, so projects can switch between prettier and biome using the scripts and the build will continue to work. After enabling biome formatting, you can manually format using biome with the `format:biome`script. Once projects are completely on biome and we no longer need to port changes between prettier branches and biome branches, then we can remove prettier completely using the remove-prettier script. We should only do that once the last release branch using prettier is no longer in service. ## Scripts ### add-biome.sh This script adds biome formatting scripts to a project. It also adds a local biome config file to the project if needed. The `format:prettier` and `check:prettier` tasks are left intact, and the `format` task still calls prettier. This enables one to manually format using biome while leaving the overall build using prettier. After running this script, you can clean up the package.json files by running `pnpm policy-check:fix`. **This PR includes the changes made by running this script across the client release group.** ### enable-biome.sh This script enables biome formatting in a project. It updates the `format` and `check:format` scripts to call biome. It should only be run on projects that have already had biome added to it. ### enable-prettier.sh This script enables prettier formatting in a project. It updates the `format` and `check:format` scripts to call prettier. It's the opposite of the enable-biome.sh script. ### remove-prettier.sh Once a project is completely switched to biome and no longer needs prettier, this script will remove the prettier dependency and any related scripts and config files.
2024-06-11 21:13:59 +03:00
"include": [
"**/*.jsonc",
// Tools reading api-extractor config files do not consistently support trailing commas.
"**/api-extractor*.json",
// Tools reading tsdoc config files do not consistently support trailing commas.
"**/tsdoc*.json"
build(client): Add biome formatting scripts (#19380) ## Summary Adds several scripts that can be run to convert projects in the client release group to use the biome formatter. The process can be effectively reversed by running another script, so projects can switch between prettier and biome using the scripts and the build will continue to work. After enabling biome formatting, you can manually format using biome with the `format:biome`script. Once projects are completely on biome and we no longer need to port changes between prettier branches and biome branches, then we can remove prettier completely using the remove-prettier script. We should only do that once the last release branch using prettier is no longer in service. ## Scripts ### add-biome.sh This script adds biome formatting scripts to a project. It also adds a local biome config file to the project if needed. The `format:prettier` and `check:prettier` tasks are left intact, and the `format` task still calls prettier. This enables one to manually format using biome while leaving the overall build using prettier. After running this script, you can clean up the package.json files by running `pnpm policy-check:fix`. **This PR includes the changes made by running this script across the client release group.** ### enable-biome.sh This script enables biome formatting in a project. It updates the `format` and `check:format` scripts to call biome. It should only be run on projects that have already had biome added to it. ### enable-prettier.sh This script enables prettier formatting in a project. It updates the `format` and `check:format` scripts to call prettier. It's the opposite of the enable-biome.sh script. ### remove-prettier.sh Once a project is completely switched to biome and no longer needs prettier, this script will remove the prettier dependency and any related scripts and config files.
2024-06-11 21:13:59 +03:00
],
"json": {
"parser": {
"allowComments": true,
"allowTrailingCommas": true
},
"formatter": {
"trailingCommas": "none"
}
}
},
{
// JSONC WITH TRAILING COMMAS
// These JSONC files are known to support trailing commas.
"include": [
// vscode config files all support trailing commas.
"**/.vscode/*.json",
// tsconfig files support trailing commas.
"**/tsconfig*.json"
],
"json": {
"parser": {
"allowComments": true,
"allowTrailingCommas": true
},
"formatter": {
"trailingCommas": "all"
}
}
},
{
// PACKAGE.JSON
// These settings are used to format package.json files in the way npm itself does, with the exception of using
// tabs instead of spaces.
"include": ["**/package.json"],
"json": {
"formatter": {
"lineWidth": 1
}
}
}
]
}