Skip to content

Commit 5185f51

Browse files
authored
Merge pull request #213 from StefanoMagrassi/main
2 parents 2750c0d + 8bf1a70 commit 5185f51

11 files changed

+242
-217
lines changed

.eslintrc.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
"plugins": ["fp-ts"],
44
"extends": "plugin:fp-ts/all",
55
"rules": {
6-
"fp-ts/no-module-imports": ["error", {
7-
"allowTypes": true
8-
}]
6+
"fp-ts/no-module-imports": [
7+
"error",
8+
{
9+
"allowTypes": true
10+
}
11+
]
912
}
1013
}

package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"url": "https://github.com/buildo/eslint-plugin-fp-ts"
1616
},
1717
"scripts": {
18+
"prepare": "npm run build",
1819
"preversion": "yarn lint && yarn test && yarn build",
1920
"build": "rimraf lib && yarn tsc",
2021
"pretest": "yarn --cwd tests/fixtures/fp-ts-project install",
@@ -25,7 +26,7 @@
2526
"lib"
2627
],
2728
"dependencies": {
28-
"@typescript-eslint/experimental-utils": "^4.11.1",
29+
"@typescript-eslint/experimental-utils": "^5.0.0",
2930
"estraverse": "^5.2.0",
3031
"fp-ts": "^2.9.3",
3132
"recast": "^0.20.4"
@@ -36,10 +37,10 @@
3637
"@types/estraverse": "^5.1.0",
3738
"@types/node": "^14.14.16",
3839
"@types/requireindex": "^1.2.0",
39-
"@typescript-eslint/parser": "^4.11.1",
40+
"@typescript-eslint/parser": "^5.0.0",
4041
"common-tags": "^1.8.0",
41-
"eslint": "^7.17.0",
42-
"eslint-plugin-fp-ts": "^0.1.8",
42+
"eslint": "^8.0.0",
43+
"eslint-plugin-fp-ts": "link:./lib",
4344
"jest": "^26.6.3",
4445
"rimraf": "^3.0.2",
4546
"ts-jest": "^26.4.4",

src/rules/no-discarded-pure-expression.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ export default createRule({
1212
name: "no-discarded-pure-expression",
1313
meta: {
1414
type: "problem",
15+
hasSuggestions: true,
1516
schema: [],
1617
docs: {
17-
category: "Possible Errors",
1818
description:
1919
"Detects pure expressions that do nothing because they're in statement position",
2020
recommended: "error",

src/rules/no-lib-imports.ts

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export default createRule({
77
type: "problem",
88
fixable: "code",
99
docs: {
10-
category: "Possible Errors",
1110
description: "Disallow imports from 'fp-ts/lib'",
1211
recommended: "error",
1312
},

src/rules/no-module-imports.ts

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export default createRule<Options, MessageIds>({
2222
type: "problem",
2323
fixable: "code",
2424
docs: {
25-
category: "Best Practices",
2625
description:
2726
"Disallow imports from fp-ts modules, such as `fp-ts/Option`",
2827
recommended: "error",

src/rules/no-pipeable.ts

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ export default createRule({
88
fixable: "code",
99
schema: [],
1010
docs: {
11-
category: "Possible Errors",
1211
description: "Disallow imports from the 'pipeable' module",
1312
recommended: "error",
1413
},

src/rules/no-redundant-flow.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ export default createRule({
55
meta: {
66
type: "suggestion",
77
fixable: "code",
8+
hasSuggestions: true,
89
schema: [],
910
docs: {
10-
category: "Best Practices",
1111
description: "Remove redundant uses of flow",
1212
recommended: "warn",
1313
},

src/rules/prefer-bimap.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ export default createRule({
1818
meta: {
1919
type: "suggestion",
2020
fixable: "code",
21+
hasSuggestions: true,
2122
schema: [],
2223
docs: {
23-
category: "Best Practices",
2424
description: "Replace map + mapLeft with bimap",
2525
recommended: "warn",
2626
},

src/rules/prefer-chain.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ export default createRule({
1313
meta: {
1414
type: "suggestion",
1515
fixable: "code",
16+
hasSuggestions: true,
1617
schema: [],
1718
docs: {
18-
category: "Best Practices",
1919
description: "Replace map + flatten with chain",
2020
recommended: "warn",
2121
},

src/rules/prefer-traverse.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ export default createRule({
1717
meta: {
1818
type: "suggestion",
1919
fixable: "code",
20+
hasSuggestions: true,
2021
schema: [],
2122
docs: {
22-
category: "Best Practices",
2323
description: "Replace map + sequence with traverse",
2424
recommended: "warn",
2525
},

0 commit comments

Comments
 (0)