@robinblomberg/eslint-config-robinblomberg 0.13.0 → 0.14.0

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.
Files changed (2) hide show
  1. package/index.js +92 -86
  2. package/package.json +11 -11
package/index.js CHANGED
@@ -26,12 +26,7 @@ module.exports = {
26
26
  plugins: ['@typescript-eslint'],
27
27
  rules: {
28
28
  '@typescript-eslint/adjacent-overload-signatures': warn,
29
- '@typescript-eslint/array-type': [
30
- warn,
31
- {
32
- default: 'array',
33
- },
34
- ],
29
+ '@typescript-eslint/array-type': [warn, { default: 'array' }],
35
30
  '@typescript-eslint/await-thenable': warn,
36
31
  '@typescript-eslint/ban-ts-comment': warn,
37
32
  '@typescript-eslint/ban-tslint-comment': warn,
@@ -75,15 +70,11 @@ module.exports = {
75
70
  '@typescript-eslint/dot-notation': warn,
76
71
  '@typescript-eslint/explicit-function-return-type': [
77
72
  off,
78
- {
79
- allowTypedFunctionExpressions: true,
80
- },
73
+ { allowTypedFunctionExpressions: true },
81
74
  ],
82
75
  '@typescript-eslint/explicit-member-accessibility': [
83
76
  warn,
84
- {
85
- accessibility: 'no-public',
86
- },
77
+ { accessibility: 'no-public' },
87
78
  ],
88
79
  '@typescript-eslint/explicit-module-boundary-types': off,
89
80
  '@typescript-eslint/func-call-spacing': warn,
@@ -178,7 +169,7 @@ module.exports = {
178
169
  ],
179
170
  },
180
171
  ],
181
- '@typescript-eslint/method-signature-style': [warn, 'method'],
172
+ '@typescript-eslint/method-signature-style': [warn, 'property'],
182
173
  '@typescript-eslint/naming-convention': [
183
174
  off,
184
175
  {
@@ -268,16 +259,11 @@ module.exports = {
268
259
  ],
269
260
  '@typescript-eslint/no-misused-new': warn,
270
261
  '@typescript-eslint/no-misused-promises': off,
271
- '@typescript-eslint/no-namespace': [
272
- off,
273
- {
274
- allowDeclarations: true,
275
- },
276
- ],
262
+ '@typescript-eslint/no-namespace': [off, { allowDeclarations: true }],
277
263
  '@typescript-eslint/no-non-null-asserted-optional-chain': warn,
278
264
  '@typescript-eslint/no-non-null-assertion': off,
279
265
  '@typescript-eslint/no-parameter-properties': off,
280
- '@typescript-eslint/no-redeclare': warn,
266
+ '@typescript-eslint/no-redeclare': off,
281
267
  '@typescript-eslint/no-require-imports': warn,
282
268
  '@typescript-eslint/no-shadow': warn,
283
269
  '@typescript-eslint/no-this-alias': warn,
@@ -340,12 +326,16 @@ module.exports = {
340
326
  '@typescript-eslint/quotes': [warn, 'single'],
341
327
  '@typescript-eslint/require-array-sort-compare': [
342
328
  warn,
329
+ { ignoreStringArrays: true },
330
+ ],
331
+ '@typescript-eslint/require-await': warn,
332
+ '@typescript-eslint/restrict-plus-operands': [
333
+ error,
343
334
  {
344
- ignoreStringArrays: true,
335
+ allowAny: false,
336
+ checkCompoundAssignments: true,
345
337
  },
346
338
  ],
347
- '@typescript-eslint/require-await': warn,
348
- '@typescript-eslint/restrict-plus-operands': warn,
349
339
  // Disabled due to false positives:
350
340
  '@typescript-eslint/restrict-template-expressions': off,
351
341
  '@typescript-eslint/return-await': [warn, 'always'],
@@ -363,12 +353,7 @@ module.exports = {
363
353
  'import/extensions': off,
364
354
  'import/no-unassigned-import': off,
365
355
  // Disabled due to false positives:
366
- 'import/no-unresolved': [
367
- off,
368
- {
369
- ignore: ['\\.types$'],
370
- },
371
- ],
356
+ 'import/no-unresolved': [off, { ignore: ['\\.types$'] }],
372
357
  indent: off,
373
358
  'init-declarations': off,
374
359
  'jsdoc/check-examples': off,
@@ -555,20 +540,12 @@ module.exports = {
555
540
  'react/jsx-equals-spacing': warn,
556
541
  'react/jsx-filename-extension': [
557
542
  warn,
558
- {
559
- extensions: ['.jsx', '.tsx'],
560
- },
543
+ { extensions: ['.jsx', '.tsx'] },
561
544
  ],
562
545
  'react/jsx-first-prop-new-line': warn,
563
546
  'react/jsx-fragments': warn,
564
547
  'react/jsx-handler-names': warn,
565
- 'react/jsx-indent': [
566
- warn,
567
- 2,
568
- {
569
- indentLogicalExpressions: true,
570
- },
571
- ],
548
+ 'react/jsx-indent': [warn, 2, { indentLogicalExpressions: true }],
572
549
  'react/jsx-indent-props': [warn, 2],
573
550
  'react/jsx-key': warn,
574
551
  'react/jsx-max-depth': off,
@@ -834,9 +811,7 @@ module.exports = {
834
811
  'import/no-extraneous-dependencies': warn,
835
812
  'import/no-internal-modules': [
836
813
  warn,
837
- {
838
- allow: ['[@a-z][@a-z]*/**', '**/*.svg'],
839
- },
814
+ { allow: ['[@a-z][@a-z]***', '**/*.svg'] },
840
815
  ],
841
816
  'import/no-mutable-exports': warn,
842
817
  'import/no-named-as-default': warn,
@@ -873,34 +848,18 @@ module.exports = {
873
848
  }], */
874
849
  'import/prefer-default-export': off,
875
850
  'import/unambiguous': off,
876
- indent: [
877
- warn,
878
- 2,
879
- {
880
- SwitchCase: 1,
881
- },
882
- ],
851
+ indent: [warn, 2, { SwitchCase: 1 }],
883
852
  'init-declarations': off,
884
853
  'jsdoc/check-access': warn,
885
854
  'jsdoc/check-alignment': warn,
886
855
  'jsdoc/check-examples': off,
887
- 'jsdoc/check-indentation': [
888
- off,
889
- {
890
- excludeTags: ['example'],
891
- },
892
- ],
856
+ 'jsdoc/check-indentation': [off, { excludeTags: ['example'] }],
893
857
  'jsdoc/check-line-alignment': warn,
894
858
  'jsdoc/check-param-names': warn,
895
859
  'jsdoc/check-property-names': warn,
896
860
  'jsdoc/check-syntax': warn,
897
861
  'jsdoc/check-tag-names': warn,
898
- 'jsdoc/check-types': [
899
- warn,
900
- {
901
- noDefaults: true,
902
- },
903
- ],
862
+ 'jsdoc/check-types': [warn, { noDefaults: true }],
904
863
  'jsdoc/check-values': warn,
905
864
  'jsdoc/empty-tags': warn,
906
865
  'jsdoc/implements-on-classes': warn,
@@ -1024,12 +983,7 @@ module.exports = {
1024
983
  ],
1025
984
  'jsdoc/require-param-description': off,
1026
985
  'jsdoc/require-param-name': warn,
1027
- 'jsdoc/require-param-type': [
1028
- warn,
1029
- {
1030
- contexts: ['any'],
1031
- },
1032
- ],
986
+ 'jsdoc/require-param-type': [warn, { contexts: ['any'] }],
1033
987
  'jsdoc/require-property': warn,
1034
988
  'jsdoc/require-property-description': warn,
1035
989
  'jsdoc/require-property-name': warn,
@@ -1082,11 +1036,11 @@ module.exports = {
1082
1036
  'no-class-assign': warn,
1083
1037
  'no-compare-neg-zero': warn,
1084
1038
  'no-cond-assign': warn,
1085
- 'no-confusing-arrow': warn,
1039
+ 'no-confusing-arrow': off,
1086
1040
  'no-console': [off, { allow: ['debug', 'error', 'info', 'warn'] }],
1087
1041
  'no-const-assign': warn,
1088
1042
  'no-constant-condition': [warn, { checkLoops: false }],
1089
- 'no-continue': warn,
1043
+ 'no-continue': off,
1090
1044
  'no-control-regex': off,
1091
1045
  'no-debugger': warn,
1092
1046
  'no-delete-var': warn,
@@ -1097,7 +1051,7 @@ module.exports = {
1097
1051
  'no-duplicate-case': warn,
1098
1052
  'no-duplicate-imports': warn,
1099
1053
  'no-else-return': warn,
1100
- 'no-empty': [warn, { allowEmptyCatch: true }],
1054
+ 'no-empty': [off, { allowEmptyCatch: true }],
1101
1055
  'no-empty-character-class': warn,
1102
1056
  'no-empty-function': off,
1103
1057
  'no-empty-pattern': off,
@@ -1114,12 +1068,7 @@ module.exports = {
1114
1068
  'no-floating-decimal': warn,
1115
1069
  'no-func-assign': warn,
1116
1070
  'no-global-assign': warn,
1117
- 'no-implicit-coercion': [
1118
- warn,
1119
- {
1120
- boolean: false,
1121
- },
1122
- ],
1071
+ 'no-implicit-coercion': [warn, { boolean: false }],
1123
1072
  'no-implicit-globals': warn,
1124
1073
  'no-implied-eval': warn,
1125
1074
  'no-inline-comments': off,
@@ -1136,9 +1085,7 @@ module.exports = {
1136
1085
  'no-loss-of-precision': warn,
1137
1086
  'no-magic-numbers': [
1138
1087
  off,
1139
- {
1140
- ignore: [-1, 0, 1, 2, 3, '-1n', '0n', '1n', '2n', '3n'],
1141
- },
1088
+ { ignore: [-1, 0, 1, 2, 3, '-1n', '0n', '1n', '2n', '3n'] },
1142
1089
  ],
1143
1090
  'no-misleading-character-class': warn,
1144
1091
  'no-mixed-operators': [
@@ -1179,7 +1126,71 @@ module.exports = {
1179
1126
  'no-prototype-builtins': warn,
1180
1127
  'no-redeclare': [warn, { builtinGlobals: false }],
1181
1128
  'no-regex-spaces': warn,
1182
- 'no-restricted-globals': warn,
1129
+ 'no-restricted-globals': [
1130
+ error,
1131
+ 'isNaN',
1132
+ /*
1133
+ * https://github.com/sidoshi/eslint-restricted-globals/blob/master/index.js
1134
+ */
1135
+ 'addEventListener',
1136
+ 'blur',
1137
+ 'close',
1138
+ 'closed',
1139
+ 'confirm',
1140
+ 'defaultStatus',
1141
+ 'event',
1142
+ 'external',
1143
+ 'defaultstatus',
1144
+ 'find',
1145
+ 'focus',
1146
+ 'frameElement',
1147
+ 'frames',
1148
+ 'history',
1149
+ 'innerHeight',
1150
+ 'innerWidth',
1151
+ 'length',
1152
+ 'location',
1153
+ 'locationbar',
1154
+ 'menubar',
1155
+ 'moveBy',
1156
+ 'moveTo',
1157
+ 'name',
1158
+ 'onblur',
1159
+ 'onerror',
1160
+ 'onfocus',
1161
+ 'onload',
1162
+ 'onresize',
1163
+ 'onunload',
1164
+ 'open',
1165
+ 'opener',
1166
+ 'opera',
1167
+ 'outerHeight',
1168
+ 'outerWidth',
1169
+ 'pageXOffset',
1170
+ 'pageYOffset',
1171
+ 'parent',
1172
+ 'print',
1173
+ 'removeEventListener',
1174
+ 'resizeBy',
1175
+ 'resizeTo',
1176
+ 'screen',
1177
+ 'screenLeft',
1178
+ 'screenTop',
1179
+ 'screenX',
1180
+ 'screenY',
1181
+ 'scroll',
1182
+ 'scrollbars',
1183
+ 'scrollBy',
1184
+ 'scrollTo',
1185
+ 'scrollX',
1186
+ 'scrollY',
1187
+ 'self',
1188
+ 'status',
1189
+ 'statusbar',
1190
+ 'stop',
1191
+ 'toolbar',
1192
+ 'top',
1193
+ ],
1183
1194
  'no-restricted-imports': warn,
1184
1195
  'no-restricted-modules': warn,
1185
1196
  'no-restricted-properties': warn,
@@ -1257,12 +1268,7 @@ module.exports = {
1257
1268
  'nonblock-statement-body-position': warn,
1258
1269
  'object-curly-newline': [warn, { consistent: true, multiline: true }],
1259
1270
  'object-curly-spacing': [warn, 'always'],
1260
- 'object-property-newline': [
1261
- warn,
1262
- {
1263
- allowMultiplePropertiesPerLine: true,
1264
- },
1265
- ],
1271
+ 'object-property-newline': [warn, { allowMultiplePropertiesPerLine: true }],
1266
1272
  'object-shorthand': [warn, 'always'],
1267
1273
  'one-var': [warn, 'never'],
1268
1274
  'one-var-declaration-per-line': warn,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robinblomberg/eslint-config-robinblomberg",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "author": "Robin Blomberg",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -16,20 +16,20 @@
16
16
  "lint:fix": "eslint **/*.{js,ts} --fix"
17
17
  },
18
18
  "dependencies": {
19
- "@babel/core": "^7.20.5",
19
+ "@babel/core": "^7.21.0",
20
20
  "@babel/eslint-parser": "^7.19.1",
21
- "@typescript-eslint/eslint-plugin": "^5.46.1",
22
- "@typescript-eslint/parser": "^5.46.1",
23
- "eslint": "^8.29.0",
24
- "eslint-plugin-import": "^2.26.0",
25
- "eslint-plugin-jsdoc": "^39.6.4",
26
- "eslint-plugin-jsx-a11y": "^6.6.1",
27
- "eslint-plugin-react": "^7.31.11",
21
+ "@typescript-eslint/eslint-plugin": "^5.55.0",
22
+ "@typescript-eslint/parser": "^5.55.0",
23
+ "eslint": "^8.36.0",
24
+ "eslint-plugin-import": "^2.27.5",
25
+ "eslint-plugin-jsdoc": "^40.0.2",
26
+ "eslint-plugin-jsx-a11y": "^6.7.1",
27
+ "eslint-plugin-react": "^7.32.2",
28
28
  "eslint-plugin-sort-keys": "^2.3.5",
29
- "typescript": "^4.9.4"
29
+ "typescript": "^4.9.5"
30
30
  },
31
31
  "devDependencies": {
32
- "@robinblomberg/eslint-config-robinblomberg": "0.13.0-beta1",
32
+ "@robinblomberg/eslint-config-robinblomberg": "0.13.0",
33
33
  "@types/node": "*"
34
34
  }
35
35
  }