eslint-config-ship-components
v1.5.1
Published
Eslint Rules for SHIP
Downloads
23
Readme
ship-components-eslint-rules
eslint rules used in ship-components and Ship applications. Includes support for Babel and React.
Usage
Install
npm install eslint-config-ship-components@latest --save-dev
Install peer dependencies
You can see them by running: npm info eslint-config-ship-components@latest peerDependencies
Linux/OSX users can simply run the following command to install them automatically.
(
export PKG=eslint-config-ship-components;
npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG@latest"
)
Setup .eslintrc
Add "extends": "ship-components",
to your .eslintrc
{
"extends" : "ship-components",
// Additional rules
"rules": {
}
}
Development
- Clone this repo
- Run
npm link
from the repository - In you the project folder you want to test in run
npm link eslint-config-ship-components
- Add to your
.eslintrc
like normal
History
- 1.5.0 - Updated babel preset to env (from latest). Removed node 4 from Travis CI; added node 8.
- 1.4.2 - Fixes the one-var rule to enforce using multiple var, let, const per line.
- 1.4.1 - Fixes the invalid comma-dangle, space-after-keywords and array-bracket-spacing values
- 1.4.0 - Added rules for arrow functions based on airbnb
- 1.3.2 - Allowed arrow functions in render method, added more rules for spacing
- 1.3.1 - Switched jsx tabs to spaces
- 1.3.0 - Switched from tabs to spaces
- 1.2.0 - Updates the eslint setup to focus on react and JSX, and added tests
- 1.1.0 - Added indent rule
- 1.0.0 - Initial commit
License
MIT License
Copyright (c) 2017 SHIP
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.