ESLint shareable config for Travix International
$ npm install --save-dev eslint eslint-config-travix
For ES6 you'll also need Babel's Core, ESLint parser and plugin:
$ npm install --save-dev babel-core babel-eslint eslint-plugin-babel eslint-plugin-import
For react
, you will also need eslint-plugin-react
:
$ npm install --save-dev eslint-plugin-react
Add some ESLint config to your package.json
:
{
"name": "my-travix-project",
"eslintConfig": {
"extends": "travix"
}
}
Or to .eslintrc
:
{
"extends": "travix" // same as "travix/base"
}
And travix/react
if you want React application to be linted:
{
"extends": [
"travix/base",
"travix/react"
]
}
You can combine multiple configs together:
{
"extends": [
"travix/rules/best-practices",
"travix/rules/es6",
"travix/rules/node",
"travix/react"
]
}
In some cases, you may also be required to pass your custom parser
in .eslintrc
file:
{
"parser": "babel-eslint",
"extends": "travix"
}
To publish a new version on npm, run:
$ make release VERSION=patch
Possible VERSION
values include: patch
, minor
, major
.
MIT © Travix International