Majestic code style for ES6 and React (JSX)
This package provides a majestic code style as the smartest ESLint shared config.
We export one smart ESLint configuration for your usage.
Contains all the core ESLint rules for linting ES2015 (ES6)+ code.
It only requires eslint
.
npm i -D eslint-config-majestic eslint
"extends": "majestic"
to your .eslintrc{
"root": true,
"extends": ["majestic"]
}
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.
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
{
"root": true,
"extends": ["majestic"],
"plugins": ["prettier"],
"rules": {
"prettier/prettier": "error"
}
}