Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

boilerplate

Thijs Spijker edited this page Apr 12, 2019 · 1 revision

Linters

After some research I have chosen to add Stylelint(using the standard-config with extends) and ESlint(with some basic rules) to the project.

I have chosen these because they are both quite popular so there is a lot of documentation and information online.

Rules

Eslint and Stylelint use the standard config with the following extends:

"eslintConfig": {
    "env": {
      "browser": true,
      "commonjs": true,
      "es6": true,
      "node": true
    },
    "extends": "eslint:recommended",
    "globals": {
      "Atomics": "readonly",
      "SharedArrayBuffer": "readonly"
    },
    "parserOptions": {
      "ecmaVersion": 2018
    },
    "rules": {
      "indent": [
        "error",
        "tab"
      ],
      "linebreak-style": [
        "error",
        "unix"
      ],
      "quotes": [
        "error",
        "single"
      ],
      "semi": [
        "error",
        "always"
      ]
    }
  },
  "stylelint": {
    "extends": "stylelint-config-standard",
    "rules": {
      "indentation": "tab",
      "number-leading-zero": "never",
      "no-descending-specificity": null
    }
  }