0.1.4 • Published 5 years ago

@wowworks/tslint-config v0.1.4

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

TSLint Config Wowworks

Installation

yarn add @wowworks/tslint-config --save

Usage

In tslint.json:

{
  "extends": "@wowworks/tslint-config"
}

Rules

Based style guide on airbnb javascript and airbnb react

Rules that are not supported in tslint:

The rules that are contained in the airbnb style manual, but in tslint are not:

React:

  • If you don't have state or refs, prefer normal functions (not arrow functions) over classes: Basic rules
// bad
class Listing extends React.Component {
  render() {
    return <div>{this.props.hello}</div>;
  }
}

// bad (relying on function name inference is discouraged)
const Listing = ({ hello }) => (
  <div>{hello}</div>
);

// good
function Listing({ hello }) {
  return <div>{hello}</div>;
}

Versioning

+----- Major version is synchronize with tslint's major version.
| +--- Minor version has BREAKING CHANGE and feat.
| | +- Patch version has patch.
| | |
x.x.x

License

MIT