eslint-config-lionc
v1.2.0
Published
Extendable ESLint config for modern, simple Javascript, Typescript and Node
Downloads
11
Maintainers
Readme
eslint-config-lionc
Exhaustive extendable ESLint config for modern, clear and consistent Javascript, Typescript and Node.
Install
To install, simply run
$ npm i --save-dev eslint-config-lionc
You also need a peer of eslint@>5
, so if you do not have that yet, run
$ npm i eslint
How to use
Javascript
To apply the core Javascript config to your project, the simplest config is to create this .eslintrc.json
in your
project:
{
"extends": "lionc"
}
Then just run npx eslint your/source/folder/**/*.js
Typescript
If you use Typescript, use lionc/typescript
instead, which takses care of setting the correct parser
and adds additional Typescript rules:
{
"extends": "lionc/typescript"
}
If your tsconfig.json
is not in the same folder as your .eslintrc.json
, you need to specify that
using parserOptions.project
:
{
"extends": "lionc/typescript",
"parserOptions": {
"project": "./path/to/your/tsconfig.json"
}
}
Node
If you are using Node, use lionc/node
:
{
"extends": "lionc/node"
}
If you want to use Node and Typescript together, make sure to extend both in the following order:
{
"extends": [
"lionc/node",
"lionc/typescript"
]
}