- Do you want to request a feature or report a bug?
Bug. See #356 for original discussion.
- What is the current behavior?
- If the current behavior is a bug, please provide the steps to reproduce.
Execute npm run lint on master. Lint fails.
- What is the expected behavior?
Existing code passes lint rules. Lint passes.
- Please mention your node.js, and operating system version.
Node v7.8.0. macOS Sierra.
From the discussion on #356.
biilmann commented a day ago:
I would also suggest customizing the eslint settings to make sure they match how the code of the CMS is currently formatted quite closely, so we can get all code to pass linting and then require passing linting before accepting pull requests. Then we can start gradually introducing stricter linting rules little by little, but making sure we make them all pass for each rule added.
@Benaiah also mentioned in https://github.com/netlify/netlify-cms/issues/356#issuecomment-293983203:
another option for JS (though this wouldn't address the CSS, which has the most lint-failing code) would be to incorporate https://github.com/prettier/prettier, which can deterministically format JS. This means the linter could actually fix all JS style issues in either pre-commit or on save, instead of stopping you from committing and asking you to fix up style issues first.
Prettier now supports CSS as well, so I think it is a great option, along with linters (Prettier doc on why to use both).
@tech4him1 Prettier doesn't cover everything, but it does cover the annoying little things that we often ask contributors to fix in their PR's. We'll still need ESLint to cover the real stuff, as outlined in your link.
We can start with a PR to implement Prettier and go from there.
To do list to get everything cleaned up:
I'll be taking this on as I have time, but if anyone has a specific item they would like to work on, let me know!
Most helpful comment
@Benaiah also mentioned in https://github.com/netlify/netlify-cms/issues/356#issuecomment-293983203:
Prettier now supports CSS as well, so I think it is a great option, along with linters (Prettier doc on why to use both).