eslint-config-ruppy-nodedeprecated

Ruppy's eslint configs for NodeJS projects 🐥

Usage no npm install needed!

<script type="module">
  import eslintConfigRuppyNode from 'https://cdn.skypack.dev/eslint-config-ruppy-node';
</script>

README

eslint-config-ruppy-node 🐥

Discord GitHub Workflow Status NPM Package

Ruppy's eslint configs for NodeJS projects

Description

This eslint configurations is mostly follow and heavily inspired by Airbnb JavaScript Style Guide. Ruppy use prettier styles for formatting the codes. With that it mind, this configs extends prettier for linting javascript code styles with prettier. This eslint configurations has two exported configs.

ruppy-node

This is the default configs. This configs is suitable for linting nodeJS project. It support for linting ES2015/ES6 - ESNext javascript syntax with ESModules (import/export syntax) with assumption you have polyfill for ESNext syntax.

ruppy-node/common

This configs is suitable for linting nodeJS project. It support for linting ES2015+/ES6+ javascript syntax without ESModules (require() syntax) with assumption you use minimum node version to node LTS (12.18.3 LTS).

Usage

  • The easiest way to add this configs into project is running this commands in your root project:

    npx eslint-ruppy -i
    

OR follow along these steps below:

  • Install this configs and its peer dependencies.

    yarn add -D eslint-config-ruppy-node eslint prettier
    

    or

    npm install -D eslint-config-ruppy-node eslint prettier
    
  • Create .eslintrc.js file in the root project and extends this configs. Also set the environment your project would live on.

    require("eslint-config-ruppy-node/patch");
    
    module.exports = {
      extends: ["ruppy-node"], // or 'ruppy-node/common'
      env: {},
    };
    

    An environment defines global variables that are predefined. See eslint configurations guide for available environments.

  • Optionally create prettier configuration file for the code styles, .prettierrc:

    {
      "overrides": [
        {
          "files": "*.{js,jsx,ts,tsx}",
          "options": {
            "singleQuote": true
          }
        }
      ]
    }
    

    See all available prettier options and how to write configuration files to see more info on that.

Hacking to the Gate~! 🎶