eslint-config-landr

1.5.0 • Public • Published

eslint-config-landr

This package exposes the ESLint configuration used for LANDR projects.

  • Uses a typescript parser that allows for the linting of both JS and TS files (therefore typescript is a installed as a peer dependency for this config).
  • Uses both eslint-config-prettier and eslint-plugin-prettier to display prettier formatting issues as ESLint errors and fix them with the ESLint --fix command. Prettier rules will be taken from a .prettierrc.js file found in your root project directory or if none is found, it will use default prettier settings. The prettier configuration used at LANDR is prettier-config-landr.

Installation

Install eslint-config-landr and all of it's peer dependencies as dev dependencies of your project. This can be done with the following command:

yarn eslint eslint-config-landr --dev

Add landr as a value to the extends array of your .eslintrc.js config file.

module.exports = {
  extends: ['landr'],
};

Framework specific

To use a framework specific config, just use 'landr/${framework}' in the extends array. Every framework specific config already extends the landr config.

Available framework configs

React

yarn add -D eslint-config-landr
// .eslintrc.js
module.exports = {
  extends: ['landr/react'],
};

Test

yarn add -D eslint-config-landr
// .eslintrc.js
module.exports = {
  extends: ['landr/test'],
};

Package Sidebar

Install

npm i eslint-config-landr

Weekly Downloads

724

Version

1.5.0

License

MIT

Unpacked Size

15 kB

Total Files

9

Last publish

Collaborators

  • landr-audio