eslint-config-beidou
Beidou Node Style Guide
Last updated 2 years ago by njugray .
MIT · Original npm · Tarball · package.json
$ cnpm install eslint-config-beidou 
SYNC missed versions from official npm registry.

eslint-config-beidou

Node Style Guide for Beidou.

Install

npm i eslint eslint-config-beidou --save-dev

Usage

  • package.json
{
  "devDependencies": {
    "eslint-config-beidou": "1",
    "eslint": "3"
  }
}
  • .eslintrc.js
module.exports = {
  extends: 'eslint-config-beidou',
};

Use with Experimental Features

If you want to use eslint-config-beidou with experimental features such as async function, you should use babel-eslint parser:

  • package.json
{
  "devDependencies": {
    "eslint-config-beidou": "1",
    "eslint": "3",
    "babel-eslint": "6"
  }
}
  • .eslintrc.js
module.exports = {
  extends: 'eslint-config-beidou',
  // for experimental features support
  parser: 'babel-eslint',
  rules: {
    // see https://github.com/eslint/eslint/issues/6274
    'generator-star-spacing': 'off',
    'babel/generator-star-spacing': 'off',
  },
};

Use with React in Front-End

If you want to use eslint-config-beidou with react, jsx and es6 modules:

  • package.json
{
  "devDependencies": {
    "eslint-config-beidou": "1",
    "eslint": "3",
    "babel-eslint": "6",
    "eslint-plugin-react": "4"
  }
}
  • .eslintrc.js
module.exports = {
  extends: 'eslint-config-beidou',
  // for experimental features support
  parser: 'babel-eslint',
  parserOptions: {
    // for es6 module
    sourceType: 'module',
  },
  plugins: ['react'],
  rules: {
    // for variables in jsx
    'react/jsx-uses-vars': 'error',
    // see https://github.com/eslint/eslint/issues/6274
    'generator-star-spacing': 'off',
    'babel/generator-star-spacing': 'off',
  },
};

License

MIT

Current Tags

  • 2.0.1                                ...           latest (2 years ago)
  • 2.0.0-beta.0                                ...           next (2 years ago)

24 Versions

  • 2.0.1                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 2.0.0-beta.0                                ...           2 years ago
  • 2.0.0-alpha.1                                ...           2 years ago
  • 2.0.0-alpha.0                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.9                                ...           2 years ago
  • 1.0.8                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.0-beta.3                                ...           2 years ago
  • 1.0.0-beta.2                                ...           2 years ago
  • 1.0.0-beta.1                                ...           2 years ago
  • 1.0.0-beta.0                                ...           2 years ago
  • 1.0.0-alpha.5                                ...           2 years ago
  • 1.0.0-alpha.4                                ...           2 years ago
  • 1.0.0-alpha.3                                ...           3 years ago
  • 1.0.0-alpha.2                                ...           3 years ago
  • 1.0.0-alpha.1                                ...           3 years ago
  • 1.0.0-alpha.0                                ...           3 years ago
  • 1.0.0-alpha.ca3d4643                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
Downloads
Today 0
This Week 17
This Month 36
Last Day 0
Last Week 18
Last Month 102
Dependencies (1)
Dev Dependencies (4)

Copyright 2014 - 2016 © taobao.org |