Skip to content

Commit 88196bc

Browse files
feat: update script config and add test config
1 parent 3b3d586 commit 88196bc

File tree

4 files changed

+26
-11
lines changed

4 files changed

+26
-11
lines changed

package.json

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
"import": "./dist/script.mjs",
2929
"require": "./dist/script.cjs"
3030
},
31+
"./test": {
32+
"import": "./dist/test.mjs",
33+
"require": "./dist/test.cjs"
34+
},
3135
"./typescript": {
3236
"import": "./dist/typescript.mjs",
3337
"require": "./dist/typescript.cjs"

src/configs/common-overrides.ts

+4-11
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,20 @@ export default {
44
overrides: [
55
{
66
files: ["*"],
7+
extends: ["@rebeccastevens/eslint-config/script"],
78
rules: {
8-
"functional/immutable-data": "off",
99
"functional/functional-parameters": "off",
10-
"functional/no-expression-statement": "off",
10+
"functional/immutable-data": "off",
1111
"node/no-sync": "off",
1212
},
1313
},
1414
{
1515
files: ["scripts/**/*"],
16-
rules: {
17-
"functional/no-expression-statement": "off",
18-
"functional/no-throw-statement": "off",
19-
},
16+
extends: ["@rebeccastevens/eslint-config/script"],
2017
},
2118
{
2219
files: ["{test,tests}/**/*", "**/*.test.*"],
23-
rules: {
24-
"functional/functional-parameters": "off",
25-
"functional/no-expression-statement": "off",
26-
"node/no-sync": "off",
27-
},
20+
extends: ["@rebeccastevens/eslint-config/test"],
2821
},
2922
],
3023
} as Linter.Config;

src/configs/script.ts

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { Linter } from "eslint";
33
const baseConfig: Linter.Config = {
44
rules: {
55
"functional/no-conditional-statement": "off",
6+
"functional/no-expression-statement": "off",
67
"functional/no-loop-statement": "off",
78
"functional/no-throw-statement": "off",
89
},

src/configs/test.ts

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import type { Linter } from "eslint";
2+
3+
const baseConfig: Linter.Config = {
4+
extends: ["@rebeccastevens/eslint-config/script"],
5+
6+
rules: {
7+
"functional/functional-parameters": "off",
8+
"functional/immutable-data": "warn",
9+
"functional/no-conditional-statement": "warn",
10+
"functional/no-expression-statement": "off",
11+
"functional/no-loop-statement": "warn",
12+
"functional/no-throw-statement": "off",
13+
"node/no-sync": "off",
14+
},
15+
};
16+
17+
export default baseConfig;

0 commit comments

Comments
 (0)