0.0.6 • Published 2 years ago

@tloncorp/eslint-config v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Tlon ESLint + Prettier Configuration

Abstract

These are our shared settings for ESLint and Prettier. This ESLint configuration lints and formats our code so it follows our shared style guide. It uses ESLint to lint and fix Typescript and Javascript, and Prettier to format our code nicely.

Installation

Install the package with:

npm install @tloncorp/eslint-config --save-dev

@tloncorp/eslint-config requires you to take care of it's peerDependencies. Install the correct version of each peerDependencies package, which are listed with the following command:

npx install-peerdeps --dev @tloncorp/eslint-config

ESLint Configuration

Now add @tloncorp/eslint-config to your .eslintrc.js:

// .eslintrc.js
module.exports = {
    extends: '@tloncorp/eslint-config',

    // for typescript codebases, you'll also need to add the followings:
    overrides: [
        {
            files: ['**/*.ts', '**/*.tsx'],
            parserOptions: {
                project: './tsconfig.json', // edit this path to point to your tsconfig.json
            },
        },
    ],
}

Prettier Configuration

This is how you can use or extend the @tloncorp/eslint-config Prettier config in your app:

// .prettierrc.js
module.exports = require('@tloncorp/eslint-config/.prettierrc.js')

// or to override specific options
module.exports = {
    ...require('@tloncorp/eslint-config/.prettierrc.js'),
    semi: true,
}

Publishing

This package gets published to NPM: @tloncorp/eslint-config. You will need to be a member of @tloncorp on npm in order to publish changes. From here you can publish your changes with:

  1. Update the version number in package.json, and merge your changes into master
  2. From master, run npm publish
0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago