3.0.1 • Published 4 years ago

@youngcapital/eslint-config-yc-base v3.0.1

Weekly downloads
184
License
ISC
Repository
github
Last release
4 years ago

eslint-config-yc-base

eslint yc base has been created to use in any JS vanilla project with nodejs setup.

It inherits some basic packages like:

  • eslint-config-airbnb-base
  • eslint-plugin-import
  • eslint-plugin-jest
  • eslint-plugin-prettier
  • prettier

Usage

ESLint

  • Make sure you have eslint >=6.8.0 installed according to the peerDependencies of this project
  • Install the package
  • Create .eslintrc.js on the root of your project
  • Add the block of code below:
    module.exports = {
      extends: [
        '@youngcapital/eslint-config-yc-base'
      ]
    };
  • Or you could also add eslintConfig tag on your package.json as below:
    {
      "eslintConfig": {
        "extends": "@youngcapital/eslint-config-yc-base"
      }
    }

Prettier

  • make sure you have correct prettier version (check peerDependencies.prettier in package.json)
  • install the package (e.g. yarn add --dev @youngcapital/eslint-config-yc-base)
  • update your package.json to include
{
  "prettier": "@youngcapital/eslint-config-yc-base/.prettierrc.js"
}

Please follow official documentation for more details.

Migrations

to v.3

After upgrading your project to use v.3 of @youngcapital/eslint-config-yc-base you'll probably want to reformat the code in your repository.
Please follow this article to achieve it in the least painful way.