@leather-wallet/eslint-config

0.2.0 • Public • Published

Shared eslint configuration

This package contains eslint configuration to be shared across projects.


Contents

Setup

  • Install as a dev dependency in packages / apps:

    npm i --save-dev @leather-wallet/eslint-config
  • Add eslint configuration file:

    // .eslintrc.js
    module.exports = {
      extends: ['@leather-wallet/eslint-config', 'universe/native'],
    
      // add this if you have typescript in your package / app
      parserOptions: {
        project: path.resolve(__dirname, './tsconfig.json'),
      },
    
      ...,
    };
  • Add eslint ignore patterns file:

    # .eslintignore
    
    !.*
    node_modules/
    
    .commitlintrc.js
    .prettierrc.js
    .eslintrc.js
    
    # Custom ignore patterns
    ...
  • Add eslint scripts:

    // package.json
    
    "scripts": {
      ...
      "lint": "eslint . --config .eslintrc.js",
      "lint:fix": "eslint . --config .eslintrc.js --fix"
      ...
    }

Usage

  • Manual usage from command line:

    npm run lint
    npm run lint:fix

License

MIT © Leather Wallet LLC


⬅ Back


Package Sidebar

Install

npm i @leather-wallet/eslint-config

Weekly Downloads

104

Version

0.2.0

License

MIT

Unpacked Size

7.83 kB

Total Files

5

Last publish

Collaborators

  • pete-watters
  • kyranjamie
  • leather-user