From 7a55b0c13e5530453cc1fa0c5975c9350cd1ba39 Mon Sep 17 00:00:00 2001 From: Martin Hochel Date: Wed, 16 Mar 2022 22:24:48 +0100 Subject: [PATCH] fixup! style: fix lint errors --- packages/codemods/.eslintrc.json | 2 +- packages/codemods/src/command.ts | 4 ++++ scripts/tasks/eslint.ts | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/codemods/.eslintrc.json b/packages/codemods/.eslintrc.json index 05f2e3df0405e5..3659e1a174fbb0 100644 --- a/packages/codemods/.eslintrc.json +++ b/packages/codemods/.eslintrc.json @@ -1,5 +1,5 @@ { - "extends": ["plugin:@fluentui/eslint-plugin/node"], + "extends": ["plugin:@fluentui/eslint-plugin/node", "plugin:@fluentui/eslint-plugin/react"], "root": true, "overrides": [ { diff --git a/packages/codemods/src/command.ts b/packages/codemods/src/command.ts index a93b37bc2f3b57..d8bb4c3f9ac505 100644 --- a/packages/codemods/src/command.ts +++ b/packages/codemods/src/command.ts @@ -73,8 +73,10 @@ export class CommandParser { } if (parsed.list) { const mods = getEnabledMods(console, getModsPaths); + // eslint-disable-next-line no-console console.log('Here are the enabled code mod names:\n'); mods.forEach(mod => { + // eslint-disable-next-line no-console console.log(mod.name); }); return { shouldExit: true, modsFilter: () => true }; @@ -86,6 +88,7 @@ export class CommandParser { if (configResult.ok) { configObj = configResult.value; } else { + // eslint-disable-next-line no-console console.log(configResult.value); return { shouldExit: true, modsFilter: () => true }; } @@ -115,6 +118,7 @@ function getModRunnerConfig(): Result { sync: true, }); let configObj: ModRunnerConfigType = { stringFilters: [], regexFilters: [], includeMods: false }; + // eslint-disable-next-line no-console console.log('Configuration detected. Attempting to run mods from config...'); if (!foundJsonFile.found || foundJsonFile.found.length !== 1) { return Err({ error: new Error('Error, could not locate correct config file.') }); diff --git a/scripts/tasks/eslint.ts b/scripts/tasks/eslint.ts index f796eb85201506..912f54975f6d33 100644 --- a/scripts/tasks/eslint.ts +++ b/scripts/tasks/eslint.ts @@ -6,7 +6,7 @@ export const eslint = eslintTask({ // TODO: also lint config files? files: [path.join(process.cwd(), constants.directory)], extensions: constants.extensions, - cache: true, // only lint files changed since last lint + // cache: true, // only lint files changed since last lint fix: process.argv.includes('--fix'), // If requested, display a table with 10 slowest rules after running. // (to display more, edit the `slice` call in the `display` function of node_modules/eslint/lib/linter/timing.js)