Skip to content

Instantly share code, notes, and snippets.

@akhrabrov
Last active April 19, 2019 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akhrabrov/80cb7a5bc8baf41e2b5a484dbfcd60e7 to your computer and use it in GitHub Desktop.
Save akhrabrov/80cb7a5bc8baf41e2b5a484dbfcd60e7 to your computer and use it in GitHub Desktop.
eslint core rules

Main rules

  • extends "eslint:recommended"

  • quotes: double - quotes: ["error", "double"]

  • semicolons - required - semi: ["error", "always"]

  • 2 spaces, CRLF - "indent": ["error", 2]

  • use strict required - strict: ["error", "global"]

  • https://eslint.org/docs/rules/max-len.html - ["error", { "code": 120 }, { "ignoreTemplateLiterals": true }]

Strings

Variables

Functions

Arrows

NONONO

Objects & arrays

Conditions

Spacing

Discuss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment