Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sergiioo/tslint-defocus
A tslint rule to nag you when you forget that you have focused some Jasmine tests with 'fdescribe' or 'fit'
https://github.com/sergiioo/tslint-defocus
jasmine linting-rules tslint tslint-rules typescript
Last synced: 23 days ago
JSON representation
A tslint rule to nag you when you forget that you have focused some Jasmine tests with 'fdescribe' or 'fit'
- Host: GitHub
- URL: https://github.com/sergiioo/tslint-defocus
- Owner: Sergiioo
- License: mit
- Created: 2016-10-04T20:25:27.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-10-26T18:23:57.000Z (about 4 years ago)
- Last Synced: 2024-10-14T07:42:40.042Z (23 days ago)
- Topics: jasmine, linting-rules, tslint, tslint-rules, typescript
- Language: TypeScript
- Size: 41 KB
- Stars: 18
- Watchers: 2
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/Sergiioo/tslint-defocus.svg?branch=master)](https://travis-ci.org/Sergiioo/tslint-defocus)
[![NPM Version](https://img.shields.io/npm/v/tslint-defocus.svg)](https://www.npmjs.com/package/tslint-defocus)
[![License](https://img.shields.io/npm/l/tslint-defocus.svg)](LICENSE)# tslint-defocus
## About
This is a tslint rule that warns about focussed Jasmine tests - `fdescribe` and `fit`
## Usage
- Install with: `npm install tslint-defocus --save-dev` or `yarn add tslint-defocus --dev`
- Extend this package in your `.tslint.json` file, e.g.:```
"extends": [
"tslint-defocus"
],
"rules": {
"defocus": true,
...
```(as per the [instructions for custom rules](http://palantir.github.io/tslint/usage/custom-rules/))
- Run `tslint` as you usually would (gulp plugin, directly from node, etc)
- If you forget to remove a call to `fdescribe` or `fit` then you will see something like from tslint:```
(defocus) app.ts[4, 1]: Calls to 'fdescribe' are not allowed.
(defocus) app.ts[8, 5]: Calls to 'fit' are not allowed.
```## Dependencies
Version 2.0.x of this rule requires version 5.x of tslint.
## Developer instructions
- installed the required global npm packages: `npm install gulp --global --no-optional`.
- Clone [from github](https://github.com/Sergiioo/tslint-defocus)
- Run `npm install` or `yarn install` to install and get started
- This repo uses npm scripts for its build. Try `yarn build` and `yarn test`.
- There are also watch mode variants - `yarn build:watch` and `yarn test:watch`.## License
MIT