Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OleksiyRudenko/6ec796c876f5e331a55b8f6ae2717180 to your computer and use it in GitHub Desktop.
Save OleksiyRudenko/6ec796c876f5e331a55b8f6ae2717180 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