Yoctol/eslint-config-yoctol-base

Name: eslint-config-yoctol-base

Owner: YOCTOL INFO INC.

Description: Yoctol specific base linting rules for ESLint

Created: 2016-05-06 04:43:08.0

Updated: 2017-02-15 07:26:12.0

Pushed: 2018-01-07 04:08:14.0

Homepage:

Size: 51

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

eslint-config-yoctol-base

NPM version Build Status Greenkeeper badge Dependency Status

Yoctol Info. base ESLint config, fork from eslint-config-airbnb-base.

Usage

We export two ESLint configurations for your usage.

eslint-config-yoctol-base

Our default export contains all of our ESLint rules, including ECMAScript 6+. It requires eslint, eslint-plugin-import and eslint-plugin-prettier.

  1. Install the correct versions of each package, which are listed by the command:
info "eslint-config-yoctol-base@latest" peerDependencies

Linux/OSX users can simply run


port PKG=eslint-config-yoctol-base;
m info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG@latest"

Which produces and runs a command like:

m install --save-dev eslint-config-yoctol-base eslint@^#.#.# eslint-plugin-import@^#.#.# eslint-plugin-prettier@^#.#.#

Windows users can either install all the peer dependencies manually, or use the install-peerdeps cli tool.

install -g install-peerdeps
all-peerdeps --dev eslint-config-yoctol-base

The cli will produce and run a command like:

install --save-dev eslint-config-yoctol-base eslint@^#.#.# eslint-plugin-import@^#.#.# eslint-plugin-prettier@^#.#.#
  1. Add "extends": "yoctol-base" to your .eslintrc
eslint-config-yoctol-base/legacy

Lints ES5 and below. Requires eslint and eslint-plugin-import.

  1. Install the correct versions of each package, which are listed by the command:
info "eslint-config-yoctol-base@latest" peerDependencies

Linux/OSX users can simply run


port PKG=eslint-config-yoctol-base;
m info "$PKG" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG"

Which produces and runs a command like:

install --save-dev eslint-config-yoctol-base eslint@^#.#.# eslint-plugin-import@^#.#.# eslint-plugin-prettier@^#.#.#
  1. Add "extends": "yoctol-base/legacy" to your .eslintrc

See Airbnb's overarching ESLint config, Airbnb's Javascript styleguide, and the ESlint config docs for more information.

Rules be overwritted
best-practices
lass-methods-use-this': 'off'
onsistent-return': 'off'
errors
omma-dangle': ['error', {
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'ignore',

es6
rrow-parens': ['error', 'as-needed']
refer-destructuring': [
rror',

VariableDeclarator: {
  array: false,
  object: true
},
AssignmentExpression: {
  array: false,
  object: false
}


enforceForRenamedProperties: false


import
port/prefer-default-export: 'off'
port/order: ['error', {
oups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
ewlines-between': 'always',

port/no-extraneous-dependencies: ['error', {
vDependencies: [
'**/__tests__/*.spec.js',
'**/__stories__/*.story.js',
'**/scripts/*.js',
'**/test/**/*.js',
'**/webpack.config.*.js',


node
lobal-require': 'off'
style
nebreak-style: 'off'
x-len: ['error', 100, 2, {
norePattern: ' // eslint-disable-line ',
noreUrls: true,
noreComments: false,
noreStrings: true,
noreTemplateLiterals: true,
noreRegExpLiterals: true,

-plusplus: ['error', { allowForLoopAfterthoughts: true }]
-underscore-dangle: 'off'
prettier
rettier/prettier': [
rror',

trailingComma: 'es5',
singleQuote: true



This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.