@mservices-tech/eslint-config 2.50.5

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,19 @@
1
+ ### 2.50.5 (2026-03-19)
2
+
3
+ ### Bug Fixes
4
+
5
+ - **eslint-config:** Update selected dependencies
6
+
7
+ ### 2.50.4 (2024-08-26)
8
+
9
+ ### Bug Fixes
10
+
11
+ - Add licence
12
+
13
+ ### 2.50.3 (2024-07-03)
14
+
15
+ ### 2.50.2 (2024-07-03)
16
+
17
+ ### Bug Fixes
18
+
19
+ - **spot:** resolve issues with build script
package/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright 2024 mServices Sp. z o.o.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,28 @@
1
+ Mkanon
2
+ Asana
3
+ styleguide
4
+ mBank
5
+ Verdana
6
+ airtasker
7
+ mservicestech
8
+ Xast
9
+ classname
10
+ onpushstate
11
+ autoheight
12
+ focusring
13
+ Roboto
14
+ visualisation
15
+ Snackbars
16
+ snackbars
17
+ checkmark
18
+ WCAG
19
+ nocheck
20
+ autoresize
21
+ datepicker
22
+ swiper
23
+ Swiper
24
+ behaviour
25
+ codemods
26
+ Codemods
27
+ CODEMODS
28
+ svgr
package/index.js ADDED
@@ -0,0 +1,337 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ const eslintConfig = {
8
+ parser: '@typescript-eslint/parser',
9
+ parserOptions: {
10
+ ecmaVersion: 2020,
11
+ sourceType: 'module',
12
+ project: './tsconfig.json',
13
+ extraFileExtensions: ['.html']
14
+ },
15
+ root: true,
16
+ ignorePatterns: ['node_modules/*', 'build/*'],
17
+ env: {
18
+ es6: true
19
+ },
20
+ settings: {
21
+ 'import/resolver': {
22
+ typescript: true,
23
+ node: true
24
+ },
25
+ 'html/indent': '+2',
26
+ 'html/report-bad-indent': 'error'
27
+ },
28
+ extends: ['plugin:@typescript-eslint/recommended', 'plugin:unicorn/recommended', 'plugin:@cspell/recommended', 'plugin:import/recommended', 'plugin:import/typescript', 'plugin:promise/recommended'],
29
+ plugins: ['unicorn', 'eslint-plugin-tsdoc', 'deprecation', 'sort-destructure-keys', 'import', '@cspell', 'html', 'sort-destructure-keys', 'promise'],
30
+ rules: {
31
+ 'no-console': ['error', {
32
+ allow: ['warn', 'error']
33
+ }],
34
+ 'no-useless-constructor': 'off',
35
+ 'import/no-duplicates': 'error',
36
+ 'import/no-webpack-loader-syntax': 'off',
37
+ curly: 'error',
38
+ 'no-return-await': 'off',
39
+ '@typescript-eslint/array-type': ['error', {
40
+ default: 'generic'
41
+ }],
42
+ '@typescript-eslint/ban-ts-comment': 'error',
43
+ '@typescript-eslint/ban-tslint-comment': 'error',
44
+ '@typescript-eslint/ban-types': 'off',
45
+ '@typescript-eslint/consistent-indexed-object-style': 'off',
46
+ '@typescript-eslint/consistent-type-assertions': ['error', {
47
+ assertionStyle: 'as',
48
+ objectLiteralTypeAssertions: 'never'
49
+ }],
50
+ '@typescript-eslint/consistent-type-definitions': ['error', 'type'],
51
+ '@typescript-eslint/consistent-type-imports': ['warn', {
52
+ disallowTypeAnnotations: false
53
+ }],
54
+ '@typescript-eslint/explicit-function-return-type': 'off',
55
+ '@typescript-eslint/explicit-module-boundary-types': 'warn',
56
+ '@typescript-eslint/member-delimiter-style': 'error',
57
+ '@typescript-eslint/method-signature-style': ['error', 'property'],
58
+ '@typescript-eslint/naming-convention': ['error', {
59
+ selector: 'default',
60
+ format: null,
61
+ custom: {
62
+ regex: '^[a-zA-Z]$',
63
+ match: false
64
+ }
65
+ }, {
66
+ selector: ['typeLike', 'classProperty', 'classMethod', 'class'],
67
+ format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
68
+ leadingUnderscore: 'allow',
69
+ trailingUnderscore: 'forbid',
70
+ custom: {
71
+ regex: '^[a-zA-Z]$',
72
+ match: false
73
+ }
74
+ }, {
75
+ selector: 'variable',
76
+ format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
77
+ leadingUnderscore: 'allow',
78
+ trailingUnderscore: 'allow'
79
+ }, {
80
+ selector: 'objectLiteralProperty',
81
+ format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
82
+ filter: {
83
+ regex: '^[a-zA-Z]$',
84
+ match: true
85
+ }
86
+ }, {
87
+ selector: 'parameter',
88
+ format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
89
+ leadingUnderscore: 'allow',
90
+ trailingUnderscore: 'allow',
91
+ custom: {
92
+ regex: '^[a-wA-W]$',
93
+ match: false
94
+ }
95
+ }],
96
+ '@typescript-eslint/no-confusing-non-null-assertion': 'error',
97
+ '@typescript-eslint/no-dynamic-delete': 'error',
98
+ '@typescript-eslint/no-empty-interface': 'error',
99
+ '@typescript-eslint/no-explicit-any': 'error',
100
+ '@typescript-eslint/no-extra-non-null-assertion': 'error',
101
+ '@typescript-eslint/no-extraneous-class': 'error',
102
+ '@typescript-eslint/no-implicit-any-catch': 'off',
103
+ '@typescript-eslint/no-inferrable-types': 'error',
104
+ '@typescript-eslint/no-invalid-void-type': 'error',
105
+ '@typescript-eslint/no-misused-new': 'error',
106
+ '@typescript-eslint/no-namespace': 'error',
107
+ '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
108
+ '@typescript-eslint/no-non-null-assertion': 'error',
109
+ '@typescript-eslint/parameter-properties': ['error', {
110
+ allow: ['readonly']
111
+ }],
112
+ '@typescript-eslint/no-require-imports': 'error',
113
+ '@typescript-eslint/no-this-alias': 'error',
114
+ '@typescript-eslint/no-type-alias': 'off',
115
+ '@typescript-eslint/no-unnecessary-type-constraint': 'error',
116
+ '@typescript-eslint/no-var-requires': 'error',
117
+ '@typescript-eslint/prefer-as-const': 'error',
118
+ '@typescript-eslint/prefer-enum-initializers': 'error',
119
+ '@typescript-eslint/prefer-for-of': 'error',
120
+ '@typescript-eslint/prefer-function-type': 'error',
121
+ '@typescript-eslint/prefer-literal-enum-member': 'error',
122
+ '@typescript-eslint/prefer-namespace-keyword': 'off',
123
+ '@typescript-eslint/prefer-optional-chain': 'error',
124
+ '@typescript-eslint/prefer-ts-expect-error': 'off',
125
+ '@typescript-eslint/sort-type-constituents': 'error',
126
+ '@typescript-eslint/triple-slash-reference': 'error',
127
+ '@typescript-eslint/type-annotation-spacing': 'off',
128
+ '@typescript-eslint/typedef': 'off',
129
+ '@typescript-eslint/unified-signatures': 'error',
130
+ '@typescript-eslint/brace-style': 'off',
131
+ '@typescript-eslint/comma-dangle': 'off',
132
+ '@typescript-eslint/comma-spacing': 'off',
133
+ '@typescript-eslint/default-param-last': 'error',
134
+ '@typescript-eslint/func-call-spacing': 'off',
135
+ '@typescript-eslint/init-declarations': ['error', 'always'],
136
+ '@typescript-eslint/keyword-spacing': 'off',
137
+ '@typescript-eslint/lines-between-class-members': 'error',
138
+ '@typescript-eslint/no-array-constructor': 'error',
139
+ '@typescript-eslint/no-dupe-class-members': 'error',
140
+ '@typescript-eslint/no-empty-function': 'error',
141
+ '@typescript-eslint/no-extra-parens': 'off',
142
+ '@typescript-eslint/no-extra-semi': 'off',
143
+ '@typescript-eslint/no-invalid-this': 'error',
144
+ '@typescript-eslint/no-loop-func': 'error',
145
+ '@typescript-eslint/no-loss-of-precision': 'error',
146
+ '@typescript-eslint/no-magic-numbers': 'off',
147
+ '@typescript-eslint/no-redeclare': 'error',
148
+ '@typescript-eslint/no-restricted-imports': 'off',
149
+ '@typescript-eslint/no-shadow': 'error',
150
+ '@typescript-eslint/no-unused-expressions': 'error',
151
+ '@typescript-eslint/no-unused-vars': 'error',
152
+ '@typescript-eslint/no-use-before-define': 'error',
153
+ '@typescript-eslint/no-useless-constructor': 'error',
154
+ '@typescript-eslint/semi': 'off',
155
+ '@typescript-eslint/space-before-function-paren': ['off', {
156
+ anonymous: 'always',
157
+ named: 'never',
158
+ asyncArrow: 'always'
159
+ }],
160
+ '@typescript-eslint/space-infix-ops': 'off',
161
+ '@typescript-eslint/object-curly-spacing': 'off',
162
+ '@typescript-eslint/quotes': ['error', 'single', {
163
+ avoidEscape: true,
164
+ allowTemplateLiterals: false
165
+ }],
166
+ '@typescript-eslint/padding-line-between-statements': 'off',
167
+ '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
168
+ '@typescript-eslint/indent': 'off',
169
+ '@typescript-eslint/await-thenable': 'error',
170
+ '@typescript-eslint/no-base-to-string': 'error',
171
+ '@typescript-eslint/no-confusing-void-expression': 'error',
172
+ '@typescript-eslint/no-floating-promises': 'error',
173
+ '@typescript-eslint/no-for-in-array': 'error',
174
+ '@typescript-eslint/no-misused-promises': 'error',
175
+ '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
176
+ '@typescript-eslint/no-unnecessary-condition': 'off',
177
+ '@typescript-eslint/no-unnecessary-qualifier': 'error',
178
+ '@typescript-eslint/no-unnecessary-type-arguments': 'error',
179
+ '@typescript-eslint/no-unnecessary-type-assertion': 'error',
180
+ '@typescript-eslint/no-unsafe-argument': 'off',
181
+ '@typescript-eslint/no-unsafe-assignment': 'off',
182
+ '@typescript-eslint/no-unsafe-call': 'off',
183
+ '@typescript-eslint/no-unsafe-member-access': 'off',
184
+ '@typescript-eslint/no-unsafe-return': 'off',
185
+ '@typescript-eslint/non-nullable-type-assertion-style': 'error',
186
+ '@typescript-eslint/prefer-includes': 'error',
187
+ '@typescript-eslint/prefer-nullish-coalescing': 'error',
188
+ '@typescript-eslint/prefer-readonly': 'error',
189
+ '@typescript-eslint/prefer-readonly-parameter-types': 'off',
190
+ '@typescript-eslint/prefer-reduce-type-parameter': 'error',
191
+ '@typescript-eslint/prefer-regexp-exec': 'error',
192
+ '@typescript-eslint/prefer-return-this-type': 'error',
193
+ '@typescript-eslint/prefer-string-starts-ends-with': 'error',
194
+ '@typescript-eslint/promise-function-async': 'error',
195
+ '@typescript-eslint/require-array-sort-compare': 'error',
196
+ '@typescript-eslint/restrict-plus-operands': 'error',
197
+ '@typescript-eslint/restrict-template-expressions': 'off',
198
+ '@typescript-eslint/strict-boolean-expressions': 'off',
199
+ '@typescript-eslint/switch-exhaustiveness-check': 'error',
200
+ '@typescript-eslint/unbound-method': 'error',
201
+ '@typescript-eslint/dot-notation': 'error',
202
+ '@typescript-eslint/no-implied-eval': 'error',
203
+ '@typescript-eslint/no-throw-literal': 'error',
204
+ '@typescript-eslint/require-await': 'error',
205
+ '@typescript-eslint/return-await': 'error',
206
+ '@typescript-eslint/no-meaningless-void-operator': 'error',
207
+ 'unicorn/better-regex': 'error',
208
+ 'unicorn/catch-error-name': 'error',
209
+ 'unicorn/consistent-destructuring': 'error',
210
+ 'unicorn/consistent-function-scoping': 'error',
211
+ 'unicorn/custom-error-definition': 'off',
212
+ 'unicorn/empty-brace-spaces': 'error',
213
+ 'unicorn/error-message': 'error',
214
+ 'unicorn/escape-case': 'error',
215
+ 'unicorn/expiring-todo-comments': 'off',
216
+ 'unicorn/explicit-length-check': 'error',
217
+ 'unicorn/filename-case': 'off',
218
+ 'unicorn/import-index': 'off',
219
+ 'unicorn/import-style': 'error',
220
+ 'unicorn/new-for-builtins': 'error',
221
+ 'unicorn/no-abusive-eslint-disable': 'error',
222
+ 'unicorn/no-array-callback-reference': 'error',
223
+ 'unicorn/no-array-for-each': 'error',
224
+ 'unicorn/no-array-method-this-argument': 'error',
225
+ 'unicorn/no-array-push-push': 'error',
226
+ 'unicorn/no-array-reduce': 'warn',
227
+ 'unicorn/no-console-spaces': 'error',
228
+ 'unicorn/no-document-cookie': 'error',
229
+ 'unicorn/no-for-loop': 'error',
230
+ 'unicorn/no-hex-escape': 'error',
231
+ 'unicorn/no-instanceof-array': 'error',
232
+ 'unicorn/no-keyword-prefix': ['warn', {
233
+ disallowedPrefixes: ['new']
234
+ }],
235
+ 'unicorn/no-lonely-if': 'error',
236
+ 'no-nested-ternary': 'off',
237
+ 'unicorn/no-nested-ternary': 'error',
238
+ 'unicorn/no-new-array': 'error',
239
+ 'unicorn/no-new-buffer': 'error',
240
+ 'unicorn/no-null': 'off',
241
+ 'unicorn/no-object-as-default-parameter': 'error',
242
+ 'unicorn/no-process-exit': 'error',
243
+ 'unicorn/no-static-only-class': 'error',
244
+ 'unicorn/no-this-assignment': 'error',
245
+ 'unicorn/no-unreadable-array-destructuring': 'error',
246
+ 'unicorn/no-unsafe-regex': 'error',
247
+ 'unicorn/no-unused-properties': 'off',
248
+ 'unicorn/no-useless-length-check': 'error',
249
+ 'unicorn/no-useless-spread': 'error',
250
+ 'unicorn/no-useless-undefined': 'error',
251
+ 'unicorn/no-zero-fractions': 'error',
252
+ 'unicorn/number-literal-case': 'error',
253
+ 'unicorn/numeric-separators-style': 'error',
254
+ 'unicorn/prefer-add-event-listener': 'error',
255
+ 'unicorn/prefer-array-find': 'error',
256
+ 'unicorn/prefer-array-flat': 'error',
257
+ 'unicorn/prefer-array-flat-map': 'error',
258
+ 'unicorn/prefer-array-index-of': 'error',
259
+ 'unicorn/prefer-array-some': 'error',
260
+ 'unicorn/prefer-at': 'error',
261
+ 'unicorn/prefer-date-now': 'error',
262
+ 'unicorn/prefer-default-parameters': 'error',
263
+ 'unicorn/prefer-dom-node-append': 'error',
264
+ 'unicorn/prefer-dom-node-dataset': 'error',
265
+ 'unicorn/prefer-dom-node-remove': 'error',
266
+ 'unicorn/prefer-dom-node-text-content': 'error',
267
+ 'unicorn/prefer-includes': 'error',
268
+ 'unicorn/prefer-keyboard-event-key': 'error',
269
+ 'unicorn/prefer-math-trunc': 'error',
270
+ 'unicorn/prefer-modern-dom-apis': 'error',
271
+ 'unicorn/prefer-module': 'error',
272
+ 'unicorn/prefer-negative-index': 'error',
273
+ 'unicorn/prefer-node-protocol': 'off',
274
+ 'unicorn/prefer-number-properties': 'error',
275
+ 'unicorn/prefer-object-from-entries': 'error',
276
+ 'unicorn/prefer-object-has-own': 'warn',
277
+ 'unicorn/prefer-optional-catch-binding': 'error',
278
+ 'unicorn/prefer-prototype-methods': 'error',
279
+ 'unicorn/prefer-query-selector': 'error',
280
+ 'unicorn/prefer-reflect-apply': 'error',
281
+ 'unicorn/prefer-regexp-test': 'error',
282
+ 'unicorn/prefer-set-has': 'error',
283
+ 'unicorn/prefer-spread': 'off',
284
+ 'unicorn/prefer-string-replace-all': 'error',
285
+ 'unicorn/prefer-string-slice': 'error',
286
+ 'unicorn/prefer-string-starts-ends-with': 'error',
287
+ 'unicorn/prefer-string-trim-start-end': 'error',
288
+ 'unicorn/prefer-switch': 'error',
289
+ 'unicorn/prefer-ternary': 'error',
290
+ 'unicorn/prefer-top-level-await': 'error',
291
+ 'unicorn/prefer-type-error': 'error',
292
+ 'unicorn/require-array-join-separator': 'error',
293
+ 'unicorn/require-number-to-fixed-digits-argument': 'error',
294
+ 'unicorn/require-post-message-target-origin': 'error',
295
+ 'unicorn/string-content': 'warn',
296
+ 'unicorn/template-indent': 'error',
297
+ 'unicorn/throw-new-error': 'error',
298
+ 'unicorn/prevent-abbreviations': ['error', {
299
+ checkFilenames: false,
300
+ allowList: {
301
+ ref: true,
302
+ Ref: true,
303
+ prop: true,
304
+ Prop: true,
305
+ props: true,
306
+ Props: true,
307
+ restProps: true
308
+ }
309
+ }],
310
+ 'unicorn/no-invalid-remove-event-listener': 'error',
311
+ 'unicorn/no-useless-fallback-in-spread': 'error',
312
+ 'tsdoc/syntax': 'warn',
313
+ 'deprecation/deprecation': 'warn',
314
+ '@cspell/spellchecker': ['warn', {
315
+ customWordListFile: {
316
+ path: `${__dirname}/custom_words.txt`
317
+ }
318
+ }],
319
+ 'prefer-template': 'error',
320
+ 'promise/no-return-wrap': 'off',
321
+ 'promise/always-return': 'off',
322
+ 'promise/param-names': 'off',
323
+ 'promise/catch-or-return': 'off',
324
+ 'promise/no-native': 'off',
325
+ 'promise/no-nesting': 'warn',
326
+ 'promise/no-promise-in-callback': 'warn',
327
+ 'promise/no-callback-in-promise': 'off',
328
+ 'promise/avoid-new': 'error',
329
+ 'promise/no-new-statics': 'error',
330
+ 'promise/no-return-in-finally': 'warn',
331
+ 'promise/valid-params': 'warn',
332
+ 'promise/no-multiple-resolved': 'warn',
333
+ 'sort-destructure-keys/sort-destructure-keys': 'error'
334
+ }
335
+ };
336
+ var _default = exports.default = eslintConfig;
337
+ module.exports = exports.default;
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@mservices-tech/eslint-config",
3
+ "version": "2.50.5",
4
+ "license": "MIT",
5
+ "packageManager": "yarn@4.4.1",
6
+ "main": "index.js",
7
+ "peerDependencies": {
8
+ "eslint": "^8.56.0"
9
+ },
10
+ "dependencies": {
11
+ "@cspell/eslint-plugin": "8.19.4",
12
+ "@typescript-eslint/eslint-plugin": "6.21.0",
13
+ "@typescript-eslint/parser": "6.21.0",
14
+ "eslint-import-resolver-typescript": "3.10.1",
15
+ "eslint-plugin-deprecation": "2.0.0",
16
+ "eslint-plugin-html": "8.1.4",
17
+ "eslint-plugin-import": "2.32.0",
18
+ "eslint-plugin-playwright": "0.22.2",
19
+ "eslint-plugin-promise": "6.6.0",
20
+ "eslint-plugin-sort-destructure-keys": "1.6.0",
21
+ "eslint-plugin-tsdoc": "0.2.17",
22
+ "eslint-plugin-unicorn": "50.0.1"
23
+ }
24
+ }