eslint-config-artus
Node Style Guide for Artus and its ecosystem.
Install
npm i eslint @artus/eslint-config-artus --save-dev
Usage
{
"devDependencies": {
"@artus/eslint-config-artus": "^1.0.0",
"eslint": "8"
}
}
module.exports = {
extends: '@artus/eslint-config-artus',
};
Use with TypeScript project
{
"devDependencies": {
"@artus/eslint-config-artus": "^1.0.0",
"typescript": "^4.6.3"
}
}
module.exports = {
extends: '@artus/eslint-config-artus/typescript',
parserOptions: {
project: './tsconfig.json'
}
};
{
"lint": "eslint . --ext .ts"
}
{
"eslint.validate": [
"javascript",
"javascriptreact",
{
"language": "typescript",
"autoFix": true
},
]
}
Use with Experimental Features
If you want to use eslint-config-egg with experimental features such as async function
, you should use @babel/eslint-parser
parser:
{
"devDependencies": {
"@artus/eslint-config-artus": "^1.0.0",
"eslint": "8",
"@babel/core": "7",
"@babel/eslint-parser": "7"
}
}
module.exports = {
extends: '@artus/eslint-config-artus',
parser: '@babel/eslint-parser',
rules: {
'generator-star-spacing': 'off',
'babel/generator-star-spacing': 'off',
}
};
License
MIT