Skip to content

Instantly share code, notes, and snippets.

@geordyjames
Last active October 27, 2025 08:29
Show Gist options
  • Select an option

  • Save geordyjames/b071e0bb13e74dea94ec37a704d26b8b to your computer and use it in GitHub Desktop.

Select an option

Save geordyjames/b071e0bb13e74dea94ec37a704d26b8b to your computer and use it in GitHub Desktop.

Revisions

  1. geordyjames revised this gist Aug 11, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion eslint_prettier_airbnb.md
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@ Optional - Set format on save and any global prettier options
    ### 2. Install Packages

    ```
    npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
    npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-config-airbnb-base eslint-plugin-node eslint-config-node
    ```

    ### 3. Create .prettierrc for any prettier rules (semicolons, quotes, etc)
  2. geordyjames revised this gist Dec 22, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion eslint_prettier_airbnb.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # VSCode - ESLint, Prettier & Airbnb Setup
    # VSCode - ESLint, Prettier & Airbnb Setup for Node.js Projects

    ### 1. Install ESLint & Prettier extensions for VSCode

  3. geordyjames revised this gist Dec 22, 2019. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion eslint_prettier_airbnb.md
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,7 @@
    Optional - Set format on save and any global prettier options

    ### 2. Install Packages

    ```
    npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
    ```
    @@ -20,7 +21,7 @@ npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-pl
    }
    ```

    ### 4. Create .eslintrc.json file (You can generate with npx eslint --init
    ### 4. Create .eslintrc.json file (You can generate with npx eslint --init)

    ```
    {
  4. geordyjames created this gist Dec 22, 2019.
    56 changes: 56 additions & 0 deletions eslint_prettier_airbnb.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,56 @@
    # VSCode - ESLint, Prettier & Airbnb Setup

    ### 1. Install ESLint & Prettier extensions for VSCode

    Optional - Set format on save and any global prettier options

    ### 2. Install Packages
    ```
    npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
    ```

    ### 3. Create .prettierrc for any prettier rules (semicolons, quotes, etc)

    ```
    {
    "trailingComma": "es5",
    "tabWidth": 2,
    "semi": true,
    "singleQuote": true
    }
    ```

    ### 4. Create .eslintrc.json file (You can generate with npx eslint --init

    ```
    {
    "env": {
    "commonjs": true,
    "es6": true,
    "node": true
    },
    "extends": ["airbnb-base", "prettier", "plugin:node/recommended"],
    "globals": {
    "Atomics": "readonly",
    "SharedArrayBuffer": "readonly"
    },
    "parserOptions": {
    "ecmaVersion": 2018
    },
    "plugins": ["prettier"],
    "rules": {
    "prettier/prettier": "error",
    "no-unused-vars": "warn",
    "no-console": "off",
    "func-names": "off",
    "no-plusplus": "off",
    "no-process-exit": "off",
    "class-methods-use-this": "off"
    }
    }
    ```

    ### Reference
    * ESLint Rules - https://eslint.org/docs/rules/
    * Prettier Options - https://prettier.io/docs/en/options.html
    * Airbnb Style Guide - https://github.com/airbnb/javascript