@remcohaszing/eslint 11.0.0 → 11.1.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 +20 -56
- package/package.json +2 -2
- package/types/config.d.ts.map +1 -1
package/lib/config.js
CHANGED
|
@@ -42,9 +42,23 @@ const restrictedImports = [
|
|
|
42
42
|
}
|
|
43
43
|
]
|
|
44
44
|
|
|
45
|
+
/**
|
|
46
|
+
* Move a character in an alphabet string up to the first position.
|
|
47
|
+
*
|
|
48
|
+
* @param {string} string
|
|
49
|
+
* The string to modify
|
|
50
|
+
* @param {string} char
|
|
51
|
+
* The character to unshift.
|
|
52
|
+
* @returns {string}
|
|
53
|
+
* The string, but with the char moved to the first position.
|
|
54
|
+
*/
|
|
55
|
+
function unshiftChar(string, char) {
|
|
56
|
+
const index = string.indexOf(char)
|
|
57
|
+
return `${char}${string.slice(0, index)}${string.slice(index + 1)}`
|
|
58
|
+
}
|
|
59
|
+
|
|
45
60
|
const characters = Alphabet.generateRecommendedAlphabet().getCharacters()
|
|
46
|
-
const
|
|
47
|
-
const alphabet = `/${characters.slice(0, slashIndex)}${characters.slice(slashIndex + 1)}`
|
|
61
|
+
const alphabet = unshiftChar(unshiftChar(characters, '.'), '/')
|
|
48
62
|
|
|
49
63
|
/**
|
|
50
64
|
* Any function declaration whose name starts woth a lower case character.
|
|
@@ -478,7 +492,7 @@ const config = defineConfig([
|
|
|
478
492
|
'jsdoc/check-access': 'error',
|
|
479
493
|
'jsdoc/check-indentation': [
|
|
480
494
|
'error',
|
|
481
|
-
{ excludeTags: ['example', 'param', 'returns', 'throws', 'todo'] }
|
|
495
|
+
{ excludeTags: ['example', 'param', 'property', 'returns', 'throws', 'todo'] }
|
|
482
496
|
],
|
|
483
497
|
'jsdoc/check-line-alignment': ['error', 'never', { wrapIndent: ' ' }],
|
|
484
498
|
'jsdoc/check-param-names': ['error', { checkDestructured: false }],
|
|
@@ -579,14 +593,8 @@ const config = defineConfig([
|
|
|
579
593
|
|
|
580
594
|
// https://perfectionist.dev
|
|
581
595
|
'perfectionist/sort-array-includes': 'error',
|
|
582
|
-
'perfectionist/sort-classes': 'error',
|
|
583
|
-
'perfectionist/sort-exports': [
|
|
584
|
-
'error',
|
|
585
|
-
{
|
|
586
|
-
type: 'custom',
|
|
587
|
-
alphabet
|
|
588
|
-
}
|
|
589
|
-
],
|
|
596
|
+
'perfectionist/sort-classes': ['error', { type: 'unsorted' }],
|
|
597
|
+
'perfectionist/sort-exports': ['error', { type: 'custom', alphabet }],
|
|
590
598
|
'perfectionist/sort-heritage-clauses': 'error',
|
|
591
599
|
'perfectionist/sort-imports': [
|
|
592
600
|
'error',
|
|
@@ -811,51 +819,6 @@ const config = defineConfig([
|
|
|
811
819
|
'@typescript-eslint/default-param-last': 'error',
|
|
812
820
|
'@typescript-eslint/explicit-function-return-type': ['error', { allowExpressions: true }],
|
|
813
821
|
'@typescript-eslint/explicit-member-accessibility': ['error', { accessibility: 'no-public' }],
|
|
814
|
-
'@typescript-eslint/member-ordering': [
|
|
815
|
-
'error',
|
|
816
|
-
{
|
|
817
|
-
default: [
|
|
818
|
-
'public-static-field',
|
|
819
|
-
'protected-static-field',
|
|
820
|
-
'private-static-field',
|
|
821
|
-
'#private-static-field',
|
|
822
|
-
|
|
823
|
-
'public-decorated-field',
|
|
824
|
-
'protected-decorated-field',
|
|
825
|
-
'private-decorated-field',
|
|
826
|
-
|
|
827
|
-
'public-instance-field',
|
|
828
|
-
'protected-instance-field',
|
|
829
|
-
'private-instance-field',
|
|
830
|
-
'#private-instance-field',
|
|
831
|
-
|
|
832
|
-
'public-abstract-field',
|
|
833
|
-
|
|
834
|
-
'signature',
|
|
835
|
-
|
|
836
|
-
'public-static-method',
|
|
837
|
-
'protected-static-method',
|
|
838
|
-
'private-static-method',
|
|
839
|
-
'#private-static-method',
|
|
840
|
-
|
|
841
|
-
'public-constructor',
|
|
842
|
-
'protected-constructor',
|
|
843
|
-
'private-constructor',
|
|
844
|
-
|
|
845
|
-
'public-decorated-method',
|
|
846
|
-
'protected-decorated-method',
|
|
847
|
-
'private-decorated-method',
|
|
848
|
-
|
|
849
|
-
'public-instance-method',
|
|
850
|
-
'protected-instance-method',
|
|
851
|
-
'private-instance-method',
|
|
852
|
-
'#private-instance-method',
|
|
853
|
-
|
|
854
|
-
'public-abstract-method',
|
|
855
|
-
'protected-abstract-method'
|
|
856
|
-
]
|
|
857
|
-
}
|
|
858
|
-
],
|
|
859
822
|
'@typescript-eslint/method-signature-style': 'error',
|
|
860
823
|
'@typescript-eslint/naming-convention': [
|
|
861
824
|
'error',
|
|
@@ -1040,6 +1003,7 @@ const config = defineConfig([
|
|
|
1040
1003
|
|
|
1041
1004
|
'jsdoc/require-jsdoc': 'off',
|
|
1042
1005
|
|
|
1006
|
+
'n/no-extraneous-import': 'off',
|
|
1043
1007
|
'n/no-unpublished-import': 'off',
|
|
1044
1008
|
'n/no-unpublished-require': 'off',
|
|
1045
1009
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remcohaszing/eslint",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.1.0",
|
|
4
4
|
"description": "A strict ESLint configuration.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"test": "node --test"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.0.0",
|
|
32
33
|
"@eslint/compat": "^1.0.0",
|
|
33
34
|
"@eslint/markdown": "^6.0.0",
|
|
34
|
-
"@eslint-community/eslint-plugin-eslint-comments": "^4.0.0",
|
|
35
35
|
"@stylistic/eslint-plugin": "^4.0.0",
|
|
36
36
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
37
37
|
"@typescript-eslint/parser": "^8.0.0",
|
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":";AA0/BA,+DA0EE;AAhgCF,0DAk7BE;4BAr/BuB,QAAQ"}
|