1.0.6 • Published 1 year ago

@jejebecarte/eslint-config v1.0.6

Weekly downloads
-
License
LGPL-3.0-or-later
Repository
github
Last release
1 year ago

Comprehensive ESLint and Prettier configuration for Javascript and Typescript projects, including React support.

Note These configurations were designed to be used together, however you may use them individually. In this case, some ESLint rules may be disabled due to eslint-config-prettier, but this behaviour can be overridden.

Installation

Install the package and its peer dependencies with your package manager of choice.

$ npm i -D @jejebecarte/eslint-config eslint prettier

or

$ yarn add -D @jejebecarte/eslint-config eslint prettier

Usage

ESLint

Create a .eslintrc.js file in the root directory of your project and add the following content:

module.exports = {
    extends: '@jejebecarte',
};

If you have other shared configurations in the extends key, put this last so eslint-config-prettier is able to override rules that conflict with Prettier.

You may also want to add script to your package.json in order to quickly fix lint errors in your code:

"scripts": {
    "lint": "eslint . --ext .js,.jsx,.ts,.tsx --fix"
}

Prettier

Create a .prettierrc.js file in the root directory of your project and add the following content:

module.exports = require('@jejebecarte/eslint-config/prettier');

Alternatively, you may use the smaller tabWidth version:

module.exports = require('@jejebecarte/eslint-config/prettier-stw');

License

This is an open-source project licensed under the LGPL-3.0-or-later license.