1.0.10 • Published 5 years ago

eslint-config-iamdevlinph v1.0.10

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

ESLint and Prettier Configuration

ESLint and Prettier Configuration I use on VS Code. Inspired by wesbos'

Works on:

  • React
  • styled-components in react

Installation

  1. Make sure your project already has a package.json, if not create one using npm init.

  2. Install dependencies needed by the config.

npx install-peerdeps --dev eslint-config-iamdevlinph

Note: If you're using yarn, npx will ask if you want to use it for the installation. At least on npm -v 6.4.1.

  1. Some dependencies will be added to your devDependencies.

  2. Create a .eslintrc file in the root of your project.

{
  "extends": [
    "iamdevlinph"
  ]
}

Or .eslintrc.js

module.exports = {
  "extends": [
    "iamdevlinph"
  ],
};
  1. Customize the configuration.
{
  "extends": [
    "iamdevlinph
  ],
  "rules": {
    "react/jsx-filename-extension": 0,
    "import/prefer-default-export": 0
  },
  "globals": {
    "firebase": true,
    "window": true
  },
}
  1. Add some scripts to your package.json.
"scripts": {
  "lint": "eslint .",
  "lint:fix": "eslint . --fix"
}
  1. Create a .eslintignore beside .eslintrc and ignore the usual folders
**/node_modules/*

Using with VS Code

  1. Install ESLint extension

  2. Press Ctrl + , to open your settings.json then click on the {} on the upper right corner to enter the .json format.

settings.json

And copy the settings below:

"editor.formatOnSave": true,
"eslint.autoFixOnSave": true,
"[javascript]": {
  "editor.formatOnSave": false
},
"[javascriptreact]": {
  "editor.formatOnSave": false
},
1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago