14

What is the difference between nx affected:lint --fix and nx format:write?

Different articles does seem to mention that code should be formatted with nx format:write command, but it doesn't seem that it fully relies on ESLint rules.

After formatting I keep having ESLint errors.

Am I missing something?

Thanks

InsFi
  • 1,298
  • 3
  • 14
  • 29

1 Answers1

17

so nx format:write does the code formatting using the prettier config which is in the root of the project.

nx affected:lint --fix instead fixes linting problems.

Juri
  • 32,424
  • 20
  • 102
  • 136