1.0.2 • Published 6 months ago
m-sergeevich-prettier-eslint v1.0.2
m-sergeevich-prettier-eslint
This package provides pre-configured settings for ESLint and Prettier to ensure consistent coding style and code quality in your JavaScript and/or TypeScript projects.
Installation First, install the package in your project:
npm install m-sergeevich-prettier-eslint --save-dev
ESLint Configuration
Create a .eslintrc.js file in the root of your project and add the following configuration:
module.exports = {
extends: ['m-sergeevich-prettier-eslint/eslint-config'],
// Add your custom ESLint rules here
};
Prettier Configuration
Create a .prettierrc.js file in the root of your project and add the following configuration:
module.exports = {
...require('m-sergeevich-prettier-eslint/prettier-config'),
// Add your custom Prettier options here
};
Usage
Add the following scripts to your project's package.json for linting and formatting:
"scripts": {
"lint": "eslint 'src/**/*.{js,jsx,ts,tsx}' --fix",
"format": "prettier --write 'src/**/*.{js,jsx,ts,tsx,json,md}'"
}