EsLint implementation details - Nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates GitHub Wiki

EsLint

Official site: https://eslint.org/

Why?

It's simple, without this kind of styling rule, the code become chaotic quickly. It's a best practice to stick to some guidelines and it's configurable in case you want to change the rules. There's an extra npm command which is npm run lint. That command is running the linting manually and auto-fix what it can. That way, your tab/spacing are fixed automagically.

Styling

  • Standard
    • The templates are using the default settings
  • EsLint-Vue
    • The templates use a bit more than the base, so it's configured for better readability and conformity to recommended.

In case you want to edit the rules. Please, simply read the documentation of the official site. There will be no support here (this project) for those rules.

Quick Tips: .eslintrc.js is located within the root folder of the project.

Ignored styling

As you might expect, the node_modules are automatically not scanned for better styling. Also, there's a rule to avoid looking into the ClientApp/static/**/*.js. If you think you need to also scan your js file within your static folder, please remove the rule added within the .eslintignore file.

Quick Tips: .eslintignore is located within the root folder of the project.