0.0.2 • Published 8 years ago
eslint-plugin-nnimetz v0.0.2
eslint-plugin-nnimetz

ESLint pluging by Nicolas Nimetz
Installation
You'll first need to install ESLint:
$ npm i eslint --save-devNext, install eslint-plugin-nnimetz:
$ yarn add eslint-plugin-nnimetz --devOr
$ npm install eslint-plugin-nnimetz --save-devNote: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-nnimetz globally.
Usage
Add nnimetz to the extends and plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"extends": [
"standard",
"plugin:nnimetz/recommended"
],
"plugins": [
"nnimetz"
]
}Or you can configure the rules you want to use under the rules section after added nnimetz to the plugins section.
{
"extends": "standard",
"plugins": [
"nnimetz"
],
"rules": {
"nnimetz/rule-name": 2
}
}Table of Contents
Modules
- 1.1 Import single function over a full FP library. For this use the rule
no-full-fp-lib: more details with the doc.
// bad
import _ from 'lodash'
// good
import { filter } from 'lodash'Variables
- 2.1 Always use
letorconstto declare variables. For this, use the ruleno-var-set: more details with the doc.
// bad
var variable = 'hello'
// good
let variable = 'hello'Testing
// bad
describe.only('test', () => { })
// good
describe('test', () => { })