Installation
npm install -D \
eslint \
eslint-config-catalyst
yarn add -D \
eslint \
eslint-config-catalyst
Usage
Language
JavaScript (Modern)
Install Peer Dependencies:
yarn add -D \
babel-eslint \
eslint-plugin-import \
eslint-plugin-promise
Configure your project's .eslintrc
file.
{
"extends": [
"catalyst"
],
"rules": {
// Additional, per-project rules...
}
}
JavaScript (ES5)
Configure your project's .eslintrc
file.
{
"extends": [
"catalyst/configs/es5.json"
],
"rules": {
// Additional, per-project rules...
}
}
TypeScript
Install Peer Dependencies:
yarn add -D \
@typescript-eslint/parser \
@typescript-eslint/eslint-plugin \
eslint-plugin-import \
eslint-plugin-promise
Configure your project's .eslintrc
file.
{
"parserOptions": {
"project": "tsconfig.json"
},
"extends": [
"catalyst",
"catalyst/configs/typescript.json"
],
"rules": {
// Additional, per-project rules...
}
}
Tools
React
Install Peer Dependencies:
yarn add -D \
eslint-plugin-react \
eslint-plugin-react-hooks
Configure your project's .eslintrc
file.
{
"extends": [
"catalyst",
"catalyst/configs/react.json"
// "catalyst/configs/typescript.json" // if using TypeScript, include it after react.
],
"rules": {
// Additional, per-project rules...
}
}