1.0.6 • Published 6 years ago

eslint-config-talktofill v1.0.6

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

eslint-config-talktofill

This is the eslint configuration that I use in my personal projects

How to install

  1. npm install eslint-config-talktofill --save-dev
  2. .eslintrc
  3. Add the next config in .eslintrc
{
  "extends": "talktofill"
}
  1. Add the project environment: envs
{
  "extends": "talktofill",
  "env": {
    "browser": true
  }
}
  1. Add your project global variables to avoid the no-undef notification: globals
{
  "extends": "talktofill",
  "env": {
    "browser": true
  },
  "globals": {
    "anySDK": "readonly"
  }
}

React

  1. npm install eslint-plugin-jsx-a11y@^6.2.1 eslint-plugin-react@^7.12.4 --save-dev
  2. Extends the React config
{
  "extends": "talktofill/react"
}

Vue

  1. npm install eslint-plugin-vue@^5.2.2 --save-dev
  2. Extends the Vue config
{
  "extends": "talktofill/vue"
}

Babel

  1. npm install babel-eslint --save-dev
  2. Add the Babel parser config
{
  "parser": "babel-eslint"
}

In Vue projects you have to set in a different way

{
  "parserOptions": {
    "parser": "babel-eslint"
  }
}

Scripts

  • npm test: Verify the rules files

Reference

  • Eslint version - ESLint v5.16.0 (2019-03-29).