Lint Configurations

Copy-paste lint configuration setup for JavaScript and CSS.

Install dependencies:

npm install --save-dev eslint eslint-config-bespoke eslint-plugin-import
npm install --save-dev stylelint stylelint-config-bespoke
npm install --save-dev npm-run-all

.eslintrc.json

{
  "env": {
    "browser": true,
    "node": true
  },
 
  "extends": [
    "bespoke"
  ]
}

.stylelintrc.json

{
  "extends": "stylelint-config-bespoke"
}

package.json

{
  "scripts": {
    "lint:script": "eslint source",
    "lint:style": "stylelint source/**/*.css",
    "lint": "npm-run-all lint:*"
  }
}