eslint-config-textio-base
v0.0.35
Published
Textio's base default style
Downloads
222
Readme
eslint-config-textio-base
Textio's javascript code styles encapsulated in an eslint config
NOTE: Only add shared config to this repo! Project-specific config should be inlined into the .eslintrc file in your project.
Getting Started with ES6 lint
- In the terminal, run
npm install --save-dev eslint-config-textio-base eslint
- Pick a configuration from below based on the kind of project you're creating, then modify the
.eslintrc
file in your root directory to contain that configuration. - Add additional configuration based on your project's needs
To use the es6 (no react) config
{
"extends": [
"eslint:recommended",
"textio-base"
]
}
To use the react config
{
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"textio-base/react"
]
}
To use the es5 (legacy) config
NO NEW PROJECTS SHOULD USE THIS
{
"extends": [
"textio-base/legacy"
]
}
Getting Started with tslint
- In the terminal, run
npm install --save-dev eslint-config-textio-base tslint tslint-eslint-rules tslint-react
- Modify the
tslint.json
file in your root directory to contain the configuration below. - Add additional configuration based on your project's needs
To use the tslint config
{
"extends": [
"tslint:recommended",
"tslint-react",
"tslint-eslint-rules",
"eslint-config-textio-base/tslint"
],
"rulesDirectory": [
"node_modules/eslint-config-textio-base/dist"
]
}