Skip to content

Script creates wrongly named file on Windows #144

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

Closed
Ionaru opened this issue Aug 15, 2019 · 4 comments · Fixed by #209
Closed

Script creates wrongly named file on Windows #144

Ionaru opened this issue Aug 15, 2019 · 4 comments · Fixed by #209
Labels
good first issue Good for newcomers; welcome aboard! status: accepting prs Please, send in a PR to resolve this! ✨ type: enhancement New feature or request

Comments

@Ionaru
Copy link

Ionaru commented Aug 15, 2019

🐛 Bug Report

  • tslint-to-eslint-config version: 0.2.4
  • ESLint version: -
  • Node version: 12.3.1
  • Windows 10, ran command in powershell.

Actual Behavior

Running the command in a tslint project creates a eslintrc.js file.

Expected Behavior

Running the command in a tslint project creates a .eslintrc.js file. (Note the .)

Reproduction

  1. Checkout https://github.com/Ionaru/steve
  2. Run npx tslint-to-eslint-config
@Ionaru Ionaru changed the title Scripts create wrongly names file on Windows Script creates wrongly names file on Windows Aug 15, 2019
@Ionaru Ionaru changed the title Script creates wrongly names file on Windows Script creates wrongly named file on Windows Aug 15, 2019
@JoshuaKGoldberg
Copy link
Member

JoshuaKGoldberg commented Aug 15, 2019

Hi @Ionaru, thanks for the report! This package was mostly developed on Windows, so it's amusing that it might be incorrect by default.

ESLint's --init creates an eslintrc.js file (no .) by default. Seems reasonable to change this package to match their preference.

Errata: .eslintrc.js should still be valid according to https://eslint.org/docs/user-guide/configuring. Agreed it's more annoying to deal with.

Edit: Original version of this comment is wrong, see below for corrections.

@JoshuaKGoldberg JoshuaKGoldberg added good first issue Good for newcomers; welcome aboard! status: accepting prs Please, send in a PR to resolve this! ✨ type: enhancement New feature or request labels Aug 15, 2019
@Ionaru
Copy link
Author

Ionaru commented Aug 15, 2019

@JoshuaKGoldberg I'm not sure we understand each other correctly.

I just tested npx eslint --init and it generated a .eslintrc.js (with .) for me.

image

This is what I'd expect because the eslint docs also speak of .eslintrc.* files.

So I think this package needs to be changed so it also generates a .eslintrc.js (with .) file.

@JoshuaKGoldberg
Copy link
Member

Ah sorry, gotcha! Yes, let's match the behavior of eslint --init.

Errata: looks like https://eslint.org/docs/user-guide/getting-started#configuration is actually out of date?

@akx
Copy link
Contributor

akx commented Aug 29, 2019

This also happens on macOS.

KleeUT pushed a commit to KleeUT/tslint-to-eslint-config that referenced this issue Oct 5, 2019
JoshuaKGoldberg pushed a commit that referenced this issue Oct 6, 2019
* 🐛 #144 Ssets default output file to .eslintrc.js

* 🚨 removes unused import

* 💚 adds types for eslint-plugin-tslint so end-to-end tests pass

* Reverted package* to master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers; welcome aboard! status: accepting prs Please, send in a PR to resolve this! ✨ type: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants