Skip to content

Instantly share code, notes, and snippets.

@AMashoshyna
Last active February 11, 2019 09:57
Show Gist options
  • Save AMashoshyna/43de334be9737d128d6bfcb14449db7a to your computer and use it in GitHub Desktop.
Save AMashoshyna/43de334be9737d128d6bfcb14449db7a to your computer and use it in GitHub Desktop.

Home task

In Memory Pair Game Project:

  1. Create package.json
  2. Install eslint, prettier and pluginf for code editor/IDE
  3. Read explanations to all errors forund by eslint according to eslint-config-airbnb

Installation step-by-step

  1. Create package in a directory: Option 1:
npm init

This option will start interactive wizzard. If you are ok with using default setting, use this:

npm init --yes
  1. Install the packages: eslint - the linter itself
    eslint-plugin-import - required by ESLint to install other plugins
    eslint-config-airbnb-base - ESlint config following Airbnb JavaScript style guide.
    prettier - the code formatter
    eslint-config-prettier, eslint-plugin-prettier - config and plugin to connect ESlint and Prettier and avoid conflicting rules

  2. Setup the tools: in your eslint config (may be located in package.json or in separate file .eslintrc add the integrations:

{
  "extends": ["airbnb", "prettier"],
  "plugins": ["prettier"],
  "rules": {
    "prettier/prettier": ["error"]
  },
}
  1. Add plugins for ESLint and Prettier to the code editor or IDE.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment