Skip to content

Commit

Permalink
fix: rename stylitic to stylistic
Browse files Browse the repository at this point in the history
the "stylitic" ruleset will still be avaliable until the next major release.
  • Loading branch information
RebeccaStevens committed Jul 22, 2021
1 parent 967c0fd commit a7c1a3e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ An [ESLint](http://eslint.org) plugin to disable mutation and promote functional
- [No statements](#no-statements)
- [No exceptions](#no-exceptions)
- [Currying](#currying)
- [Stylitic](#stylitic)
- [Stylistic](#stylistic)

### No mutations

Expand All @@ -46,7 +46,7 @@ Functional programming style does not use run-time exceptions. Instead expressio

JavaScript functions support syntax that is not compatible with curried functions. To enable currying this syntax has to be disabled.

### Stylitic
### Stylistic

Make things look nicer (in our opinion).

Expand Down Expand Up @@ -100,7 +100,7 @@ Enable rulesets via the "extends" property of your `.eslintrc` configuration fil
"extends": [
"plugin:functional/external-recommended",
"plugin:functional/recommended",
"plugin:functional/stylitic"
"plugin:functional/stylistic"
]
}
```
Expand Down Expand Up @@ -143,7 +143,7 @@ See [@typescript-eslint/parser's README.md](https://github.com/typescript-eslint
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:functional/external-recommended",
"plugin:functional/recommended",
"plugin:functional/stylitic"
"plugin:functional/stylistic"
]
}
```
Expand All @@ -164,7 +164,7 @@ Categorized:
- **No Statements** (plugin:functional/no-statements)
- **No Exceptions** (plugin:functional/no-exceptions)
- **Currying** (plugin:functional/currying)
- **Stylitic** (plugin:functional/stylitic)
- **Stylistic** (plugin:functional/stylistic)

Other:

Expand Down Expand Up @@ -236,11 +236,11 @@ The [below section](#supported-rules) gives details on which rules are enabled b
| ---------------------------------------------------------------- | ----------------------------------------- | :-----------------------------------------: | :--------------------------------------: | :----------------------------------------------: | :------: | :----------: |
| [`functional-parameters`](./docs/rules/functional-parameters.md) | Functions must have functional parameters | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | |

### Stylitic Rules
### Stylistic Rules

:see_no_evil: = `stylitic` Ruleset.
:see_no_evil: = `stylistic` Ruleset.

| Name | Description | <span title="Stylitic">:see_no_evil:</span> | <span title="Lite">:hear_no_evil:</span> | <span title="Recommended">:speak_no_evil:</span> | :wrench: | :blue_heart: |
| Name | Description | <span title="Stylistic">:see_no_evil:</span> | <span title="Lite">:hear_no_evil:</span> | <span title="Recommended">:speak_no_evil:</span> | :wrench: | :blue_heart: |
| ---------------------------------------------- | ----------------------- | :-----------------------------------------: | :--------------------------------------: | :----------------------------------------------: | :------: | :----------: |
| [`prefer-tacit`](./docs/rules/prefer-tacit.md) | Tacit/Point-Free style. | :heavy_check_mark: | | | :wrench: | :blue_heart: |

Expand Down
File renamed without changes.
6 changes: 4 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import noMutations from "./configs/no-mutations";
import noExceptions from "./configs/no-exceptions";
import noObjectOrientation from "./configs/no-object-orientation";
import noStatements from "./configs/no-statements";
import stylitic from "./configs/stylitic";
import stylistic from "./configs/stylistic";

import { rules } from "./rules";

Expand All @@ -30,7 +30,9 @@ const config: EslintPluginConfig = {
"no-object-orientation": noObjectOrientation,
"no-statements": noStatements,
currying,
stylitic,
/** @deprecated Use `stylistic` instead. */
stylitic: stylistic,
stylistic,
},
};

Expand Down
4 changes: 2 additions & 2 deletions tests/configs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import noMutations from "../src/configs/no-mutations";
import noExceptions from "../src/configs/no-exceptions";
import noObjectOrientation from "../src/configs/no-object-orientation";
import noStatements from "../src/configs/no-statements";
import stylitic from "../src/configs/stylitic";
import stylistic from "../src/configs/stylistic";
import { rules } from "../src/rules";

/**
Expand Down Expand Up @@ -59,6 +59,6 @@ describe("configs", () => {
describe("No Exceptions", testConfig(noExceptions, all));
describe("No Object Orientation", testConfig(noObjectOrientation, all));
describe("No Statements", testConfig(noStatements, all));
describe("Stylitic", testConfig(stylitic, all));
describe("Stylistic", testConfig(stylistic, all));
/* eslint-enable jest/valid-describe */
});
2 changes: 1 addition & 1 deletion tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ describe("plugin", () => {
it("should have all the configs", () => {
expect.assertions(2);
expect(plugin).toHaveProperty("configs");
expect(Object.keys(plugin.configs)).toHaveLength(configFiles.length);
expect(Object.keys(plugin.configs)).toHaveLength(configFiles.length + 1);
});
});

0 comments on commit a7c1a3e

Please sign in to comment.