@remcohaszing/eslint 12.0.1 → 13.0.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.
- package/lib/config.js +29 -10
- package/package.json +6 -6
- package/types/config.d.ts +2 -2
- package/types/config.d.ts.map +1 -1
package/lib/config.js
CHANGED
|
@@ -363,10 +363,6 @@ const config = defineConfig([
|
|
|
363
363
|
selector:
|
|
364
364
|
'CallExpression[callee.property.name="toString"][callee.optional=false][arguments.length=0][optional=false]',
|
|
365
365
|
message: 'Use String() instead.'
|
|
366
|
-
},
|
|
367
|
-
{
|
|
368
|
-
selector: '[returnType.type="TSTypeAnnotation"]>TSTypeAnnotation>TSVoidKeyword',
|
|
369
|
-
message: 'Use undefined for non-returning functions of unknown for callbacks'
|
|
370
366
|
}
|
|
371
367
|
],
|
|
372
368
|
'no-return-assign': ['error', 'always'],
|
|
@@ -428,6 +424,7 @@ const config = defineConfig([
|
|
|
428
424
|
'prefer-rest-params': 'error',
|
|
429
425
|
'prefer-spread': 'error',
|
|
430
426
|
'prefer-template': 'error',
|
|
427
|
+
'preserve-caught-error': ['error', { requireCatchParameter: true }],
|
|
431
428
|
radix: ['error', 'as-needed'],
|
|
432
429
|
'require-await': 'error',
|
|
433
430
|
'require-yield': 'error',
|
|
@@ -577,6 +574,7 @@ const config = defineConfig([
|
|
|
577
574
|
'jsdoc/check-tag-names': ['error', { jsxTags: true }],
|
|
578
575
|
'jsdoc/check-template-names': 'error',
|
|
579
576
|
'jsdoc/empty-tags': 'error',
|
|
577
|
+
'jsdoc/escape-inline-tags': 'error',
|
|
580
578
|
'jsdoc/match-name': [
|
|
581
579
|
'error',
|
|
582
580
|
{
|
|
@@ -638,6 +636,9 @@ const config = defineConfig([
|
|
|
638
636
|
}
|
|
639
637
|
],
|
|
640
638
|
'jsdoc/no-undefined-types': 'error',
|
|
639
|
+
'jsdoc/prefer-import-tag': ['error', { exemptTypedefs: false, outputType: 'named-import' }],
|
|
640
|
+
'jsdoc/reject-any-type': 'error',
|
|
641
|
+
'jsdoc/reject-function-type': 'error',
|
|
641
642
|
'jsdoc/require-asterisk-prefix': 'error',
|
|
642
643
|
'jsdoc/require-description': 'error',
|
|
643
644
|
'jsdoc/require-hyphen-before-param-description': ['error', 'never'],
|
|
@@ -669,8 +670,14 @@ const config = defineConfig([
|
|
|
669
670
|
'jsdoc/require-returns-check': 'error',
|
|
670
671
|
'jsdoc/require-returns-description': 'error',
|
|
671
672
|
'jsdoc/require-returns-type': 'error',
|
|
673
|
+
'jsdoc/require-template-description': 'error',
|
|
674
|
+
'jsdoc/require-throws-description': 'error',
|
|
675
|
+
'jsdoc/require-throws-type': 'error',
|
|
672
676
|
'jsdoc/sort-tags': ['error', { alphabetizeExtras: true }],
|
|
673
677
|
'jsdoc/tag-lines': ['error', 'never', { applyToEndTag: false, startLines: 1, endLines: 0 }],
|
|
678
|
+
'jsdoc/ts-method-signature-style': 'error',
|
|
679
|
+
'jsdoc/ts-no-unnecessary-template-expression': 'error',
|
|
680
|
+
'jsdoc/ts-prefer-function-type': 'error',
|
|
674
681
|
|
|
675
682
|
// https://github.com/eslint-community/eslint-plugin-n
|
|
676
683
|
'n/callback-return': ['error', ['callback', 'cb']],
|
|
@@ -696,8 +703,10 @@ const config = defineConfig([
|
|
|
696
703
|
// https://perfectionist.dev
|
|
697
704
|
'perfectionist/sort-array-includes': 'error',
|
|
698
705
|
'perfectionist/sort-classes': ['error', { type: 'unsorted' }],
|
|
706
|
+
'perfectionist/sort-export-attributes': 'error',
|
|
699
707
|
'perfectionist/sort-exports': ['error', { type: 'custom', alphabet }],
|
|
700
708
|
'perfectionist/sort-heritage-clauses': 'error',
|
|
709
|
+
'perfectionist/sort-import-attributes': 'error',
|
|
701
710
|
'perfectionist/sort-imports': [
|
|
702
711
|
'error',
|
|
703
712
|
{
|
|
@@ -711,17 +720,16 @@ const config = defineConfig([
|
|
|
711
720
|
'type-subpath',
|
|
712
721
|
'type-internal',
|
|
713
722
|
'type-parent',
|
|
714
|
-
{ newlinesBetween:
|
|
723
|
+
{ newlinesBetween: 0 },
|
|
715
724
|
['type-sibling', 'type-index'],
|
|
716
725
|
'builtin',
|
|
717
726
|
'external',
|
|
718
727
|
'subpath',
|
|
719
728
|
'internal',
|
|
720
729
|
'parent',
|
|
721
|
-
{ newlinesBetween:
|
|
730
|
+
{ newlinesBetween: 0 },
|
|
722
731
|
['sibling', 'index'],
|
|
723
|
-
'unknown'
|
|
724
|
-
'object'
|
|
732
|
+
'unknown'
|
|
725
733
|
]
|
|
726
734
|
}
|
|
727
735
|
],
|
|
@@ -736,7 +744,10 @@ const config = defineConfig([
|
|
|
736
744
|
'perfectionist/sort-maps': 'error',
|
|
737
745
|
'perfectionist/sort-named-exports': 'error',
|
|
738
746
|
'perfectionist/sort-named-imports': 'error',
|
|
739
|
-
'perfectionist/sort-objects': [
|
|
747
|
+
'perfectionist/sort-objects': [
|
|
748
|
+
'error',
|
|
749
|
+
{ type: 'unsorted', useConfigurationIf: { objectType: 'non-destructured' } }
|
|
750
|
+
],
|
|
740
751
|
'perfectionist/sort-union-types': 'error',
|
|
741
752
|
|
|
742
753
|
// https://github.com/prettier/eslint-plugin-prettier
|
|
@@ -744,7 +755,7 @@ const config = defineConfig([
|
|
|
744
755
|
|
|
745
756
|
// https://github.com/sindresorhus/eslint-plugin-unicorn
|
|
746
757
|
'unicorn/better-regex': 'error',
|
|
747
|
-
'unicorn/catch-error-name': ['error', { name: 'error', ignore: ['err', /Error
|
|
758
|
+
'unicorn/catch-error-name': ['error', { name: 'error', ignore: ['cause', 'err', /Error$/] }],
|
|
748
759
|
'unicorn/consistent-assert': 'error',
|
|
749
760
|
'unicorn/consistent-date-clone': 'error',
|
|
750
761
|
'unicorn/consistent-destructuring': 'error',
|
|
@@ -783,12 +794,14 @@ const config = defineConfig([
|
|
|
783
794
|
'unicorn/no-array-for-each': 'error',
|
|
784
795
|
'unicorn/no-array-method-this-argument': 'error',
|
|
785
796
|
'unicorn/no-array-reduce': 'error',
|
|
797
|
+
'unicorn/no-array-sort': 'error',
|
|
786
798
|
'unicorn/no-await-in-promise-methods': 'error',
|
|
787
799
|
'unicorn/no-console-spaces': 'error',
|
|
788
800
|
'unicorn/no-document-cookie': 'error',
|
|
789
801
|
'unicorn/no-empty-file': 'error',
|
|
790
802
|
'unicorn/no-for-loop': 'error',
|
|
791
803
|
'unicorn/no-hex-escape': 'error',
|
|
804
|
+
'unicorn/no-immediate-mutation': 'error',
|
|
792
805
|
'unicorn/no-instanceof-builtins': 'error',
|
|
793
806
|
'unicorn/no-invalid-fetch-options': 'error',
|
|
794
807
|
'unicorn/no-invalid-remove-event-listener': 'error',
|
|
@@ -808,6 +821,7 @@ const config = defineConfig([
|
|
|
808
821
|
'unicorn/no-unnecessary-slice-end': 'error',
|
|
809
822
|
'unicorn/no-unreadable-iife': 'error',
|
|
810
823
|
'unicorn/no-unused-properties': 'error',
|
|
824
|
+
'unicorn/no-useless-collection-argument': 'error',
|
|
811
825
|
'unicorn/no-useless-error-capture-stack-trace': 'error',
|
|
812
826
|
'unicorn/no-useless-fallback-in-spread': 'error',
|
|
813
827
|
'unicorn/no-useless-length-check': 'error',
|
|
@@ -823,8 +837,10 @@ const config = defineConfig([
|
|
|
823
837
|
'unicorn/prefer-array-index-of': 'error',
|
|
824
838
|
'unicorn/prefer-array-some': 'error',
|
|
825
839
|
'unicorn/prefer-at': 'error',
|
|
840
|
+
'unicorn/prefer-bigint-literals': 'error',
|
|
826
841
|
'unicorn/prefer-blob-reading-methods': 'error',
|
|
827
842
|
'unicorn/prefer-class-fields': 'error',
|
|
843
|
+
'unicorn/prefer-classlist-toggle': 'error',
|
|
828
844
|
'unicorn/prefer-date-now': 'error',
|
|
829
845
|
'unicorn/prefer-default-parameters': 'error',
|
|
830
846
|
'unicorn/prefer-dom-node-append': 'error',
|
|
@@ -852,6 +868,7 @@ const config = defineConfig([
|
|
|
852
868
|
'unicorn/prefer-prototype-methods': 'error',
|
|
853
869
|
'unicorn/prefer-reflect-apply': 'error',
|
|
854
870
|
'unicorn/prefer-regexp-test': 'error',
|
|
871
|
+
'unicorn/prefer-response-static-json': 'error',
|
|
855
872
|
'unicorn/prefer-set-has': 'error',
|
|
856
873
|
'unicorn/prefer-set-size': 'error',
|
|
857
874
|
'unicorn/prefer-single-call': 'error',
|
|
@@ -864,6 +881,7 @@ const config = defineConfig([
|
|
|
864
881
|
'unicorn/prefer-top-level-await': 'error',
|
|
865
882
|
'unicorn/prefer-type-error': 'error',
|
|
866
883
|
'unicorn/relative-url-style': 'error',
|
|
884
|
+
'unicorn/require-module-attributes': 'error',
|
|
867
885
|
'unicorn/require-module-specifiers': 'error',
|
|
868
886
|
'unicorn/require-post-message-target-origin': 'error',
|
|
869
887
|
'unicorn/switch-case-braces': ['error', 'avoid'],
|
|
@@ -1174,6 +1192,7 @@ export const typechecking = defineConfig([
|
|
|
1174
1192
|
'@typescript-eslint/no-unsafe-member-access': 'error',
|
|
1175
1193
|
'@typescript-eslint/no-unsafe-return': 'error',
|
|
1176
1194
|
'@typescript-eslint/no-unsafe-unary-minus': 'error',
|
|
1195
|
+
'@typescript-eslint/no-useless-default-assignment': 'error',
|
|
1177
1196
|
'@typescript-eslint/non-nullable-type-assertion-style': 'error',
|
|
1178
1197
|
'@typescript-eslint/only-throw-error': 'error',
|
|
1179
1198
|
'@typescript-eslint/prefer-destructuring': [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remcohaszing/eslint",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.0.0",
|
|
4
4
|
"description": "A strict ESLint configuration.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.0.0",
|
|
33
|
-
"@eslint/compat": "^
|
|
33
|
+
"@eslint/compat": "^2.0.0",
|
|
34
34
|
"@eslint/markdown": "^7.0.0",
|
|
35
35
|
"@stylistic/eslint-plugin": "^5.0.0",
|
|
36
36
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"confusing-browser-globals": "^1.0.0",
|
|
39
39
|
"eslint-plugin-import-x": "^4.0.0",
|
|
40
40
|
"eslint-plugin-jest-formatting": "^3.0.0",
|
|
41
|
-
"eslint-plugin-jsdoc": "^
|
|
41
|
+
"eslint-plugin-jsdoc": "^61.0.0",
|
|
42
42
|
"eslint-plugin-n": "^17.0.0",
|
|
43
|
-
"eslint-plugin-perfectionist": "^
|
|
43
|
+
"eslint-plugin-perfectionist": "^5.0.0",
|
|
44
44
|
"eslint-plugin-prettier": "^5.0.0",
|
|
45
|
-
"eslint-plugin-unicorn": "^
|
|
45
|
+
"eslint-plugin-unicorn": "^62.0.0",
|
|
46
46
|
"find-up": "^5.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"prettier-plugin-packagejson": "^2.0.0",
|
|
51
51
|
"remark-cli": "^12.0.0",
|
|
52
52
|
"remark-preset-remcohaszing": "^3.0.0",
|
|
53
|
-
"type-fest": "^
|
|
53
|
+
"type-fest": "^5.0.0",
|
|
54
54
|
"typescript": "^5.0.0"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
package/types/config.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export function define(overrides: Linter.Config | Linter.Config[]): Linter.Config[];
|
|
10
10
|
export default config;
|
|
11
|
-
export const typechecking:
|
|
11
|
+
export const typechecking: import("eslint/config").Config[];
|
|
12
12
|
import type { Linter } from 'eslint';
|
|
13
|
-
declare const config:
|
|
13
|
+
declare const config: import("eslint/config").Config[];
|
|
14
14
|
//# sourceMappingURL=config.d.ts.map
|
package/types/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../lib/config.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../lib/config.js"],"names":[],"mappings":"AA+sCA;;;;;;;GAOG;AACH,kCALW,aAAa,GAAG,aAAa,EAAE,GAE7B,aAAa,EAAE,CAK3B;;AAxFD,4DA4EE;4BA5sCuB,QAAQ;AA+HjC,uDA6/BE"}
|