@mkaradeniz/eslint-config 4.0.13 → 4.0.15
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/package.json +7 -7
- package/rules/baseRules.mjs +10 -0
- package/rules/typescriptRules.mjs +11 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mkaradeniz/eslint-config",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.15",
|
|
4
4
|
"private": false,
|
|
5
5
|
"files": [
|
|
6
6
|
"base.mjs",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
29
29
|
"@eslint/compat": "^2.0.0",
|
|
30
|
-
"@next/eslint-plugin-next": "^16.
|
|
30
|
+
"@next/eslint-plugin-next": "^16.1.1",
|
|
31
31
|
"@stylistic/eslint-plugin": "^5.6.1",
|
|
32
32
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
33
33
|
"eslint-plugin-import": "^2.32.0",
|
|
@@ -38,17 +38,17 @@
|
|
|
38
38
|
"eslint-plugin-react-compiler": "19.1.0-rc.2",
|
|
39
39
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
40
40
|
"eslint-plugin-tsdoc": "^0.5.0",
|
|
41
|
-
"eslint-plugin-turbo": "2.
|
|
41
|
+
"eslint-plugin-turbo": "2.7.2",
|
|
42
42
|
"eslint-plugin-unicorn": "^62.0.0",
|
|
43
43
|
"eslint-plugin-unused-imports": "^4.3.0",
|
|
44
|
-
"globals": "^
|
|
45
|
-
"typescript-eslint": "^8.
|
|
44
|
+
"globals": "^17.0.0",
|
|
45
|
+
"typescript-eslint": "^8.51.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@mkaradeniz/prettier-config": "^4.0.
|
|
48
|
+
"@mkaradeniz/prettier-config": "^4.0.3",
|
|
49
49
|
"husky": "^9.1.7",
|
|
50
50
|
"lint-staged": "^16.2.7",
|
|
51
|
-
"prettier": "^3.7.
|
|
51
|
+
"prettier": "^3.7.4",
|
|
52
52
|
"rimraf": "^6.1.2",
|
|
53
53
|
"typescript": "^5.9.3"
|
|
54
54
|
}
|
package/rules/baseRules.mjs
CHANGED
|
@@ -6,6 +6,7 @@ export const baseRules = {
|
|
|
6
6
|
'warn',
|
|
7
7
|
{ allow: ['^UNSAFE_'], ignoreDestructuring: false, properties: 'never', ignoreImports: false, ignoreGlobals: false },
|
|
8
8
|
],
|
|
9
|
+
curly: ['warn', 'all'],
|
|
9
10
|
'default-case-last': ['warn'],
|
|
10
11
|
eqeqeq: ['warn'],
|
|
11
12
|
'for-direction': ['warn'],
|
|
@@ -69,6 +70,14 @@ export const baseRules = {
|
|
|
69
70
|
'no-restricted-syntax': [
|
|
70
71
|
'warn',
|
|
71
72
|
{ selector: 'SwitchCase > *.consequent[type!="BlockStatement"]', message: 'Switch cases without blocks are disallowed.' },
|
|
73
|
+
{
|
|
74
|
+
selector: 'CallExpression[callee.property.name="sort"]',
|
|
75
|
+
message: 'Use .toSorted() instead of .sort() to avoid mutating the original array.',
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
selector: 'CallExpression[callee.property.name="reverse"]',
|
|
79
|
+
message: 'Use .toReversed() instead of .reverse() to avoid mutating the original array.',
|
|
80
|
+
},
|
|
72
81
|
],
|
|
73
82
|
'no-return-assign': ['warn'],
|
|
74
83
|
'no-script-url': ['warn'],
|
|
@@ -152,5 +161,6 @@ export const baseRules = {
|
|
|
152
161
|
],
|
|
153
162
|
'unicorn/number-literal-case': ['warn'],
|
|
154
163
|
'unicorn/prefer-node-protocol': ['warn'],
|
|
164
|
+
'sort-keys': ['warn', 'asc', { caseSensitive: true, natural: true, minKeys: 2 }],
|
|
155
165
|
},
|
|
156
166
|
};
|
|
@@ -36,6 +36,14 @@ export const typescriptRules = {
|
|
|
36
36
|
'@typescript-eslint/consistent-type-imports': ['warn', { prefer: 'type-imports', fixStyle: 'inline-type-imports' }],
|
|
37
37
|
'@typescript-eslint/naming-convention': [
|
|
38
38
|
'warn',
|
|
39
|
+
{
|
|
40
|
+
selector: 'variable',
|
|
41
|
+
format: ['camelCase', 'UPPER_CASE', 'PascalCase'],
|
|
42
|
+
filter: {
|
|
43
|
+
regex: '^(UNSAFE_|__)',
|
|
44
|
+
match: false,
|
|
45
|
+
},
|
|
46
|
+
},
|
|
39
47
|
{
|
|
40
48
|
selector: 'variable',
|
|
41
49
|
types: ['boolean'],
|
|
@@ -92,6 +100,9 @@ export const typescriptRules = {
|
|
|
92
100
|
'@typescript-eslint/prefer-function-type': ['warn'],
|
|
93
101
|
'@typescript-eslint/prefer-literal-enum-member': ['warn'],
|
|
94
102
|
'@typescript-eslint/prefer-namespace-keyword': ['warn'],
|
|
103
|
+
'@typescript-eslint/prefer-nullish-coalescing': ['warn'],
|
|
104
|
+
'@typescript-eslint/prefer-optional-chain': ['warn'],
|
|
105
|
+
'@typescript-eslint/prefer-readonly': ['warn'],
|
|
95
106
|
'@typescript-eslint/triple-slash-reference': ['warn'],
|
|
96
107
|
'@typescript-eslint/unified-signatures': ['warn'],
|
|
97
108
|
|