Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2.0.0 #93

Merged
merged 4 commits into from
Jun 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
[![CircleCI](https://circleci.com/gh/dangreenisrael/eslint-plugin-jest-formatting/tree/master.svg?style=svg)](https://circleci.com/gh/dangreenisrael/eslint-plugin-jest-formatting/tree/master)
![npm monthly downloads](https://img.shields.io/npm/dm/eslint-plugin-jest-formatting.svg)

**_Note: The master version may not be the version deployed to npm. Please treat https://www.npmjs.com/package/eslint-plugin-jest-formatting as the cannonical source for docs._**

# eslint-plugin-jest-formatting

This package provides ESLint rules for jest test suites.

This project aims to provide formatting rules (auto-fixable where possible) to ensure consistency and readability in jest test suites.

Like this plugin? [Say thanks with a ⭐️](https://github.com/dangreenisrael/eslint-plugin-jest-formatting/stargazers)

**_Note: The master version may not be the version deployed to npm. Please treat https://www.npmjs.com/package/eslint-plugin-jest-formatting as the cannonical source for docs._**

## Installation

You'll first need to install [ESLint](http://eslint.org):
Expand Down Expand Up @@ -75,13 +77,10 @@ We also support a "strict" settings which enabled all of the rules for you
- [padding-around-test-blocks](docs/rules/padding-around-test-blocks.md)
- [padding-around-all](docs/rules/padding-around-all.md)

### Deprecated
## Related Projects

### eslint-plugin-jest

This provides an extensive set of jest eslint rules

- [padding-before-all](docs/rules/padding-before-all.md)
- [padding-before-before-each-blocks](docs/rules/padding-before-before-each-blocks.md)
- [padding-before-after-each-blocks](docs/rules/padding-before-after-each-blocks.md)
- [padding-before-before-all-blocks](docs/rules/padding-before-before-all-blocks.md)
- [padding-before-after-all-blocks](docs/rules/padding-before-after-all-blocks.md)
- [padding-before-describe-blocks](docs/rules/padding-before-describe-blocks.md)
- [padding-before-expect-statements](docs/rules/padding-before-expect-statements.md)
- [padding-before-test-blocks](docs/rules/padding-before-test-blocks.md)
https://github.com/jest-community/eslint-plugin-jest
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-jest-formatting",
"version": "1.2.0",
"version": "2.0.0",
"description": "Formatting rules for jest tests",
"keywords": [
"eslint",
Expand Down
109 changes: 0 additions & 109 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,115 +133,6 @@ export const rules = {
'padding-around-all': createRule(
[].concat(...Object.keys(paddingConfigs).map((k) => paddingConfigs[k])),
),

// ===========================================================================
// DEPRECATED
'padding-before-after-all-blocks': createRule(
[
{
paddingType: PaddingType.Always,
prevStatementType: StatementType.Any,
nextStatementType: StatementType.AfterAllToken,
},
],
true,
),
// DEPRECATED
'padding-before-after-each-blocks': createRule(
[
{
paddingType: PaddingType.Always,
prevStatementType: StatementType.Any,
nextStatementType: StatementType.AfterEachToken,
},
],
true,
),
// DEPRECATED
'padding-before-before-all-blocks': createRule(
[
{
paddingType: PaddingType.Always,
prevStatementType: StatementType.Any,
nextStatementType: StatementType.BeforeAllToken,
},
],
true,
),
// DEPRECATED
'padding-before-before-each-blocks': createRule(
[
{
paddingType: PaddingType.Always,
prevStatementType: StatementType.Any,
nextStatementType: StatementType.BeforeEachToken,
},
],
true,
),
// DEPRECATED
'padding-before-describe-blocks': createRule(
[
{
paddingType: PaddingType.Always,
prevStatementType: StatementType.Any,
nextStatementType: StatementType.DescribeToken,
},
],
true,
),
// DEPRECATED
'padding-before-expect-statements': createRule(
[
{
paddingType: PaddingType.Always,
prevStatementType: StatementType.Any,
nextStatementType: StatementType.ExpectToken,
},
{
paddingType: PaddingType.Any,
prevStatementType: StatementType.ExpectToken,
nextStatementType: StatementType.ExpectToken,
},
],
true,
),
// DEPRECATED
'padding-before-test-blocks': createRule(
[
{
paddingType: PaddingType.Always,
prevStatementType: StatementType.Any,
nextStatementType: [StatementType.TestToken, StatementType.ItToken],
},
],
true,
),
// DEPRECATED
'padding-before-all': createRule(
[
{
paddingType: PaddingType.Always,
prevStatementType: StatementType.Any,
nextStatementType: [
StatementType.AfterAllToken,
StatementType.AfterEachToken,
StatementType.BeforeAllToken,
StatementType.BeforeEachToken,
StatementType.DescribeToken,
StatementType.ExpectToken,
StatementType.ItToken,
StatementType.TestToken,
],
},
{
paddingType: PaddingType.Any,
prevStatementType: StatementType.ExpectToken,
nextStatementType: StatementType.ExpectToken,
},
],
true,
),
};

export const configs = {
Expand Down
99 changes: 0 additions & 99 deletions tests/lib/rules/padding-before-after-all-blocks.spec.js

This file was deleted.

99 changes: 0 additions & 99 deletions tests/lib/rules/padding-before-after-each-blocks.spec.js

This file was deleted.

Loading