Skip to content

Commit

Permalink
chore: remove flow rules
Browse files Browse the repository at this point in the history
after agreed this with Carlos Serrano, remove support for flow. We don't use it and it brings some unneeded complexity to the package.

BREAKING CHANGE: remove support for Flow

Issues: MOL-29362
  • Loading branch information
Txabox committed Apr 23, 2024
1 parent 0399f90 commit a02b477
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 94 deletions.
58 changes: 27 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,75 +12,71 @@ Add `eslint-config-mailonline` as a development dependency:
npm install eslint-config-mailonline --save-dev
```

Create ESLint configuration file (`.eslintrc`) that extends `eslint-config-mailonline`:
Create ESLint configuration file (`eslint.config.js`) that extends `eslint-config-mailonline`:

```json
{
"extends": "mailonline"
}
```js
// eslint.config.[m]js
import baseMailonlineConfig from "eslint-config-mailonline";

export default [{
...baseMailonlineConfig,
// additional config here
];
```
## Extended configs
The package also has separate entry points for some environments. Simply extend from the entry point as described below,
either in a folder-specific eslint config, or additionally to the root config, e.g.:
```json
{
```js
module.exports = {
"extends": [
"mailonline",
"mailonline/jest",
"mailonline/react"
]
}
};
```
### jest
```json
{
```js
module.exports = {
"extends": "mailonline/jest"
}
};
```
### mocha
```json
{
```js
module.exports = {
"extends": "mailonline/mocha"
}
};
```
### react
```json
{
```js
module.exports = {
"extends": "mailonline/react"
}
```

### flowtype

```json
{
"extends": "mailonline/flowtype"
}
};
```
### lodash
```json
{
```js
module.exports = {
"extends": "mailonline/lodash"
}
};
```
### webpack
```json
{
```js
module.exports = {
"extends": "mailonline/webpack"
}
};
```
## Breaking changes
Expand Down
61 changes: 0 additions & 61 deletions configurations/flowtype.json

This file was deleted.

1 change: 0 additions & 1 deletion flowtype.js

This file was deleted.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"babel-eslint": "^10.1.0",
"eslint-plugin-babel": "^5.3.1",
"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^28.2.0",
"eslint-plugin-jsdoc": "^48.2.3",
Expand Down

0 comments on commit a02b477

Please sign in to comment.