Skip to content

Commit

Permalink
feat(eslint-config): Acknowledge explicit ENDO_LINT_TYPES via log output
Browse files Browse the repository at this point in the history
  • Loading branch information
gibson042 committed Feb 27, 2023
1 parent 307fdbc commit 246826f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/eslint-config/eslint-config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ const dynamicConfig = {
// * `ENDO_LINT_TYPES=SRC`: Linting of "src" directories is type-aware (default,
// increases time ~50%).
// * `ENDO_LINT_TYPES=FULL`: Linting of all files is type-aware (increases time greatly).
const lintTypes = process.env.ENDO_LINT_TYPES ?? 'SRC';
const explicitLintTypes = process.env.ENDO_LINT_TYPES;
const lintTypes = explicitLintTypes ?? 'SRC';
const validLintTypesValues = ["NONE", "SRC", "FULL"];
if (!validLintTypesValues.includes(lintTypes)) {
// Intentionally avoid a SES `assert` dependency.
Expand All @@ -23,6 +24,9 @@ if (!validLintTypesValues.includes(lintTypes)) {
`ENDO_LINT_TYPES must be one of ${expected}, not ${actual}`
);
}
if (explicitLintTypes) {
console.log(`type-aware linting: ${explicitLintTypes}`);
}
if (lintTypes !== 'NONE') {
const isFull = lintTypes === "FULL";

Expand Down

0 comments on commit 246826f

Please sign in to comment.