The official Media.Monks eslint configuration, based on the Frontend Coding Standards.
Package | Version | Downloads |
---|---|---|
@mediamonks/eslint-config |
||
@mediamonks/eslint-config-react |
||
@mediamonks/eslint-config-typescript |
||
@mediamonks/eslint-config-typescript-react |
||
@mediamonks/eslint-plugin-react |
Installation and configuration in a project is super easy, follow the instructions for one of the following project types.
- For JavaScript projects
- For JavaScript projects using React
- For TypeScript projects
- For TypeScript projects using React
Install the following package(s):
npm install --save-dev @mediamonks/eslint-config
Add the following configuration to your package.json
"eslintConfig": {
"overrides": [
{
"files": ["*.js"],
"extends": [
"@mediamonks/eslint-config"
]
}
]
}
Install the following package(s):
npm install --save-dev \
@mediamonks/eslint-config
@mediamonks/eslint-config-react
Add the following configuration to your package.json
"eslintConfig": {
"overrides": [
{
"files": ["*.js"],
"extends": [
"@mediamonks/eslint-config"
]
}
{
"files": ["*.jsx"],
"extends": [
"@mediamonks/eslint-config",
"@mediamonks/eslint-config-react"
]
}
]
}
Install the following package(s):
npm install --save-dev \
@mediamonks/eslint-config \
@mediamonks/eslint-config-typescript
Add the following configuration to your package.json
"eslintConfig": {
"overrides": [
{
"files": ["*.js"],
"extends": [
"@mediamonks/eslint-config"
]
},
{
"files": ["*.ts"],
"parserOptions": {
"project": "./tsconfig.json"
},
"extends": [
"@mediamonks/eslint-config",
"@mediamonks/eslint-config-typescript"
]
}
]
}
Install the following package(s):
npm install --save-dev \
@mediamonks/eslint-config \
@mediamonks/eslint-config-react \
@mediamonks/eslint-config-typescript \
@mediamonks/eslint-config-typescript-react
Add the following configuration to your package.json
"eslintConfig": {
"overrides": [
{
"files": ["*.js"],
"extends": [
"@mediamonks/eslint-config"
]
},
{
"files": ["*.jsx"],
"extends": [
"@mediamonks/eslint-config",
"@mediamonks/eslint-config-react"
]
},
{
"files": ["*.ts"],
"parserOptions": {
"project": "./tsconfig.json"
},
"extends": [
"@mediamonks/eslint-config",
"@mediamonks/eslint-config-typescript"
]
},
{
"files": ["*.tsx"],
"parserOptions": {
"project": "./tsconfig.json"
},
"extends": [
"@mediamonks/eslint-config",
"@mediamonks/eslint-config-react",
"@mediamonks/eslint-config-typescript",
"@mediamonks/eslint-config-typescript-react"
]
}
]
}