@clipboard-health/eslint-config 3.0.14 → 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 +4 -0
- package/package.json +3 -3
- package/src/index.d.ts +21 -5
- package/src/index.d.ts.map +1 -1
- package/src/index.js +24 -3
- package/src/index.js.map +1 -1
- package/src/react.js +0 -1
- package/src/react.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
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
|
+
|
|
7
|
+
## [3.0.15](https://github.com/ClipboardHealth/cbh-core/compare/eslint-config-3.0.14...eslint-config-3.0.15) (2024-03-07)
|
|
8
|
+
|
|
5
9
|
## [3.0.14](https://github.com/ClipboardHealth/cbh-core/compare/eslint-config-3.0.13...eslint-config-3.0.14) (2023-11-09)
|
|
6
10
|
|
|
7
11
|
## [3.0.13](https://github.com/ClipboardHealth/cbh-core/compare/eslint-config-3.0.12...eslint-config-3.0.13) (2023-08-17)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clipboard-health/eslint-config",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.16",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "nx build eslint-config",
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"test": "nx test eslint-config"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"@typescript-eslint/eslint-plugin": "^5",
|
|
12
|
-
"@typescript-eslint/parser": "^5",
|
|
11
|
+
"@typescript-eslint/eslint-plugin": "^5 || ^7.0.0",
|
|
12
|
+
"@typescript-eslint/parser": "^5 || ^7.0.0",
|
|
13
13
|
"eslint": ">= 8",
|
|
14
14
|
"eslint-config-airbnb-base": ">= 15",
|
|
15
15
|
"eslint-config-prettier": ">= 6",
|
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
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
2
|
module.exports = {
|
|
4
3
|
extends: [
|
|
5
4
|
"airbnb-base",
|
|
@@ -23,6 +22,12 @@ module.exports = {
|
|
|
23
22
|
},
|
|
24
23
|
plugins: ["jest", "no-only-tests", "simple-import-sort", "sonarjs"],
|
|
25
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",
|
|
26
31
|
// See https://github.com/microsoft/TypeScript/wiki/Performance#preferring-interfaces-over-intersections
|
|
27
32
|
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
|
|
28
33
|
// Too many false positives
|
|
@@ -34,8 +39,6 @@ module.exports = {
|
|
|
34
39
|
// `no-return-await` states "This can make debugging more difficult."
|
|
35
40
|
"no-return-await": "off",
|
|
36
41
|
"@typescript-eslint/return-await": ["error", "always"],
|
|
37
|
-
// Ignore `sonar-disable`/`sonar-enable` comments
|
|
38
|
-
"capitalized-comments": ["error", "always", { ignorePattern: "sonar" }],
|
|
39
42
|
// Prevent bugs
|
|
40
43
|
curly: ["error", "all"],
|
|
41
44
|
// Recommends using static fields instead of moving to a function
|
|
@@ -116,6 +119,24 @@ module.exports = {
|
|
|
116
119
|
"sonarjs/no-duplicate-string": "off",
|
|
117
120
|
},
|
|
118
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
|
+
},
|
|
119
140
|
],
|
|
120
141
|
settings: { node: { version: ">=18.15.0" } },
|
|
121
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":"
|
|
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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
|
-
{"version":3,"file":"react.js","sourceRoot":"","sources":["../../../../packages/eslint-config/src/react.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"react.js","sourceRoot":"","sources":["../../../../packages/eslint-config/src/react.js"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,GAAG;IACf,OAAO,EAAE,CAAC,SAAS,EAAE,gBAAgB,CAAC;IACtC,aAAa,EAAE;QACb,OAAO,EAAE,CAAC,eAAe,CAAC;QAC1B,eAAe,EAAE,SAAS;KAC3B;CACF,CAAC"}
|