@yasainet/eslint 0.0.85 → 0.0.87
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 +2 -2
- package/src/common/base/typescript.mjs +36 -33
- package/src/next/index.mjs +3 -1
- package/src/node/index.mjs +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yasainet/eslint",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.87",
|
|
4
4
|
"description": "ESLint",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
|
-
"check": "node scripts/check-layer-selectors.mjs"
|
|
39
|
+
"check": "node scripts/check-layer-selectors.mjs && node scripts/check-rule-scoping.mjs"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@stylistic/eslint-plugin": "^5.9.0",
|
|
@@ -12,41 +12,44 @@ const projectRoot = findUp(
|
|
|
12
12
|
process.cwd(),
|
|
13
13
|
);
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
function createSharedRulesConfig(files) {
|
|
16
|
+
return {
|
|
17
|
+
name: "rules/shared",
|
|
18
|
+
files,
|
|
19
|
+
plugins: {
|
|
20
|
+
"@stylistic": stylistic,
|
|
21
|
+
"simple-import-sort": simpleImportSortPlugin,
|
|
22
|
+
},
|
|
23
|
+
rules: {
|
|
24
|
+
"no-console": "warn",
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
26
|
+
"no-irregular-whitespace": [
|
|
27
|
+
"warn",
|
|
28
|
+
{
|
|
29
|
+
skipStrings: false,
|
|
30
|
+
skipComments: false,
|
|
31
|
+
skipRegExps: false,
|
|
32
|
+
skipTemplates: false,
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
"no-unreachable": "error",
|
|
36
|
+
"no-constant-condition": "error",
|
|
37
|
+
"no-constant-binary-expression": "error",
|
|
38
|
+
"no-dupe-else-if": "error",
|
|
39
|
+
"no-self-assign": "error",
|
|
40
|
+
"no-useless-catch": "error",
|
|
41
|
+
"no-fallthrough": "error",
|
|
40
42
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
"no-unreachable-loop": "error",
|
|
44
|
+
"no-useless-return": "error",
|
|
45
|
+
"no-self-compare": "error",
|
|
44
46
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
};
|
|
47
|
+
"simple-import-sort/imports": "warn",
|
|
48
|
+
"simple-import-sort/exports": "warn",
|
|
49
|
+
"@stylistic/quotes": ["warn", "double", { avoidEscape: true }],
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
}
|
|
50
53
|
|
|
51
54
|
const syntacticTypeScriptRules = {
|
|
52
55
|
"@typescript-eslint/no-unused-vars": [
|
|
@@ -86,7 +89,7 @@ export function createTypescriptConfigs({
|
|
|
86
89
|
files = ["**/*.ts", "**/*.tsx"],
|
|
87
90
|
} = {}) {
|
|
88
91
|
return [
|
|
89
|
-
|
|
92
|
+
createSharedRulesConfig(files),
|
|
90
93
|
{
|
|
91
94
|
name: "rules/typescript",
|
|
92
95
|
files,
|
package/src/next/index.mjs
CHANGED
|
@@ -19,7 +19,9 @@ const yasainetConfig = [
|
|
|
19
19
|
name: "rules/ignore-shadcn-ui",
|
|
20
20
|
ignores: ["src/components/shared/ui/*.{ts,tsx}"],
|
|
21
21
|
},
|
|
22
|
-
...createCommonConfigs("src/features"
|
|
22
|
+
...createCommonConfigs("src/features", {
|
|
23
|
+
rulesFiles: ["src/**/*.ts", "src/**/*.tsx"],
|
|
24
|
+
}),
|
|
23
25
|
...libBoundaryConfigs,
|
|
24
26
|
...calleeBoundaryConfigs,
|
|
25
27
|
...hooksLayerConfigs,
|
package/src/node/index.mjs
CHANGED
|
@@ -6,7 +6,10 @@ const nodeEntryPointConfigs = createEntryPointConfigs(
|
|
|
6
6
|
);
|
|
7
7
|
|
|
8
8
|
const yasainetConfig = [
|
|
9
|
-
...createCommonConfigs("scripts/features", {
|
|
9
|
+
...createCommonConfigs("scripts/features", {
|
|
10
|
+
banAliasImports: true,
|
|
11
|
+
rulesFiles: ["scripts/**/*.ts"],
|
|
12
|
+
}),
|
|
10
13
|
...nodeEntryPointConfigs,
|
|
11
14
|
];
|
|
12
15
|
|