You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.
When create-project runs, if the user chose a lint preset then ESLint is run with the --fix option to ensure the template project adheres to the chosen style guide out of the box. (We can't do this in the Neutrino repository since some of the style guides conflict eg regarding trailing commas or semi-colons.)
This currently works fine when using yarn (create-project runs yarn lint --fix), however fails with npm since create-project runs npm run lint --fix which passes the --fix to npm instead of ESLint.
The correct command for NPM is instead npm run lint -- --fix.
This affects both Neutrino 8 and Neutrino 9.
The text was updated successfully, but these errors were encountered:
…1266)
Previously the `--fix` option was not passed to ESLint when using npm,
since it requires that any options passed be preceded with `--`.
This caused failures during create-project when users picked a lint preset
whose style differed from the template project, since the failures would
not be fixed, and instead ESLint exit non-zero causing create-project to
abort and delete the new project.
Fixes#1261.
timkelty
pushed a commit
to timkelty/neutrino
that referenced
this issue
Dec 19, 2018
…eutrinojs#1266)
Previously the `--fix` option was not passed to ESLint when using npm,
since it requires that any options passed be preceded with `--`.
This caused failures during create-project when users picked a lint preset
whose style differed from the template project, since the failures would
not be fixed, and instead ESLint exit non-zero causing create-project to
abort and delete the new project.
Fixesneutrinojs#1261.
When
create-project
runs, if the user chose a lint preset then ESLint is run with the--fix
option to ensure the template project adheres to the chosen style guide out of the box. (We can't do this in the Neutrino repository since some of the style guides conflict eg regarding trailing commas or semi-colons.)This currently works fine when using yarn (create-project runs
yarn lint --fix
), however fails with npm sincecreate-project
runsnpm run lint --fix
which passes the--fix
to npm instead of ESLint.The correct command for NPM is instead
npm run lint -- --fix
.This affects both Neutrino 8 and Neutrino 9.
The text was updated successfully, but these errors were encountered: