@clipboard-health/eslint-config 3.0.15 → 3.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/package.json +1 -1
- package/src/index.d.ts +21 -5
- package/src/index.d.ts.map +1 -1
- package/src/index.js +24 -2
- package/src/index.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [3.0.16](https://github.com/ClipboardHealth/cbh-core/compare/eslint-config-3.0.15...eslint-config-3.0.16) (2024-04-09)
|
|
6
|
+
|
|
5
7
|
## [3.0.15](https://github.com/ClipboardHealth/cbh-core/compare/eslint-config-3.0.14...eslint-config-3.0.15) (2024-03-07)
|
|
6
8
|
|
|
7
9
|
## [3.0.14](https://github.com/ClipboardHealth/cbh-core/compare/eslint-config-3.0.13...eslint-config-3.0.14) (2023-11-09)
|
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -7,6 +7,12 @@ export declare namespace parserOptions {
|
|
|
7
7
|
}
|
|
8
8
|
export declare let plugins: string[];
|
|
9
9
|
export declare let rules: {
|
|
10
|
+
/**
|
|
11
|
+
* Disable the capitalization of comments
|
|
12
|
+
* It makes code "not build" when just commented temporarily, which we've
|
|
13
|
+
* found to add more friction than the value from having consistent capitalization.
|
|
14
|
+
*/
|
|
15
|
+
"capitalized-comments": string;
|
|
10
16
|
"@typescript-eslint/consistent-type-definitions": string[];
|
|
11
17
|
"@typescript-eslint/naming-convention": string;
|
|
12
18
|
"security/detect-object-injection": string;
|
|
@@ -15,9 +21,6 @@ export declare let rules: {
|
|
|
15
21
|
})[];
|
|
16
22
|
"no-return-await": string;
|
|
17
23
|
"@typescript-eslint/return-await": string[];
|
|
18
|
-
"capitalized-comments": (string | {
|
|
19
|
-
ignorePattern: string;
|
|
20
|
-
})[];
|
|
21
24
|
curly: string[];
|
|
22
25
|
"class-methods-use-this": string;
|
|
23
26
|
"import/extensions": string;
|
|
@@ -51,13 +54,26 @@ export declare let rules: {
|
|
|
51
54
|
})[];
|
|
52
55
|
"no-underscore-dangle": string;
|
|
53
56
|
};
|
|
54
|
-
export declare let overrides: {
|
|
57
|
+
export declare let overrides: ({
|
|
55
58
|
files: string[];
|
|
56
59
|
rules: {
|
|
57
60
|
"@typescript-eslint/no-unsafe-assignment": string;
|
|
58
61
|
"sonarjs/no-duplicate-string": string;
|
|
62
|
+
"@typescript-eslint/ban-types"?: never;
|
|
63
|
+
};
|
|
64
|
+
} | {
|
|
65
|
+
files: string[];
|
|
66
|
+
rules: {
|
|
67
|
+
"@typescript-eslint/ban-types": (string | {
|
|
68
|
+
extendDefaults: boolean;
|
|
69
|
+
types: {
|
|
70
|
+
null: boolean;
|
|
71
|
+
};
|
|
72
|
+
})[];
|
|
73
|
+
"@typescript-eslint/no-unsafe-assignment"?: never;
|
|
74
|
+
"sonarjs/no-duplicate-string"?: never;
|
|
59
75
|
};
|
|
60
|
-
}[];
|
|
76
|
+
})[];
|
|
61
77
|
export declare namespace settings {
|
|
62
78
|
namespace node {
|
|
63
79
|
let version: string;
|
package/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/eslint-config/src/index.js"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/eslint-config/src/index.js"],"names":[],"mappings":";;;;;;;;;IAuBI;;;;OAIG"}
|
package/src/index.js
CHANGED
|
@@ -22,6 +22,12 @@ module.exports = {
|
|
|
22
22
|
},
|
|
23
23
|
plugins: ["jest", "no-only-tests", "simple-import-sort", "sonarjs"],
|
|
24
24
|
rules: {
|
|
25
|
+
/**
|
|
26
|
+
* Disable the capitalization of comments
|
|
27
|
+
* It makes code "not build" when just commented temporarily, which we've
|
|
28
|
+
* found to add more friction than the value from having consistent capitalization.
|
|
29
|
+
*/
|
|
30
|
+
"capitalized-comments": "off",
|
|
25
31
|
// See https://github.com/microsoft/TypeScript/wiki/Performance#preferring-interfaces-over-intersections
|
|
26
32
|
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
|
|
27
33
|
// Too many false positives
|
|
@@ -33,8 +39,6 @@ module.exports = {
|
|
|
33
39
|
// `no-return-await` states "This can make debugging more difficult."
|
|
34
40
|
"no-return-await": "off",
|
|
35
41
|
"@typescript-eslint/return-await": ["error", "always"],
|
|
36
|
-
// Ignore `sonar-disable`/`sonar-enable` comments
|
|
37
|
-
"capitalized-comments": ["error", "always", { ignorePattern: "sonar" }],
|
|
38
42
|
// Prevent bugs
|
|
39
43
|
curly: ["error", "all"],
|
|
40
44
|
// Recommends using static fields instead of moving to a function
|
|
@@ -115,6 +119,24 @@ module.exports = {
|
|
|
115
119
|
"sonarjs/no-duplicate-string": "off",
|
|
116
120
|
},
|
|
117
121
|
},
|
|
122
|
+
/**
|
|
123
|
+
* Exclude *.dto.ts, null is needed for PATCH endpoints to differentiate empty from optional fields
|
|
124
|
+
* Exclude *.repository.ts, null is needed for our ORMs (prisma and mongoose)
|
|
125
|
+
*/
|
|
126
|
+
{
|
|
127
|
+
files: ["**/*.dto.ts", "**/*.repository.ts"],
|
|
128
|
+
rules: {
|
|
129
|
+
"@typescript-eslint/ban-types": [
|
|
130
|
+
"error",
|
|
131
|
+
{
|
|
132
|
+
extendDefaults: true,
|
|
133
|
+
types: {
|
|
134
|
+
null: false,
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
},
|
|
139
|
+
},
|
|
118
140
|
],
|
|
119
141
|
settings: { node: { version: ">=18.15.0" } },
|
|
120
142
|
};
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/eslint-config/src/index.js"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,GAAG;IACf,OAAO,EAAE;QACP,aAAa;QACb,oCAAoC;QACpC,yBAAyB;QACzB,mBAAmB;QACnB,2BAA2B;QAC3B,sBAAsB;QACtB,yCAAyC;QACzC,6BAA6B;QAC7B,4BAA4B;QAC5B,4BAA4B;QAC5B,UAAU;QACV,IAAI;QACJ,qBAAqB;KACtB;IACD,MAAM,EAAE,2BAA2B;IACnC,aAAa,EAAE;QACb,OAAO,EAAE,CAAC,eAAe,CAAC;QAC1B,eAAe,EAAE,SAAS;KAC3B;IACD,OAAO,EAAE,CAAC,MAAM,EAAE,eAAe,EAAE,oBAAoB,EAAE,SAAS,CAAC;IACnE,KAAK,EAAE;QACL,wGAAwG;QACxG,gDAAgD,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC;QAExE,2BAA2B;QAC3B,sCAAsC,EAAE,KAAK;QAC7C,kCAAkC,EAAE,KAAK;QAEzC,oDAAoD;QACpD,mCAAmC,EAAE,CAAC,MAAM,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;QAE1E,6EAA6E;QAC7E,qEAAqE;QACrE,iBAAiB,EAAE,KAAK;QACxB,iCAAiC,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;QAEtD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/eslint-config/src/index.js"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,GAAG;IACf,OAAO,EAAE;QACP,aAAa;QACb,oCAAoC;QACpC,yBAAyB;QACzB,mBAAmB;QACnB,2BAA2B;QAC3B,sBAAsB;QACtB,yCAAyC;QACzC,6BAA6B;QAC7B,4BAA4B;QAC5B,4BAA4B;QAC5B,UAAU;QACV,IAAI;QACJ,qBAAqB;KACtB;IACD,MAAM,EAAE,2BAA2B;IACnC,aAAa,EAAE;QACb,OAAO,EAAE,CAAC,eAAe,CAAC;QAC1B,eAAe,EAAE,SAAS;KAC3B;IACD,OAAO,EAAE,CAAC,MAA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