@clipboard-health/eslint-config 0.0.1

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 ADDED
@@ -0,0 +1,113 @@
1
+ # Changelog
2
+
3
+ This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
+
5
+ ## 0.0.1 (2023-03-29)
6
+
7
+
8
+ ### Features
9
+
10
+ * add ngx-deploy-npm and @jscutlery/semver to version, release, and publish ([5ebdef7](https://github.com/ClipboardHealth/cbh-core/commit/5ebdef71af9f7dda08d33ec300240f3cd1a16ee9))
11
+ * add sharable renovate config ([2adfa3d](https://github.com/ClipboardHealth/cbh-core/commit/2adfa3d72bcf0443e69ff2f9861dc02b13009070))
12
+ * initial commit ([162d9e7](https://github.com/ClipboardHealth/cbh-core/commit/162d9e74a6587c9bbe9c7a8003c4b7baf5c53fe7))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * add noVerify ([8f08c45](https://github.com/ClipboardHealth/cbh-core/commit/8f08c458eda7dfd2e1d471b2a8740dcf4264242f))
18
+ * boolean for dryRun ([6619256](https://github.com/ClipboardHealth/cbh-core/commit/66192563f99bfe8fc27767e4ca4b53ad10b642f4))
19
+ * eslint config ([bce3458](https://github.com/ClipboardHealth/cbh-core/commit/bce34581d3e15a8feae390b6e48eb050b75b8638))
20
+ * github push ([47857e5](https://github.com/ClipboardHealth/cbh-core/commit/47857e51ff6949157d1de25440050743f3d256d5))
21
+
22
+ ## 0.1.0 (2023-03-29)
23
+
24
+ ### Features
25
+
26
+ - add ngx-deploy-npm and @jscutlery/semver to version, release, and publish ([5ebdef7](https://github.com/ClipboardHealth/cbh-core/commit/5ebdef71af9f7dda08d33ec300240f3cd1a16ee9))
27
+ - add sharable renovate config ([2adfa3d](https://github.com/ClipboardHealth/cbh-core/commit/2adfa3d72bcf0443e69ff2f9861dc02b13009070))
28
+ - initial commit ([162d9e7](https://github.com/ClipboardHealth/cbh-core/commit/162d9e74a6587c9bbe9c7a8003c4b7baf5c53fe7))
29
+
30
+ ### Bug Fixes
31
+
32
+ - add noVerify ([8f08c45](https://github.com/ClipboardHealth/cbh-core/commit/8f08c458eda7dfd2e1d471b2a8740dcf4264242f))
33
+ - boolean for dryRun ([6619256](https://github.com/ClipboardHealth/cbh-core/commit/66192563f99bfe8fc27767e4ca4b53ad10b642f4))
34
+ - eslint config ([bce3458](https://github.com/ClipboardHealth/cbh-core/commit/bce34581d3e15a8feae390b6e48eb050b75b8638))
35
+ - github push ([47857e5](https://github.com/ClipboardHealth/cbh-core/commit/47857e51ff6949157d1de25440050743f3d256d5))
36
+
37
+ ## 0.1.0 (2023-03-29)
38
+
39
+ ### Features
40
+
41
+ - add ngx-deploy-npm and @jscutlery/semver to version, release, and publish ([5ebdef7](https://github.com/ClipboardHealth/cbh-core/commit/5ebdef71af9f7dda08d33ec300240f3cd1a16ee9))
42
+ - add sharable renovate config ([2adfa3d](https://github.com/ClipboardHealth/cbh-core/commit/2adfa3d72bcf0443e69ff2f9861dc02b13009070))
43
+ - initial commit ([162d9e7](https://github.com/ClipboardHealth/cbh-core/commit/162d9e74a6587c9bbe9c7a8003c4b7baf5c53fe7))
44
+
45
+ ### Bug Fixes
46
+
47
+ - add noVerify ([8f08c45](https://github.com/ClipboardHealth/cbh-core/commit/8f08c458eda7dfd2e1d471b2a8740dcf4264242f))
48
+ - eslint config ([bce3458](https://github.com/ClipboardHealth/cbh-core/commit/bce34581d3e15a8feae390b6e48eb050b75b8638))
49
+
50
+ ## 0.1.0 (2023-03-29)
51
+
52
+ ### Features
53
+
54
+ - add ngx-deploy-npm and @jscutlery/semver to version, release, and publish ([5ebdef7](https://github.com/ClipboardHealth/cbh-core/commit/5ebdef71af9f7dda08d33ec300240f3cd1a16ee9))
55
+ - add sharable renovate config ([2adfa3d](https://github.com/ClipboardHealth/cbh-core/commit/2adfa3d72bcf0443e69ff2f9861dc02b13009070))
56
+ - initial commit ([162d9e7](https://github.com/ClipboardHealth/cbh-core/commit/162d9e74a6587c9bbe9c7a8003c4b7baf5c53fe7))
57
+
58
+ ### Bug Fixes
59
+
60
+ - add noVerify ([8f08c45](https://github.com/ClipboardHealth/cbh-core/commit/8f08c458eda7dfd2e1d471b2a8740dcf4264242f))
61
+ - eslint config ([bce3458](https://github.com/ClipboardHealth/cbh-core/commit/bce34581d3e15a8feae390b6e48eb050b75b8638))
62
+
63
+ ## 0.1.0 (2023-03-29)
64
+
65
+ ### Features
66
+
67
+ - add ngx-deploy-npm and @jscutlery/semver to version, release, and publish ([5ebdef7](https://github.com/ClipboardHealth/cbh-core/commit/5ebdef71af9f7dda08d33ec300240f3cd1a16ee9))
68
+ - add sharable renovate config ([2adfa3d](https://github.com/ClipboardHealth/cbh-core/commit/2adfa3d72bcf0443e69ff2f9861dc02b13009070))
69
+ - initial commit ([162d9e7](https://github.com/ClipboardHealth/cbh-core/commit/162d9e74a6587c9bbe9c7a8003c4b7baf5c53fe7))
70
+
71
+ ### Bug Fixes
72
+
73
+ - add noVerify ([8f08c45](https://github.com/ClipboardHealth/cbh-core/commit/8f08c458eda7dfd2e1d471b2a8740dcf4264242f))
74
+ - eslint config ([bce3458](https://github.com/ClipboardHealth/cbh-core/commit/bce34581d3e15a8feae390b6e48eb050b75b8638))
75
+
76
+ ## 0.1.0 (2023-03-29)
77
+
78
+ ### Features
79
+
80
+ - add ngx-deploy-npm and @jscutlery/semver to version, release, and publish ([5ebdef7](https://github.com/ClipboardHealth/cbh-core/commit/5ebdef71af9f7dda08d33ec300240f3cd1a16ee9))
81
+ - add sharable renovate config ([2adfa3d](https://github.com/ClipboardHealth/cbh-core/commit/2adfa3d72bcf0443e69ff2f9861dc02b13009070))
82
+ - initial commit ([162d9e7](https://github.com/ClipboardHealth/cbh-core/commit/162d9e74a6587c9bbe9c7a8003c4b7baf5c53fe7))
83
+
84
+ ### Bug Fixes
85
+
86
+ - add noVerify ([8f08c45](https://github.com/ClipboardHealth/cbh-core/commit/8f08c458eda7dfd2e1d471b2a8740dcf4264242f))
87
+ - eslint config ([bce3458](https://github.com/ClipboardHealth/cbh-core/commit/bce34581d3e15a8feae390b6e48eb050b75b8638))
88
+
89
+ ## 0.1.0 (2023-03-29)
90
+
91
+ ### Features
92
+
93
+ - add ngx-deploy-npm and @jscutlery/semver to version, release, and publish ([5ebdef7](https://github.com/ClipboardHealth/cbh-core/commit/5ebdef71af9f7dda08d33ec300240f3cd1a16ee9))
94
+ - add sharable renovate config ([2adfa3d](https://github.com/ClipboardHealth/cbh-core/commit/2adfa3d72bcf0443e69ff2f9861dc02b13009070))
95
+ - initial commit ([162d9e7](https://github.com/ClipboardHealth/cbh-core/commit/162d9e74a6587c9bbe9c7a8003c4b7baf5c53fe7))
96
+
97
+ ### Bug Fixes
98
+
99
+ - add noVerify ([8f08c45](https://github.com/ClipboardHealth/cbh-core/commit/8f08c458eda7dfd2e1d471b2a8740dcf4264242f))
100
+ - eslint config ([bce3458](https://github.com/ClipboardHealth/cbh-core/commit/bce34581d3e15a8feae390b6e48eb050b75b8638))
101
+
102
+ ## 0.1.0 (2023-03-29)
103
+
104
+ ### Features
105
+
106
+ - add ngx-deploy-npm and @jscutlery/semver to version, release, and publish ([5ebdef7](https://github.com/ClipboardHealth/cbh-core/commit/5ebdef71af9f7dda08d33ec300240f3cd1a16ee9))
107
+ - add sharable renovate config ([2adfa3d](https://github.com/ClipboardHealth/cbh-core/commit/2adfa3d72bcf0443e69ff2f9861dc02b13009070))
108
+ - initial commit ([162d9e7](https://github.com/ClipboardHealth/cbh-core/commit/162d9e74a6587c9bbe9c7a8003c4b7baf5c53fe7))
109
+
110
+ ### Bug Fixes
111
+
112
+ - add noVerify ([8f08c45](https://github.com/ClipboardHealth/cbh-core/commit/8f08c458eda7dfd2e1d471b2a8740dcf4264242f))
113
+ - eslint config ([bce3458](https://github.com/ClipboardHealth/cbh-core/commit/bce34581d3e15a8feae390b6e48eb050b75b8638))
package/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # eslint-config
2
+
3
+ Clipboard Health's [ESLint](https://eslint.org/) configuration.
4
+
5
+ [![Standard README compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg)](https://github.com/RichardLitt/standard-readme)
6
+
7
+ ## Table of Contents
8
+
9
+ - [Usage](#usage)
10
+ - [Common commands](#common-commands)
11
+
12
+ ## Usage
13
+
14
+ ### Common commands
15
+
16
+ **Note**: See `package.json` `scripts` for a full list of commands.
17
+
18
+ ```bash
19
+ # Build
20
+ npm run build
21
+
22
+ # Lint
23
+ npm run lint
24
+
25
+ # Test
26
+ npm run test
27
+ ```
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "@clipboard-health/eslint-config",
3
+ "version": "0.0.1",
4
+ "type": "commonjs",
5
+ "main": "./src/index.js",
6
+ "keywords": [
7
+ "eslint",
8
+ "eslintconfig"
9
+ ],
10
+ "peerDependencies": {
11
+ "@typescript-eslint/eslint-plugin": ">= 5",
12
+ "eslint": ">= 8",
13
+ "eslint-plugin-simple-import-sort": ">= 10",
14
+ "tslib": "2.5.0"
15
+ },
16
+ "scripts": {
17
+ "build": "nx build eslint-config",
18
+ "clean": "nx clean eslint-config",
19
+ "lint": "nx lint eslint-config",
20
+ "test": "nx test eslint-config"
21
+ },
22
+ "types": "./src/index.d.ts"
23
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,213 @@
1
+ export declare const parser: string;
2
+ export declare namespace parserOptions {
3
+ const project: string[];
4
+ const sourceType: string;
5
+ const tsconfigRootDir: string;
6
+ }
7
+ export declare const plugins: string[];
8
+ declare const _extends: string[];
9
+ export { _extends as extends };
10
+ export declare const root: boolean;
11
+ export declare namespace env {
12
+ const es2021: boolean;
13
+ const node: boolean;
14
+ const jest: boolean;
15
+ }
16
+ export declare const ignorePatterns: string[];
17
+ export declare const rules: {
18
+ "prefer-const": (string | {
19
+ destructuring: string;
20
+ })[];
21
+ "func-style": (string | {
22
+ allowArrowFunctions: boolean;
23
+ })[];
24
+ "sort-imports": string;
25
+ "simple-import-sort/imports": string;
26
+ "simple-import-sort/exports": string;
27
+ "@typescript-eslint/array-type": (string | {
28
+ default: string;
29
+ })[];
30
+ "@typescript-eslint/consistent-indexed-object-style": string[];
31
+ "@typescript-eslint/consistent-type-assertions": (string | {
32
+ assertionStyle: string;
33
+ })[];
34
+ "@typescript-eslint/explicit-module-boundary-types": (string | {
35
+ allowArgumentsExplicitlyTypedAsAny: boolean;
36
+ })[];
37
+ "@typescript-eslint/no-invalid-void-type": string;
38
+ "@typescript-eslint/no-explicit-any": string;
39
+ "@typescript-eslint/no-floating-promises": string;
40
+ "@typescript-eslint/no-meaningless-void-operator": string;
41
+ "@typescript-eslint/no-require-imports": string;
42
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": string;
43
+ "@typescript-eslint/no-var-requires": string;
44
+ "@typescript-eslint/prefer-enum-initializers": string;
45
+ "@typescript-eslint/prefer-for-of": string;
46
+ "@typescript-eslint/prefer-includes": string;
47
+ "@typescript-eslint/prefer-literal-enum-member": string;
48
+ "@typescript-eslint/prefer-nullish-coalescing": string;
49
+ "@typescript-eslint/prefer-optional-chain": string;
50
+ "@typescript-eslint/prefer-return-this-type": string;
51
+ "@typescript-eslint/prefer-string-starts-ends-with": string;
52
+ "@typescript-eslint/prefer-ts-expect-error": string;
53
+ "@typescript-eslint/switch-exhaustiveness-check": string;
54
+ "@typescript-eslint/unified-signatures": string;
55
+ "@typescript-eslint/no-throw-literal": string;
56
+ "@typescript-eslint/no-unused-vars": (string | {
57
+ ignoreRestSiblings: boolean;
58
+ varsIgnorePattern: string;
59
+ args: string;
60
+ argsIgnorePattern: string;
61
+ })[];
62
+ "array-callback-return": (string | {
63
+ allowImplicit: boolean;
64
+ checkForEach: boolean;
65
+ })[];
66
+ "no-var": string;
67
+ "@typescript-eslint/naming-convention": (string | {
68
+ selector: string;
69
+ format: string[];
70
+ modifiers?: never;
71
+ leadingUnderscore?: never;
72
+ } | {
73
+ selector: string[];
74
+ modifiers: string[];
75
+ format: null;
76
+ leadingUnderscore?: never;
77
+ } | {
78
+ selector: string;
79
+ modifiers: string[];
80
+ format: string[];
81
+ leadingUnderscore?: never;
82
+ } | {
83
+ selector: string[];
84
+ format: string[];
85
+ leadingUnderscore: string;
86
+ modifiers?: never;
87
+ } | {
88
+ selector: string[];
89
+ format: string[];
90
+ modifiers?: never;
91
+ leadingUnderscore?: never;
92
+ } | {
93
+ selector: string;
94
+ format: null;
95
+ modifiers?: never;
96
+ leadingUnderscore?: never;
97
+ } | {
98
+ selector: string[];
99
+ modifiers: string[];
100
+ leadingUnderscore: string;
101
+ format: null;
102
+ })[];
103
+ "consistent-return": string;
104
+ "default-case-last": string;
105
+ "@typescript-eslint/default-param-last": string;
106
+ "@typescript-eslint/dot-notation": (string | {
107
+ allowKeywords: boolean;
108
+ })[];
109
+ eqeqeq: string[];
110
+ "grouped-accessor-pairs": string;
111
+ "@typescript-eslint/lines-between-class-members": (string | {
112
+ exceptAfterSingleLine: boolean;
113
+ })[];
114
+ "new-cap": (string | {
115
+ newIsCap: boolean;
116
+ capIsNew: boolean;
117
+ })[];
118
+ "no-alert": string;
119
+ "no-console": string;
120
+ "no-bitwise": string;
121
+ "no-constructor-return": string;
122
+ "no-eval": string;
123
+ "@typescript-eslint/no-implied-eval": string;
124
+ "no-lone-blocks": string;
125
+ "@typescript-eslint/no-loop-func": string;
126
+ "no-multi-assign": string;
127
+ "no-multi-str": string;
128
+ "no-new": string;
129
+ "no-new-func": string;
130
+ "no-new-object": string;
131
+ "no-new-require": string;
132
+ "no-new-wrappers": string;
133
+ "no-octal-escape": string;
134
+ "no-param-reassign": (string | {
135
+ props: boolean;
136
+ })[];
137
+ "no-restricted-globals": (string | {
138
+ name: string;
139
+ message: string;
140
+ })[];
141
+ "no-proto": string;
142
+ "no-extend-native": string;
143
+ "no-extra-label": string;
144
+ "no-iterator": string;
145
+ "no-label-var": string;
146
+ "no-script-url": string;
147
+ "no-sequences": string;
148
+ "no-restricted-properties": (string | {
149
+ object: string;
150
+ property: string;
151
+ message: string;
152
+ } | {
153
+ property: string;
154
+ message: string;
155
+ object?: never;
156
+ })[];
157
+ "no-self-compare": string;
158
+ "@typescript-eslint/no-shadow": string[];
159
+ "no-template-curly-in-string": string;
160
+ "no-undef-init": string;
161
+ "no-unneeded-ternary": (string | {
162
+ defaultAssignment: boolean;
163
+ })[];
164
+ "no-unreachable-loop": string[];
165
+ "@typescript-eslint/no-unused-expressions": string[];
166
+ "no-useless-computed-key": string;
167
+ "no-useless-concat": string;
168
+ "@typescript-eslint/no-useless-constructor": string;
169
+ "no-useless-rename": string[];
170
+ "no-useless-return": string;
171
+ "no-void": string;
172
+ "object-shorthand": (string | {
173
+ avoidQuotes: boolean;
174
+ })[];
175
+ "operator-assignment": string[];
176
+ "prefer-arrow-callback": string[];
177
+ "prefer-destructuring": (string | {
178
+ VariableDeclarator: {
179
+ array: boolean;
180
+ object: boolean;
181
+ };
182
+ })[];
183
+ "prefer-exponentiation-operator": string;
184
+ "prefer-numeric-literals": string;
185
+ "prefer-object-spread": string;
186
+ "prefer-promise-reject-errors": (string | {
187
+ allowEmptyReject: boolean;
188
+ })[];
189
+ "prefer-regex-literals": (string | {
190
+ disallowRedundantWrapping: boolean;
191
+ })[];
192
+ "prefer-template": string;
193
+ "spaced-comment": (string | {
194
+ line: {
195
+ exceptions: string[];
196
+ markers: string[];
197
+ };
198
+ block: {
199
+ exceptions: string[];
200
+ markers: string[];
201
+ balanced: boolean;
202
+ };
203
+ })[];
204
+ strict: string[];
205
+ "symbol-description": string;
206
+ yoda: string[];
207
+ };
208
+ export declare const overrides: {
209
+ files: string[];
210
+ rules: {
211
+ "@typescript-eslint/explicit-module-boundary-types": string;
212
+ };
213
+ }[];
package/src/index.js ADDED
@@ -0,0 +1,329 @@
1
+ "use strict";
2
+ module.exports = {
3
+ parser: "@typescript-eslint/parser",
4
+ parserOptions: {
5
+ project: ["tsconfig.json"],
6
+ sourceType: "module",
7
+ tsconfigRootDir: __dirname,
8
+ },
9
+ plugins: ["@typescript-eslint/eslint-plugin", "simple-import-sort"],
10
+ extends: [
11
+ "eslint:recommended",
12
+ "plugin:@typescript-eslint/recommended",
13
+ "prettier",
14
+ ],
15
+ root: true,
16
+ env: {
17
+ es2021: true,
18
+ node: true,
19
+ jest: true,
20
+ },
21
+ ignorePatterns: [".eslintrc.js"],
22
+ rules: {
23
+ "prefer-const": [
24
+ "warn",
25
+ {
26
+ destructuring: "all",
27
+ },
28
+ ],
29
+ "func-style": [
30
+ "warn",
31
+ "declaration",
32
+ {
33
+ allowArrowFunctions: true,
34
+ },
35
+ ],
36
+ "sort-imports": "off",
37
+ "simple-import-sort/imports": "warn",
38
+ "simple-import-sort/exports": "warn",
39
+ "@typescript-eslint/array-type": [
40
+ "warn",
41
+ {
42
+ default: "array-simple",
43
+ },
44
+ ],
45
+ "@typescript-eslint/consistent-indexed-object-style": ["warn", "record"],
46
+ "@typescript-eslint/consistent-type-assertions": [
47
+ "warn",
48
+ {
49
+ assertionStyle: "never",
50
+ },
51
+ ],
52
+ // enabled by default - you can and should override this in overrides below
53
+ "@typescript-eslint/explicit-module-boundary-types": [
54
+ "warn",
55
+ // We already have 'no-explicit-any' on - no need to enforce it again
56
+ { allowArgumentsExplicitlyTypedAsAny: true },
57
+ ],
58
+ "@typescript-eslint/no-invalid-void-type": "warn",
59
+ "@typescript-eslint/no-explicit-any": "warn",
60
+ "@typescript-eslint/no-floating-promises": "warn",
61
+ "@typescript-eslint/no-meaningless-void-operator": "warn",
62
+ "@typescript-eslint/no-require-imports": "warn",
63
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": "warn",
64
+ "@typescript-eslint/no-var-requires": "off",
65
+ "@typescript-eslint/prefer-enum-initializers": "warn",
66
+ "@typescript-eslint/prefer-for-of": "warn",
67
+ "@typescript-eslint/prefer-includes": "warn",
68
+ "@typescript-eslint/prefer-literal-enum-member": "warn",
69
+ "@typescript-eslint/prefer-nullish-coalescing": "warn",
70
+ "@typescript-eslint/prefer-optional-chain": "warn",
71
+ "@typescript-eslint/prefer-return-this-type": "error",
72
+ "@typescript-eslint/prefer-string-starts-ends-with": "warn",
73
+ "@typescript-eslint/prefer-ts-expect-error": "warn",
74
+ "@typescript-eslint/switch-exhaustiveness-check": "warn",
75
+ "@typescript-eslint/unified-signatures": "warn",
76
+ "@typescript-eslint/no-throw-literal": "warn",
77
+ "@typescript-eslint/no-unused-vars": [
78
+ "warn",
79
+ {
80
+ ignoreRestSiblings: true,
81
+ varsIgnorePattern: "(^_)",
82
+ args: "all",
83
+ argsIgnorePattern: "(^_)",
84
+ },
85
+ ],
86
+ "array-callback-return": [
87
+ "error",
88
+ {
89
+ allowImplicit: true,
90
+ checkForEach: false,
91
+ },
92
+ ],
93
+ "no-var": "warn",
94
+ "@typescript-eslint/naming-convention": [
95
+ "warn",
96
+ {
97
+ selector: "default",
98
+ format: ["camelCase"],
99
+ },
100
+ // Ignore destructured variables
101
+ {
102
+ selector: ["variable", "parameter"],
103
+ modifiers: ["destructured"],
104
+ format: null,
105
+ },
106
+ // Additional cases for constants, enums
107
+ {
108
+ selector: "variable",
109
+ modifiers: ["const"],
110
+ format: ["camelCase", "UPPER_CASE", "PascalCase"],
111
+ },
112
+ {
113
+ selector: "enum",
114
+ format: ["PascalCase", "UPPER_CASE"],
115
+ },
116
+ {
117
+ selector: ["enumMember", "typeProperty"],
118
+ format: ["camelCase", "PascalCase", "UPPER_CASE", "snake_case"],
119
+ //
120
+ leadingUnderscore: "allow",
121
+ },
122
+ // Classes/interfaces/types
123
+ {
124
+ selector: ["class", "interface", "typeAlias", "typeParameter"],
125
+ format: ["PascalCase"],
126
+ },
127
+ // Ignore object literal props, e.g. in prisma calls
128
+ {
129
+ selector: "objectLiteralProperty",
130
+ format: null,
131
+ },
132
+ // Support unused variables
133
+ {
134
+ selector: ["variable", "parameter"],
135
+ modifiers: ["unused"],
136
+ leadingUnderscore: "allow",
137
+ format: null,
138
+ },
139
+ ],
140
+ "consistent-return": "warn",
141
+ "default-case-last": "warn",
142
+ "@typescript-eslint/default-param-last": "error",
143
+ "@typescript-eslint/dot-notation": [
144
+ "warn",
145
+ {
146
+ allowKeywords: true,
147
+ },
148
+ ],
149
+ eqeqeq: ["error", "always"],
150
+ "grouped-accessor-pairs": "warn",
151
+ "@typescript-eslint/lines-between-class-members": [
152
+ "warn",
153
+ "always",
154
+ {
155
+ exceptAfterSingleLine: true,
156
+ },
157
+ ],
158
+ "new-cap": [
159
+ "warn",
160
+ {
161
+ newIsCap: true,
162
+ capIsNew: false,
163
+ },
164
+ ],
165
+ "no-alert": "warn",
166
+ "no-console": "warn",
167
+ "no-bitwise": "warn",
168
+ "no-constructor-return": "error",
169
+ "no-eval": "error",
170
+ "@typescript-eslint/no-implied-eval": "error",
171
+ "no-lone-blocks": "warn",
172
+ "@typescript-eslint/no-loop-func": "warn",
173
+ "no-multi-assign": "warn",
174
+ "no-multi-str": "warn",
175
+ "no-new": "warn",
176
+ "no-new-func": "error",
177
+ "no-new-object": "error",
178
+ "no-new-require": "error",
179
+ "no-new-wrappers": "error",
180
+ "no-octal-escape": "error",
181
+ "no-param-reassign": [
182
+ "warn",
183
+ {
184
+ props: false,
185
+ },
186
+ ],
187
+ "no-restricted-globals": [
188
+ "warn",
189
+ {
190
+ name: "isFinite",
191
+ message: "Use Number.isFinite instead https://github.com/airbnb/javascript#standard-library--isfinite",
192
+ },
193
+ {
194
+ name: "isNaN",
195
+ message: "Use Number.isNaN instead https://github.com/airbnb/javascript#standard-library--isnan",
196
+ },
197
+ ],
198
+ "no-proto": "warn",
199
+ "no-extend-native": "warn",
200
+ "no-extra-label": "warn",
201
+ "no-iterator": "warn",
202
+ "no-label-var": "warn",
203
+ "no-script-url": "warn",
204
+ "no-sequences": "warn",
205
+ "no-restricted-properties": [
206
+ "warn",
207
+ {
208
+ object: "global",
209
+ property: "isFinite",
210
+ message: "Please use Number.isFinite instead",
211
+ },
212
+ {
213
+ object: "self",
214
+ property: "isFinite",
215
+ message: "Please use Number.isFinite instead",
216
+ },
217
+ {
218
+ object: "window",
219
+ property: "isFinite",
220
+ message: "Please use Number.isFinite instead",
221
+ },
222
+ {
223
+ object: "global",
224
+ property: "isNaN",
225
+ message: "Please use Number.isNaN instead",
226
+ },
227
+ {
228
+ object: "self",
229
+ property: "isNaN",
230
+ message: "Please use Number.isNaN instead",
231
+ },
232
+ {
233
+ object: "window",
234
+ property: "isNaN",
235
+ message: "Please use Number.isNaN instead",
236
+ },
237
+ {
238
+ property: "__defineGetter__",
239
+ message: "Please use Object.defineProperty instead.",
240
+ },
241
+ {
242
+ property: "__defineSetter__",
243
+ message: "Please use Object.defineProperty instead.",
244
+ },
245
+ ],
246
+ "no-self-compare": "error",
247
+ "@typescript-eslint/no-shadow": ["warn"],
248
+ "no-template-curly-in-string": "error",
249
+ "no-undef-init": "warn",
250
+ "no-unneeded-ternary": [
251
+ "warn",
252
+ {
253
+ defaultAssignment: false,
254
+ },
255
+ ],
256
+ "no-unreachable-loop": ["warn"],
257
+ "@typescript-eslint/no-unused-expressions": ["warn"],
258
+ "no-useless-computed-key": "warn",
259
+ "no-useless-concat": "warn",
260
+ "@typescript-eslint/no-useless-constructor": "warn",
261
+ "no-useless-rename": ["warn"],
262
+ "no-useless-return": "warn",
263
+ "no-void": "off",
264
+ "object-shorthand": [
265
+ "warn",
266
+ "always",
267
+ {
268
+ avoidQuotes: true,
269
+ },
270
+ ],
271
+ "operator-assignment": ["warn", "always"],
272
+ "prefer-arrow-callback": ["warn"],
273
+ "prefer-destructuring": [
274
+ "warn",
275
+ {
276
+ VariableDeclarator: {
277
+ array: false,
278
+ object: true,
279
+ },
280
+ },
281
+ ],
282
+ "prefer-exponentiation-operator": "warn",
283
+ "prefer-numeric-literals": "warn",
284
+ "prefer-object-spread": "error",
285
+ "prefer-promise-reject-errors": [
286
+ "warn",
287
+ {
288
+ allowEmptyReject: true,
289
+ },
290
+ ],
291
+ "prefer-regex-literals": [
292
+ "warn",
293
+ {
294
+ disallowRedundantWrapping: true,
295
+ },
296
+ ],
297
+ "prefer-template": "warn",
298
+ "spaced-comment": [
299
+ "warn",
300
+ "always",
301
+ {
302
+ line: {
303
+ exceptions: ["-", "+"],
304
+ markers: ["=", "!", "/"],
305
+ },
306
+ block: {
307
+ exceptions: ["-", "+"],
308
+ markers: ["=", "!", ":", "::"],
309
+ balanced: true,
310
+ },
311
+ },
312
+ ],
313
+ strict: ["warn", "never"],
314
+ "symbol-description": "warn",
315
+ yoda: ["warn"],
316
+ },
317
+ overrides: [
318
+ {
319
+ // prisma calls with relations can result in complex return types
320
+ // which may be cumbersome to define explicitly.
321
+ // This override allows type inference in repository files, which interact with prisma.
322
+ files: ["*.repository.ts"],
323
+ rules: {
324
+ "@typescript-eslint/explicit-module-boundary-types": "off",
325
+ },
326
+ },
327
+ ],
328
+ };
329
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/eslint-config/src/index.js"],"names":[],"mappings":";AAAA,MAAM,CAAC,OAAO,GAAG;IACf,MAAM,EAAE,2BAA2B;IACnC,aAAa,EAAE;QACb,OAAO,EAAE,CAAC,eAAe,CAAC;QAC1B,UAAU,EAAE,QAAQ;QACpB,eAAe,EAAE,SAAS;KAC3B;IACD,OAAO,EAAE,CAAC,kCAAkC,EAAE,oBAAoB,CAAC;IACnE,OAAO,EAAE;QACP,oBAAoB;QACpB,uCAAuC;QACvC,UAAU;KACX;IACD,IAAI,EAAE,IAAI;IACV,GAAG,EAAE;QACH,MAAM,EAAE,IAAI;QACZ,IAAI,EAAE,IAAI;QACV,IAAI,EAAE,IAAI;KACX;IACD,cAAc,EAAE,CAAC,cAAc,CAAC;IAChC,KAAK,EAAE;QACL,cAAc,EAAE;YACd,MAAM;YACN;gBACE,aAAa,EAAE,KAAK;aACrB;SACF;QACD,YAAY,EAAE;YACZ,MAAM;YACN,aAAa;YACb;gBACE,mBAAmB,EAAE,IAAI;aAC1B;SACF;QACD,cAAc,EAAE,KAAK;QACrB,4BAA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