/eslint-config-und

Primary LanguageJavaScriptMIT LicenseMIT

In progress...

An ESLint Shareable Config

Possible Errors

Stylistic Issues

Installation

Setup dependencies

npm install eslint

or

yarn add eslint

Setup devDependencies

npm install --save-dev eslint-config-und

or

yarn add eslint-config-und --dev

Implementacion for TypeScript and Webpack

npm install eslint-config-und eslint-loader eslint-plugin-typescript typescript-eslint-parser --save-dev

or

yarn add eslint-config-und eslint-loader eslint-plugin-typescript typescript-eslint-parser --dev

Add .eslintrc file:


  {
    "parser": "typescript-eslint-parser",
    "parserOptions": {
      "sourceType": "module"
    },
    "plugins": [
        "typescript"
    ],
    "extends": "eslint-config-und"
  }

Add a object into entry module.exports from webpack.config.js

  {
    enforce: 'pre',
    test: /\.tsx?$/,
    exclude: /node_modules/,
    loader: 'eslint-loader'
  }

So you can see eslint in acction:

  • #B82F16 Red for errors
  • #C5C33 Yellow for warn messages

It's all.