@prosomo/eslint-config
v2.1.1
Published
Shared ESLint configurations for Prosomo.
Downloads
9
Readme
@prosomo/eslint-config
Shared ESLint configurations for Prosomo.
Installation
With pnpm
pnpm add --dev eslint eslint-config-prettier @prosomo/eslint-config
With Yarn
yarn add --dev eslint eslint-config-prettier @prosomo/eslint-config
With npm
npm install --save-dev eslint eslint-config-prettier @prosomo/eslint-config
If you need TypeScript support, also install typescript
, @typescript-eslint/eslint-plugin
and @typescript-eslint/parser
.
If you need React support, also install eslint-plugin-react
.
Available configs
@prosomo/eslint-config
@prosomo/eslint-config/typescript
@prosomo/eslint-config/react
@prosomo/eslint-config/react-typescript
Usage
Create a .eslintrc.cjs
file in the root of your project with the following contents. See the ESLint configuration docs for more details.
/** @type {import("eslint").ESLint.ConfigData} */
const config = {
extends: ["@prosomo/eslint-config"],
};
module.exports = config;
Now you can run ESLint by adding a linting script to your package.json
. See the ESLint CLI docs for more details.
{
"scripts": {
"lint": "eslint ."
}
}
Run it:
With pnpm
pnpm lint
With Yarn
yarn lint
With npm
npm run lint