Skip to content

datarockets/style-guide

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

style-guide

Use robust linting like we do

npm version CI Status

Packages

Contributing

It uses lerna to maintain all packages within one repository, so take a look at its features.

Extend the config

If you need to upgrade or alter rules in this config, just add the rules section to the .eslintrc file.

  "rules": {
    "no-extra-semi": "error"
  }

Add file name linter

  1. Install eslint-plugin-filenames in your project

  2. Add a filename plugin to the .eslintrc file

  "plugins": [
    "filenames"
  ]
  1. Update the rules section the .eslintrc file
  "rules": {
    "filenames/match-regex": [2, 'camel', true]
  }

Add React Pug linter

  1. Install eslint-plugin-react-pug in your project

  2. Add a react-pug plugin to the .eslintrc file

  "plugins": [
    "react-pug"
  ]
  1. Update the extends section
  "extends": [
    "plugin:react-pug/all"
  ]
  1. Add the following rules to make linter works with Pug
  "rules": {
    "react/prefer-stateless-function": "off",
    "react/prop-types': "off",
    "react/no-unused-prop-types": "off",
    "react/no-unused-state": "off",
  }

Why all configurations under one version

Coming soon...