Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added recommended --prettier flag to include eslint-config-prettier #412

Merged
merged 10 commits into from
Apr 26, 2020

Conversation

JoshuaKGoldberg
Copy link
Member

@JoshuaKGoldberg JoshuaKGoldberg commented Apr 26, 2020

PR Checklist

Overview

When --prettier is enabled, eslint-config-prettier will always be added to the list of ESLint plugins.

When --prettier isn't enabled:

  • If the output configuration already doesn't enable any formatting rules, it'll extend from eslint-config-prettier.
  • Otherwise, a CLI message will suggest running with --prettier.

Screenshot of the new red CLI output for --prettier (see below)

✨ 90 rules replaced with their ESLint equivalents. ✨

❗ 10 ESLint rules behave differently from their TSLint counterparts ❗
  Check ./tslint-to-eslint-config.log for details.

❌ 1 error thrown. ❌
  Check ./tslint-to-eslint-config.log for details.
️
❓ 1 rule is not known by tslint-to-eslint-config to have an ESLint equivalent. ❓
  The "@typescript-eslint/tslint/config" section of ./.eslintrc.js configures eslint-plugin-tslint to run it in TSLint within ESLint.
  Check ./tslint-to-eslint-config.log for details.

⚡ 7 packages are required for this ESLint configuration. ⚡
  npm install @typescript-eslint/eslint-plugin @typescript-eslint/parser @typescript-eslint/tslint-eslint-plugin eslint eslint-plugin-import eslint-plugin-jsdoc eslint-plugin-prefer-arrow --save-dev

☠ Prettier plugins are missing from your configuration. ☠
  We highly recommend running tslint-to-eslint-config --prettier to disable formatting ESLint rules.
  See https://github/typescript-eslint/tslint-to-eslint-config/docs/FAQs.md#should-i-use-prettier.
️
❓ 1 editor setting is not known by tslint-to-eslint-config to have an ESLint equivalent. ❓
  Check ./tslint-to-eslint-config.log for details.

✅ All is well! ✅

Declares typings in a .d.ts file pending DefinitelyTyped/DefinitelyTyped#44245.

@JoshuaKGoldberg JoshuaKGoldberg changed the title Made extending eslint-config-prettier built-in, with --ugly flag to opt out Added recommended --prettier flag to include eslint-config-prettier Apr 26, 2020
@@ -67,7 +67,7 @@ export const findESLintConfiguration = async (
full: {
...defaultESLintConfiguration,
...reportedConfiguration,
extends: Array.from(new Set(extensions)),
extends: extensions,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slight cleanup: uniqueFromSources already deduplicates with Array.from(new Set(.

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review April 26, 2020 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant