style-guide
Use robust linting like we do
Packages
-
Configuration for react projects.
-
eslint-config-datarockets-base
Configuration for javascript projects.
-
Configuration for stylesheets.
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
-
Install
eslint-plugin-filenames
in your project -
Add a
filename
plugin to the.eslintrc
file
"plugins": [
"filenames"
]
- Update the rules section the
.eslintrc
file
"rules": {
"filenames/match-regex": [2, 'camel', true]
}
Add React Pug linter
-
Install
eslint-plugin-react-pug
in your project -
Add a
react-pug
plugin to the.eslintrc
file
"plugins": [
"react-pug"
]
- Update the
extends
section
"extends": [
"plugin:react-pug/all"
]
- 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...