@fluidframework/eslint-config-fluid

5.5.1 • Public • Published

@fluidframework/eslint-config-fluid

This package contains a shared ESLint config used by all the packages in the Fluid Framework repo.

It exports the following shared ESLint configs:

Configurations

Recommended

This is the standard config for use in Fluid Framework libraries. It is also the default library export.

This configuration is recommended for all libraries in the repository, though use of the strict config is preferred whenever reasonable.

Imported via @fluidframework/eslint-config-fluid (or @fluidframework/eslint-config-fluid/recommended).

Strict

The strictest config for use in Fluid Framework libraries. Recommended for highest code quality enforcement.

In particular, use of this config is encouraged for libraries with public facing APIs, and those used as external-facing examples (e.g. those mentioned on fluidframework.com).

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

Changing the lint config

If you want to change the shared lint config (that is, this package), you need to do the following:

  1. Make the change in the config.
  2. Publish a pre-release package.
  3. Update the core packages to use the pre-release lint config.

When updating the lint config (step 1), run npm run build and commit any resulting changes.

Tracking lint config changes over time

One question that comes up often when we make changes to our lint config is, "what changed?" This applies even when we don't make any changes other than upgrading deps, because the dependency upgrade might include a new rule.

ESLint provides a way to print the config that would apply to a file (--print-config), so we use this capability to print out the applied config as a JSON file. As we make changes to the config, we can print out the config again and get a diff to review as part of a PR -- just like we do with API reports for code changes.

Scripts

Script Description
build npm run print-config
build:readme markdown-magic --files "**/*.md"
cleanup-printed-configs Clean up the printed configs. Removes the parser property and sorts the JSON.
format npm run prettier:fix
prettier prettier --check .
prettier:fix prettier --write .
print-config Print all the eslint configs.
print-config:default Print the eslint config for regular TypeScript files (eslint --config index.js --print-config src/file.ts).
print-config:minimal eslint --config ./minimal-deprecated.js --print-config ./src/file.ts > ./printed-configs/minimal.json
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: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

See GitHub for more details on the Fluid Framework and packages within.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
5.5.1112latest
5.4.0-2897082dev
3.2.0-2256171next

Version History

VersionDownloads (Last 7 Days)Published
5.5.1112
5.4.0-2897082
5.4.0721
5.3.01,626
5.2.0153
5.1.01
5.0.03
4.0.01
3.5.01
3.4.01
3.3.01
3.2.02
3.2.0-2256171
3.1.01
3.1.0-2083371
3.0.04
3.0.0-1921181
3.0.0-1915581
2.1.01
2.0.02
2.0.0-1150362
2.0.0-1149061
2.0.0-1143611
1.2.11
1.2.01
1.1.01
1.1.0-1018041
1.0.0-1017341
1.0.03
1.0.0-800321
0.28.20001
0.28.2000-656531
0.28.2000-641871
0.28.10001
0.28.1000-611891
0.27.2000-596221
0.27.2000-588621
0.27.01
0.27.0-513011
0.26.03
0.26.0-502821
0.25.03
0.25.0-477661
0.25.0-467391
0.24.01
0.24.0-405921
0.24.0-315241
0.23.01
0.23.0-167021
0.23.0-166581
0.22.11
0.22.1-134942
0.22.1-131101
0.21.01
0.21.0-91261
0.20.01
0.20.0-59591
0.20.0-58781
0.19.11
0.19.1-29851

Package Sidebar

Install

npm i @fluidframework/eslint-config-fluid

Weekly Downloads

2,684

Version

5.5.1

License

MIT

Unpacked Size

305 kB

Total Files

25

Last publish

Collaborators

  • ms-fluid-bot