This is a setup about linting your typescript code based with Eslint and Prettier.
Eslint is the one which has tons of rules for you to write a javascript code with best practices.
Prettier on the order hand, organize your code as simples as it can leave more organizable and understandable with respect of things order.
In project folder run the follow command:
# Npm users
$ npm run -D @boostedp/eslint-config
# Yarn users
$ yarn add @boostedp/eslint-config -D
Create a file .eslintrc.json and add my plugin inside extends array
{
"extends": ["@boostedp"]
}
In project folder run the follow command:
# Npm users
$ npm run -D @boostedp/prettier
# Yarn users
$ yarn add @boostedp/prettier -D
Create a file .prettierrc.js and add these lines of codes.
const prettierPlugin = require("@boostedp/prettier");
module.exports = {
...prettierPlugin
};
You can override eslint and prettier rules, feel free to do it! Look at these docs.
Made by Paulo Henrique πΈ