eslint-config-majestic

8.0.1 • Public • Published

eslint-config-majestic

npm version JavaScript Style Guide

This package provides a majestic code style as the smartest ESLint shared config.

Usage

We export one smart ESLint configuration for your usage.

eslint-config-majestic

Contains all the core ESLint rules for linting ES2015 (ES6)+ code.

It only requires eslint.

  1. npm i -D eslint-config-majestic eslint
  2. add "extends": "majestic" to your .eslintrc

Example .eslintrc.json

{
  "root": true,
  "extends": ["majestic"]
}

ESLint Plugins

We also provide linting rules for ESLint plugins. To enable them, all you have to do is install the relevant plugin:

npm i -D eslint-plugin-react

You will automatically get the ESLint rules defined for the plugin.

Supported plugins

Prettier support

If you use Prettier to format your code, you will need to disable some conflicting rules.

By installing eslint-config-prettier, Majestic will turn off the relevant rules, for the plugins you have installed. Install it with:

npm i -D eslint-config-prettier

Note: Majestic won't run Prettier - to get eslint to run it for you, you can install eslint-plugin-prettier

npm i -D eslint-plugin-prettier

Example .eslintrc.json

{
  "root": true,
  "extends": ["majestic"],
  "plugins": ["prettier"],
  "rules": {
    "prettier/prettier": "error"
  }
}

Package Sidebar

Install

npm i eslint-config-majestic

Weekly Downloads

60

Version

8.0.1

License

MIT

Unpacked Size

32 kB

Total Files

30

Last publish

Collaborators

  • peet