@resolution/eslint-config
v5.0.0
Published
Resolution's eslint config for Forge apps
Downloads
322
Readme
Resolution ESLint Config
Adds our internal ESLint config, which integrates prettier, SonarJS and supports Typescript.
Prerequisites
You need to already have a tsconfig.json
file that fits your needs.
How to use
First, install the config and the plugins:
npm add --save-dev @resolution/eslint-config @resolution/prettier-config eslint prettier typescript
# OR
yarn add -D @resolution/eslint-config @resolution/prettier-config eslint prettier typescript
Then, add the following section to your package.json
:
{
"prettier": "@resolution/prettier-config"
}
and create a .eslintrc.js
:
module.exports = {
"extends": "@resolution/eslint-config/profile/react",
"parserOptions": { "tsconfigRootDir": __dirname }
}
Profiles
We offer a couple of profiles you can use at the end of the extends
string:
base
: Anything Typescriptreact
: Typescript + React