eslint-config-lionc

1.2.0 • Public • Published

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"
   ]
}

Package Sidebar

Install

npm i eslint-config-lionc

Weekly Downloads

0

Version

1.2.0

License

MIT

Unpacked Size

14.7 kB

Total Files

5

Last publish

Collaborators

  • lionc