5.4.0 • Published 3 months ago

@fluidframework/eslint-config-fluid v5.4.0

Weekly downloads
1,448
License
MIT
Repository
github
Last release
3 months ago

@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

ScriptDescription
buildnpm run print-config
build:readmemarkdown-magic --files "**/*.md"
cleanup-printed-configsClean up the printed configs. Removes the parser property and sorts the JSON.
formatnpm run prettier:fix
prettierprettier --check .
prettier:fixprettier --write .
print-configPrint all the eslint configs.
print-config:defaultPrint the eslint config for regular TypeScript files (eslint --config index.js --print-config src/file.ts).
print-config:minimaleslint --config ./minimal-deprecated.js --print-config ./src/file.ts > ./printed-configs/minimal.json
print-config:reacteslint --config ./index.js --print-config ./src/file.tsx > ./printed-configs/react.json
print-config:recommendedeslint --config ./recommended.js --print-config ./src/file.ts > ./printed-configs/recommended.json
print-config:stricteslint --config ./strict.js --print-config ./src/file.ts > ./printed-configs/strict.json
print-config:testPrint the eslint config for test files (eslint --config index.js --print-config src/test/file.ts).
testecho TODO: add tests in @fluidframework/eslint-config-fluid

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

5.4.0-289708

3 months ago

5.4.0

3 months ago

5.3.0

7 months ago

5.2.0

8 months ago

5.1.0

8 months ago

5.0.0

9 months ago

4.0.0

9 months ago

3.5.0

9 months ago

3.4.0

9 months ago

3.3.0

11 months ago

3.2.0

11 months ago

3.2.0-225617

11 months ago

3.0.0

1 year ago

3.0.0-191558

1 year ago

3.1.0-208337

1 year ago

3.0.0-192118

1 year ago

2.1.0

1 year ago

3.1.0

1 year ago

1.2.0

2 years ago

1.1.0

2 years ago

1.1.0-101804

2 years ago

1.2.1

2 years ago

2.0.0-114361

2 years ago

2.0.0

2 years ago

2.0.0-115036

2 years ago

2.0.0-114906

2 years ago

1.0.0-101734

2 years ago

1.0.0

2 years ago

1.0.0-80032

2 years ago

0.28.2000

3 years ago

0.28.2000-65653

3 years ago

0.28.2000-64187

3 years ago

0.28.1000-61189

3 years ago

0.28.1000

3 years ago

0.27.2000-59622

3 years ago

0.27.2000-58862

3 years ago

0.27.0

3 years ago

0.26.0-50282

3 years ago

0.27.0-51301

3 years ago

0.26.0

3 years ago

0.25.0

3 years ago

0.25.0-47766

3 years ago

0.25.0-46739

3 years ago

0.24.0

3 years ago

0.24.0-40592

3 years ago

0.24.0-31524

3 years ago

0.23.0

4 years ago

0.23.0-16702

4 years ago

0.23.0-16658

4 years ago

0.22.1

4 years ago

0.22.1-13494

4 years ago

0.22.1-13110

4 years ago

0.21.0

4 years ago

0.21.0-9126

4 years ago

0.20.0

4 years ago

0.20.0-5959

4 years ago

0.20.0-5878

4 years ago

0.19.1

4 years ago

0.19.1-2985

4 years ago