diff --git a/.yarn/cache/ast-types-npm-0.14.2-43c4ac4b0d-8674a77307.zip b/.yarn/cache/ast-types-npm-0.14.2-43c4ac4b0d-8674a77307.zip new file mode 100644 index 0000000..55180aa Binary files /dev/null and b/.yarn/cache/ast-types-npm-0.14.2-43c4ac4b0d-8674a77307.zip differ diff --git a/.yarn/cache/eslint-plugin-fp-ts-npm-0.3.0-fcb5be1aa9-7a459f744c.zip b/.yarn/cache/eslint-plugin-fp-ts-npm-0.3.0-fcb5be1aa9-7a459f744c.zip new file mode 100644 index 0000000..6788e52 Binary files /dev/null and b/.yarn/cache/eslint-plugin-fp-ts-npm-0.3.0-fcb5be1aa9-7a459f744c.zip differ diff --git a/.yarn/cache/esprima-npm-4.0.1-1084e98778-b45bc805a6.zip b/.yarn/cache/esprima-npm-4.0.1-1084e98778-b45bc805a6.zip new file mode 100644 index 0000000..501ceb3 Binary files /dev/null and b/.yarn/cache/esprima-npm-4.0.1-1084e98778-b45bc805a6.zip differ diff --git a/.yarn/cache/fp-ts-npm-2.11.8-1b278a55a3-481b824797.zip b/.yarn/cache/fp-ts-npm-2.11.8-1b278a55a3-481b824797.zip new file mode 100644 index 0000000..1718e31 Binary files /dev/null and b/.yarn/cache/fp-ts-npm-2.11.8-1b278a55a3-481b824797.zip differ diff --git a/.yarn/cache/recast-npm-0.20.5-35a50e82d9-14c35115cd.zip b/.yarn/cache/recast-npm-0.20.5-35a50e82d9-14c35115cd.zip new file mode 100644 index 0000000..6b9b4b8 Binary files /dev/null and b/.yarn/cache/recast-npm-0.20.5-35a50e82d9-14c35115cd.zip differ diff --git a/README.md b/README.md index eb07edc..863ab73 100644 --- a/README.md +++ b/README.md @@ -107,16 +107,22 @@ Following plugins are included in `werk85`: Please consult the documentation of each plugin for further rule explanation. +### fp-ts + +The following plugins are added additionally to `werk85/fp-ts`: + +* [fp-ts](https://github.com/buildo/eslint-plugin-fp-ts) + ### React -The following plugins are added addtionally to `werk85/react`: +The following plugins are added additionally to `werk85/react`: * [react](https://github.com/yannickcr/eslint-plugin-react) * [react-hooks](https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks) ### Jest -The following plugins are added addtionally to `werk85/jest`: +The following plugins are added additionally to `werk85/jest`: * [jest](https://github.com/jest-community/eslint-plugin-jest) diff --git a/package.json b/package.json index cc64879..790742d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-werk85", - "version": "6.0.0", + "version": "7.0.0-beta.2", "main": "index.js", "repository": "git@github.com:werk85/eslint-config-werk85.git", "author": "Malte Legenhausen ", @@ -18,6 +18,7 @@ "eslint-config-prettier": "^8.4.0", "eslint-import-resolver-typescript": "^2.5.0", "eslint-plugin-deprecation": "^1.3.2", + "eslint-plugin-fp-ts": "^0.3.0", "eslint-plugin-import": "^2.25.4", "eslint-plugin-jest": "^26.1.1", "eslint-plugin-prettier": "^4.0.0", diff --git a/src/fp-ts.ts b/src/fp-ts.ts new file mode 100644 index 0000000..f3cad6e --- /dev/null +++ b/src/fp-ts.ts @@ -0,0 +1,15 @@ +import { Linter } from 'eslint' + +const config: Linter.Config = { + plugins: ['fp-ts'], + rules: { + 'fp-ts/no-lib-imports': 'error', + 'fp-ts/no-pipeable': 'error', + 'fp-ts/no-redundant-flow': 'error', + 'fp-ts/prefer-bimap': 'error', + 'fp-ts/prefer-chain': 'error', + 'fp-ts/prefer-traverse': 'error' + } +} + +export = config diff --git a/yarn.lock b/yarn.lock index 3e84bb9..6345794 100644 --- a/yarn.lock +++ b/yarn.lock @@ -645,6 +645,15 @@ __metadata: languageName: node linkType: hard +"ast-types@npm:0.14.2": + version: 0.14.2 + resolution: "ast-types@npm:0.14.2" + dependencies: + tslib: ^2.0.1 + checksum: 8674a77307764979f0a0b2006b7223a4b789abffaa7acbf6a1132650a799252155170173a1ff6a7fb6897f59437fc955f2707bdfc391b0797750898876e6c9ed + languageName: node + linkType: hard + "balanced-match@npm:^1.0.0": version: 1.0.2 resolution: "balanced-match@npm:1.0.2" @@ -1183,6 +1192,7 @@ __metadata: eslint-config-prettier: ^8.4.0 eslint-import-resolver-typescript: ^2.5.0 eslint-plugin-deprecation: ^1.3.2 + eslint-plugin-fp-ts: ^0.3.0 eslint-plugin-import: ^2.25.4 eslint-plugin-jest: ^26.1.1 eslint-plugin-prettier: ^4.0.0 @@ -1249,6 +1259,18 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-fp-ts@npm:^0.3.0": + version: 0.3.0 + resolution: "eslint-plugin-fp-ts@npm:0.3.0" + dependencies: + "@typescript-eslint/experimental-utils": ^5.0.0 + estraverse: ^5.2.0 + fp-ts: ^2.9.3 + recast: ^0.20.4 + checksum: 7a459f744c0819a59ba59417f8b5345ca12ebf50e62cc47276a2bd9a3ab4a704f5fb71e0f4a7ca4923249edbc369cb35dfde17031b1a08280f65e781167c61ff + languageName: node + linkType: hard + "eslint-plugin-import@npm:^2.25.4": version: 2.25.4 resolution: "eslint-plugin-import@npm:2.25.4" @@ -1438,6 +1460,16 @@ __metadata: languageName: node linkType: hard +"esprima@npm:~4.0.0": + version: 4.0.1 + resolution: "esprima@npm:4.0.1" + bin: + esparse: ./bin/esparse.js + esvalidate: ./bin/esvalidate.js + checksum: b45bc805a613dbea2835278c306b91aff6173c8d034223fa81498c77dcbce3b2931bf6006db816f62eacd9fd4ea975dfd85a5b7f3c6402cfd050d4ca3c13a628 + languageName: node + linkType: hard + "esquery@npm:^1.4.0": version: 1.4.0 resolution: "esquery@npm:1.4.0" @@ -1611,6 +1643,13 @@ __metadata: languageName: node linkType: hard +"fp-ts@npm:^2.9.3": + version: 2.11.8 + resolution: "fp-ts@npm:2.11.8" + checksum: 481b824797ba59f3f5549810e8f6688b27554790d11a470ccdf4fc086a1cb4993ffb9060131b054abccca703f2776993e12f649865143e178e9b7c9e5b295ea7 + languageName: node + linkType: hard + "fs-minipass@npm:^2.0.0, fs-minipass@npm:^2.1.0": version: 2.1.0 resolution: "fs-minipass@npm:2.1.0" @@ -3406,6 +3445,18 @@ __metadata: languageName: node linkType: hard +"recast@npm:^0.20.4": + version: 0.20.5 + resolution: "recast@npm:0.20.5" + dependencies: + ast-types: 0.14.2 + esprima: ~4.0.0 + source-map: ~0.6.1 + tslib: ^2.0.1 + checksum: 14c35115cd9965950724cb2968f069a247fa79ce890643ab6dc3795c705b363f7b92a45238e9f765387c306763be9955f72047bb9d15b5d60b0a55f9e7912d5a + languageName: node + linkType: hard + "regexp.prototype.flags@npm:^1.3.1": version: 1.3.1 resolution: "regexp.prototype.flags@npm:1.3.1" @@ -3688,7 +3739,7 @@ __metadata: languageName: node linkType: hard -"source-map@npm:^0.6.0": +"source-map@npm:^0.6.0, source-map@npm:~0.6.1": version: 0.6.1 resolution: "source-map@npm:0.6.1" checksum: 59ce8640cf3f3124f64ac289012c2b8bd377c238e316fb323ea22fbfe83da07d81e000071d7242cad7a23cd91c7de98e4df8830ec3f133cb6133a5f6e9f67bc2 @@ -3972,7 +4023,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.3.1": +"tslib@npm:^2.0.1, tslib@npm:^2.3.1": version: 2.3.1 resolution: "tslib@npm:2.3.1" checksum: de17a98d4614481f7fcb5cd53ffc1aaf8654313be0291e1bfaee4b4bb31a20494b7d218ff2e15017883e8ea9626599b3b0e0229c18383ba9dce89da2adf15cb9