@akanjs/lint 0.0.73 → 0.0.75
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/index.js +19 -13
- package/index.mjs +4 -13
- package/package.json +8 -2
- package/pkgs/@akanjs/lint/index.d.ts +2 -9
- package/pkgs/@akanjs/lint/src/lint.config.d.ts +119 -0
- package/pkgs/@akanjs/lint/src/lintRule.d.ts +9 -0
- package/src/lint.config.js +141 -0
- package/src/lint.config.mjs +112 -0
- package/src/lintRule.js +35 -0
- package/src/lintRule.mjs +16 -0
package/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
7
|
var __export = (target, all) => {
|
|
6
8
|
for (var name in all)
|
|
@@ -14,21 +16,25 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
14
16
|
}
|
|
15
17
|
return to;
|
|
16
18
|
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
17
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
28
|
var lint_exports = {};
|
|
19
29
|
__export(lint_exports, {
|
|
20
|
-
|
|
30
|
+
akanjsLint: () => import_lintRule.default,
|
|
31
|
+
eslintConfig: () => import_lint.default
|
|
21
32
|
});
|
|
22
33
|
module.exports = __toCommonJS(lint_exports);
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
noImportClientFunctions: import_noImportClientFunctions.noImportClientFunctions,
|
|
31
|
-
nonScalarPropsRestricted: import_nonScalarPropsRestricted.nonScalarPropsRestricted,
|
|
32
|
-
useClientByFile: import_useClientByFile.useClientByFile
|
|
33
|
-
}
|
|
34
|
-
};
|
|
34
|
+
var import_lintRule = __toESM(require("./src/lintRule"));
|
|
35
|
+
var import_lint = __toESM(require("./src/lint.config"));
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {
|
|
38
|
+
akanjsLint,
|
|
39
|
+
eslintConfig
|
|
40
|
+
});
|
package/index.mjs
CHANGED
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { nonScalarPropsRestricted } from "./src/rules/nonScalarPropsRestricted";
|
|
4
|
-
import { useClientByFile } from "./src/rules/useClientByFile";
|
|
5
|
-
var lint_default = {
|
|
6
|
-
rules: {
|
|
7
|
-
noImportExternalLibrary,
|
|
8
|
-
noImportClientFunctions,
|
|
9
|
-
nonScalarPropsRestricted,
|
|
10
|
-
useClientByFile
|
|
11
|
-
}
|
|
12
|
-
};
|
|
1
|
+
import { default as default2 } from "./src/lintRule";
|
|
2
|
+
import { default as default3 } from "./src/lint.config";
|
|
13
3
|
export {
|
|
14
|
-
|
|
4
|
+
default2 as akanjsLint,
|
|
5
|
+
default3 as eslintConfig
|
|
15
6
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akanjs/lint",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.75",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -15,7 +15,13 @@
|
|
|
15
15
|
"node": ">=22"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@
|
|
18
|
+
"@eslint/eslintrc": "^3.2.0",
|
|
19
|
+
"@eslint/js": "9.19.0",
|
|
20
|
+
"@typescript-eslint/eslint-plugin": "^8.29.1",
|
|
21
|
+
"@typescript-eslint/parser": "^8.29.1",
|
|
22
|
+
"@typescript-eslint/utils": "^8.29.1",
|
|
23
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
24
|
+
"eslint-plugin-unused-imports": "^4.1.4"
|
|
19
25
|
},
|
|
20
26
|
"exports": {
|
|
21
27
|
".": {
|
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
noImportExternalLibrary: import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"noImportExternalLibrary", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
4
|
-
noImportClientFunctions: import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"noImportClientFunctions", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
5
|
-
nonScalarPropsRestricted: import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"nonScalarPropsRestricted", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
6
|
-
useClientByFile: import("@typescript-eslint/utils/dist/ts-eslint").RuleModule<"noUseClient" | "forceUseClient", [], unknown, import("@typescript-eslint/utils/dist/ts-eslint").RuleListener>;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
export default _default;
|
|
1
|
+
export { default as akanjsLint } from "./src/lintRule";
|
|
2
|
+
export { default as eslintConfig } from "./src/lint.config";
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import tsParser from "@typescript-eslint/parser";
|
|
2
|
+
declare const _default: (import("eslint").Linter.Config<import("eslint").Linter.RulesRecord> | {
|
|
3
|
+
plugins: {
|
|
4
|
+
"@akanjs/lint": {
|
|
5
|
+
rules: {
|
|
6
|
+
noImportExternalLibrary: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noImportExternalLibrary", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
7
|
+
noImportClientFunctions: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noImportClientFunctions", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
8
|
+
nonScalarPropsRestricted: import("@typescript-eslint/utils/ts-eslint").RuleModule<"nonScalarPropsRestricted", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
9
|
+
useClientByFile: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noUseClient" | "forceUseClient", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
"unused-imports": import("eslint").ESLint.Plugin;
|
|
13
|
+
"simple-import-sort": import("eslint").ESLint.Plugin;
|
|
14
|
+
"@typescript-eslint": {
|
|
15
|
+
configs: Record<string, import("@typescript-eslint/utils/ts-eslint").ClassicConfig.Config>;
|
|
16
|
+
meta: import("@typescript-eslint/utils/ts-eslint").FlatConfig.PluginMeta;
|
|
17
|
+
rules: typeof import("@typescript-eslint/eslint-plugin/use-at-your-own-risk/rules");
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
languageOptions: {
|
|
21
|
+
parser: typeof tsParser;
|
|
22
|
+
ecmaVersion: number;
|
|
23
|
+
sourceType: string;
|
|
24
|
+
parserOptions: {
|
|
25
|
+
project: boolean;
|
|
26
|
+
projectService: boolean;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
settings: {
|
|
30
|
+
"import/parsers": {
|
|
31
|
+
"@typescript-eslint/parser": string[];
|
|
32
|
+
};
|
|
33
|
+
"import/resolver": {
|
|
34
|
+
typescript: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
files?: undefined;
|
|
38
|
+
ignores?: undefined;
|
|
39
|
+
rules?: undefined;
|
|
40
|
+
} | {
|
|
41
|
+
files: string[];
|
|
42
|
+
ignores: string[];
|
|
43
|
+
rules: {
|
|
44
|
+
"no-console": string;
|
|
45
|
+
"@akanjs/lint/useClientByFile": string;
|
|
46
|
+
"@akanjs/lint/noImportClientFunctions": string;
|
|
47
|
+
"@akanjs/lint/nonScalarPropsRestricted": string;
|
|
48
|
+
"@akanjs/lint/noImportExternalLibrary": string;
|
|
49
|
+
"@typescript-eslint/no-inferrable-types": string;
|
|
50
|
+
"@typescript-eslint/restrict-template-expressions": string;
|
|
51
|
+
"@typescript-eslint/consistent-indexed-object-style": string;
|
|
52
|
+
"@typescript-eslint/no-extraneous-class": string;
|
|
53
|
+
"@typescript-eslint/no-unsafe-enum-comparison": string;
|
|
54
|
+
"@typescript-eslint/prefer-promise-reject-errors": string;
|
|
55
|
+
"@typescript-eslint/no-misused-promises": (string | {
|
|
56
|
+
checksVoidReturn: boolean;
|
|
57
|
+
})[];
|
|
58
|
+
"react/display-name": string;
|
|
59
|
+
"react-hooks/exhaustive-deps": string;
|
|
60
|
+
"@next/next/no-html-link-for-pages": string;
|
|
61
|
+
"jsx-a11y/alt-text": number[];
|
|
62
|
+
"unused-imports/no-unused-imports": string;
|
|
63
|
+
"no-unused-vars": string;
|
|
64
|
+
"simple-import-sort/imports": string;
|
|
65
|
+
"simple-import-sort/exports": string;
|
|
66
|
+
"import/first": string;
|
|
67
|
+
"import/newline-after-import": string;
|
|
68
|
+
"import/no-duplicates"?: undefined;
|
|
69
|
+
"import/no-unresolved"?: undefined;
|
|
70
|
+
"import/named"?: undefined;
|
|
71
|
+
"import/namespace"?: undefined;
|
|
72
|
+
"@typescript-eslint/no-explicit-any"?: undefined;
|
|
73
|
+
"@typescript-eslint/no-unused-vars"?: undefined;
|
|
74
|
+
"@typescript-eslint/no-misused-spread"?: undefined;
|
|
75
|
+
"react-hooks/rules-of-hooks"?: undefined;
|
|
76
|
+
};
|
|
77
|
+
plugins?: undefined;
|
|
78
|
+
languageOptions?: undefined;
|
|
79
|
+
settings?: undefined;
|
|
80
|
+
} | {
|
|
81
|
+
files: string[];
|
|
82
|
+
rules: {
|
|
83
|
+
"import/no-duplicates": string;
|
|
84
|
+
"import/no-unresolved": string;
|
|
85
|
+
"import/named": string;
|
|
86
|
+
"import/namespace": string;
|
|
87
|
+
"@typescript-eslint/no-explicit-any": string;
|
|
88
|
+
"@typescript-eslint/no-unused-vars": string;
|
|
89
|
+
"@typescript-eslint/no-misused-spread": string;
|
|
90
|
+
"react-hooks/rules-of-hooks": string;
|
|
91
|
+
"no-console"?: undefined;
|
|
92
|
+
"@akanjs/lint/useClientByFile"?: undefined;
|
|
93
|
+
"@akanjs/lint/noImportClientFunctions"?: undefined;
|
|
94
|
+
"@akanjs/lint/nonScalarPropsRestricted"?: undefined;
|
|
95
|
+
"@akanjs/lint/noImportExternalLibrary"?: undefined;
|
|
96
|
+
"@typescript-eslint/no-inferrable-types"?: undefined;
|
|
97
|
+
"@typescript-eslint/restrict-template-expressions"?: undefined;
|
|
98
|
+
"@typescript-eslint/consistent-indexed-object-style"?: undefined;
|
|
99
|
+
"@typescript-eslint/no-extraneous-class"?: undefined;
|
|
100
|
+
"@typescript-eslint/no-unsafe-enum-comparison"?: undefined;
|
|
101
|
+
"@typescript-eslint/prefer-promise-reject-errors"?: undefined;
|
|
102
|
+
"@typescript-eslint/no-misused-promises"?: undefined;
|
|
103
|
+
"react/display-name"?: undefined;
|
|
104
|
+
"react-hooks/exhaustive-deps"?: undefined;
|
|
105
|
+
"@next/next/no-html-link-for-pages"?: undefined;
|
|
106
|
+
"jsx-a11y/alt-text"?: undefined;
|
|
107
|
+
"unused-imports/no-unused-imports"?: undefined;
|
|
108
|
+
"no-unused-vars"?: undefined;
|
|
109
|
+
"simple-import-sort/imports"?: undefined;
|
|
110
|
+
"simple-import-sort/exports"?: undefined;
|
|
111
|
+
"import/first"?: undefined;
|
|
112
|
+
"import/newline-after-import"?: undefined;
|
|
113
|
+
};
|
|
114
|
+
plugins?: undefined;
|
|
115
|
+
languageOptions?: undefined;
|
|
116
|
+
settings?: undefined;
|
|
117
|
+
ignores?: undefined;
|
|
118
|
+
})[];
|
|
119
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const akanLint: {
|
|
2
|
+
rules: {
|
|
3
|
+
noImportExternalLibrary: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noImportExternalLibrary", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
4
|
+
noImportClientFunctions: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noImportClientFunctions", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
5
|
+
nonScalarPropsRestricted: import("@typescript-eslint/utils/ts-eslint").RuleModule<"nonScalarPropsRestricted", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
6
|
+
useClientByFile: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noUseClient" | "forceUseClient", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export default akanLint;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var lint_config_exports = {};
|
|
29
|
+
__export(lint_config_exports, {
|
|
30
|
+
default: () => lint_config_default
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(lint_config_exports);
|
|
33
|
+
var import_eslintrc = require("@eslint/eslintrc");
|
|
34
|
+
var import_js = __toESM(require("@eslint/js"));
|
|
35
|
+
var import_eslint_plugin = __toESM(require("@typescript-eslint/eslint-plugin"));
|
|
36
|
+
var import_parser = __toESM(require("@typescript-eslint/parser"));
|
|
37
|
+
var import_eslint_plugin_simple_import_sort = __toESM(require("eslint-plugin-simple-import-sort"));
|
|
38
|
+
var import_eslint_plugin_unused_imports = __toESM(require("eslint-plugin-unused-imports"));
|
|
39
|
+
var import_lintRule = __toESM(require("./lintRule"));
|
|
40
|
+
const compat = new import_eslintrc.FlatCompat({
|
|
41
|
+
baseDirectory: __dirname,
|
|
42
|
+
recommendedConfig: import_js.default.configs.recommended,
|
|
43
|
+
allConfig: import_js.default.configs.all
|
|
44
|
+
});
|
|
45
|
+
var lint_config_default = [
|
|
46
|
+
{
|
|
47
|
+
ignores: [
|
|
48
|
+
"**/node_modules/**/*",
|
|
49
|
+
"**/photoshop/**/*",
|
|
50
|
+
"**/public/**/*",
|
|
51
|
+
"**/ios/**/*",
|
|
52
|
+
"**/android/**/*",
|
|
53
|
+
"**/*.js",
|
|
54
|
+
"**/*.jsx",
|
|
55
|
+
"**/.next/**/*",
|
|
56
|
+
"**/typechain-types/**/*",
|
|
57
|
+
"**/script*.ts",
|
|
58
|
+
"data/**/*",
|
|
59
|
+
"dist/**/*",
|
|
60
|
+
"releases/**/*"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
...compat.extends(
|
|
64
|
+
"next",
|
|
65
|
+
"next/core-web-vitals",
|
|
66
|
+
"eslint:recommended",
|
|
67
|
+
"plugin:@typescript-eslint/recommended-type-checked",
|
|
68
|
+
"plugin:@typescript-eslint/strict-type-checked",
|
|
69
|
+
"plugin:@typescript-eslint/stylistic-type-checked"
|
|
70
|
+
),
|
|
71
|
+
{
|
|
72
|
+
plugins: {
|
|
73
|
+
"@akanjs/lint": import_lintRule.default,
|
|
74
|
+
"unused-imports": import_eslint_plugin_unused_imports.default,
|
|
75
|
+
"simple-import-sort": import_eslint_plugin_simple_import_sort.default,
|
|
76
|
+
"@typescript-eslint": import_eslint_plugin.default
|
|
77
|
+
},
|
|
78
|
+
languageOptions: {
|
|
79
|
+
parser: import_parser.default,
|
|
80
|
+
ecmaVersion: 6,
|
|
81
|
+
sourceType: "module",
|
|
82
|
+
parserOptions: {
|
|
83
|
+
project: true,
|
|
84
|
+
projectService: true
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
settings: {
|
|
88
|
+
"import/parsers": {
|
|
89
|
+
"@typescript-eslint/parser": [".ts", ".tsx"]
|
|
90
|
+
},
|
|
91
|
+
"import/resolver": {
|
|
92
|
+
typescript: "./tsconfig.json"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
files: ["**/*.ts", "**/*.tsx"],
|
|
98
|
+
ignores: ["**/*.js", "**/*.jsx"],
|
|
99
|
+
rules: {
|
|
100
|
+
"no-console": "error",
|
|
101
|
+
"@akanjs/lint/useClientByFile": "error",
|
|
102
|
+
"@akanjs/lint/noImportClientFunctions": "error",
|
|
103
|
+
"@akanjs/lint/nonScalarPropsRestricted": "error",
|
|
104
|
+
"@akanjs/lint/noImportExternalLibrary": "error",
|
|
105
|
+
"@typescript-eslint/no-inferrable-types": "off",
|
|
106
|
+
"@typescript-eslint/restrict-template-expressions": "off",
|
|
107
|
+
"@typescript-eslint/consistent-indexed-object-style": "off",
|
|
108
|
+
"@typescript-eslint/no-extraneous-class": "off",
|
|
109
|
+
"@typescript-eslint/no-unsafe-enum-comparison": "off",
|
|
110
|
+
"@typescript-eslint/prefer-promise-reject-errors": "off",
|
|
111
|
+
"@typescript-eslint/no-misused-promises": ["error", { checksVoidReturn: false }],
|
|
112
|
+
"react/display-name": "off",
|
|
113
|
+
"react-hooks/exhaustive-deps": "off",
|
|
114
|
+
"@next/next/no-html-link-for-pages": "off",
|
|
115
|
+
"jsx-a11y/alt-text": [0],
|
|
116
|
+
"unused-imports/no-unused-imports": "warn",
|
|
117
|
+
"no-unused-vars": "off",
|
|
118
|
+
"simple-import-sort/imports": "warn",
|
|
119
|
+
"simple-import-sort/exports": "off",
|
|
120
|
+
"import/first": "warn",
|
|
121
|
+
"import/newline-after-import": "warn"
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
...compat.extends("plugin:@typescript-eslint/recommended").map((config) => ({
|
|
125
|
+
...config,
|
|
126
|
+
files: ["**/*.ts", "**/*.tsx"]
|
|
127
|
+
})),
|
|
128
|
+
{
|
|
129
|
+
files: ["**/*.ts", "**/*.tsx"],
|
|
130
|
+
rules: {
|
|
131
|
+
"import/no-duplicates": "warn",
|
|
132
|
+
"import/no-unresolved": "off",
|
|
133
|
+
"import/named": "off",
|
|
134
|
+
"import/namespace": "off",
|
|
135
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
136
|
+
"@typescript-eslint/no-unused-vars": "off",
|
|
137
|
+
"@typescript-eslint/no-misused-spread": "off",
|
|
138
|
+
"react-hooks/rules-of-hooks": "off"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
];
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { FlatCompat } from "@eslint/eslintrc";
|
|
2
|
+
import js from "@eslint/js";
|
|
3
|
+
import typescriptEslint from "@typescript-eslint/eslint-plugin";
|
|
4
|
+
import tsParser from "@typescript-eslint/parser";
|
|
5
|
+
import simpleImportSort from "eslint-plugin-simple-import-sort";
|
|
6
|
+
import unusedImports from "eslint-plugin-unused-imports";
|
|
7
|
+
import akanjsLint from "./lintRule";
|
|
8
|
+
const compat = new FlatCompat({
|
|
9
|
+
baseDirectory: __dirname,
|
|
10
|
+
recommendedConfig: js.configs.recommended,
|
|
11
|
+
allConfig: js.configs.all
|
|
12
|
+
});
|
|
13
|
+
var lint_config_default = [
|
|
14
|
+
{
|
|
15
|
+
ignores: [
|
|
16
|
+
"**/node_modules/**/*",
|
|
17
|
+
"**/photoshop/**/*",
|
|
18
|
+
"**/public/**/*",
|
|
19
|
+
"**/ios/**/*",
|
|
20
|
+
"**/android/**/*",
|
|
21
|
+
"**/*.js",
|
|
22
|
+
"**/*.jsx",
|
|
23
|
+
"**/.next/**/*",
|
|
24
|
+
"**/typechain-types/**/*",
|
|
25
|
+
"**/script*.ts",
|
|
26
|
+
"data/**/*",
|
|
27
|
+
"dist/**/*",
|
|
28
|
+
"releases/**/*"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
...compat.extends(
|
|
32
|
+
"next",
|
|
33
|
+
"next/core-web-vitals",
|
|
34
|
+
"eslint:recommended",
|
|
35
|
+
"plugin:@typescript-eslint/recommended-type-checked",
|
|
36
|
+
"plugin:@typescript-eslint/strict-type-checked",
|
|
37
|
+
"plugin:@typescript-eslint/stylistic-type-checked"
|
|
38
|
+
),
|
|
39
|
+
{
|
|
40
|
+
plugins: {
|
|
41
|
+
"@akanjs/lint": akanjsLint,
|
|
42
|
+
"unused-imports": unusedImports,
|
|
43
|
+
"simple-import-sort": simpleImportSort,
|
|
44
|
+
"@typescript-eslint": typescriptEslint
|
|
45
|
+
},
|
|
46
|
+
languageOptions: {
|
|
47
|
+
parser: tsParser,
|
|
48
|
+
ecmaVersion: 6,
|
|
49
|
+
sourceType: "module",
|
|
50
|
+
parserOptions: {
|
|
51
|
+
project: true,
|
|
52
|
+
projectService: true
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
settings: {
|
|
56
|
+
"import/parsers": {
|
|
57
|
+
"@typescript-eslint/parser": [".ts", ".tsx"]
|
|
58
|
+
},
|
|
59
|
+
"import/resolver": {
|
|
60
|
+
typescript: "./tsconfig.json"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
files: ["**/*.ts", "**/*.tsx"],
|
|
66
|
+
ignores: ["**/*.js", "**/*.jsx"],
|
|
67
|
+
rules: {
|
|
68
|
+
"no-console": "error",
|
|
69
|
+
"@akanjs/lint/useClientByFile": "error",
|
|
70
|
+
"@akanjs/lint/noImportClientFunctions": "error",
|
|
71
|
+
"@akanjs/lint/nonScalarPropsRestricted": "error",
|
|
72
|
+
"@akanjs/lint/noImportExternalLibrary": "error",
|
|
73
|
+
"@typescript-eslint/no-inferrable-types": "off",
|
|
74
|
+
"@typescript-eslint/restrict-template-expressions": "off",
|
|
75
|
+
"@typescript-eslint/consistent-indexed-object-style": "off",
|
|
76
|
+
"@typescript-eslint/no-extraneous-class": "off",
|
|
77
|
+
"@typescript-eslint/no-unsafe-enum-comparison": "off",
|
|
78
|
+
"@typescript-eslint/prefer-promise-reject-errors": "off",
|
|
79
|
+
"@typescript-eslint/no-misused-promises": ["error", { checksVoidReturn: false }],
|
|
80
|
+
"react/display-name": "off",
|
|
81
|
+
"react-hooks/exhaustive-deps": "off",
|
|
82
|
+
"@next/next/no-html-link-for-pages": "off",
|
|
83
|
+
"jsx-a11y/alt-text": [0],
|
|
84
|
+
"unused-imports/no-unused-imports": "warn",
|
|
85
|
+
"no-unused-vars": "off",
|
|
86
|
+
"simple-import-sort/imports": "warn",
|
|
87
|
+
"simple-import-sort/exports": "off",
|
|
88
|
+
"import/first": "warn",
|
|
89
|
+
"import/newline-after-import": "warn"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
...compat.extends("plugin:@typescript-eslint/recommended").map((config) => ({
|
|
93
|
+
...config,
|
|
94
|
+
files: ["**/*.ts", "**/*.tsx"]
|
|
95
|
+
})),
|
|
96
|
+
{
|
|
97
|
+
files: ["**/*.ts", "**/*.tsx"],
|
|
98
|
+
rules: {
|
|
99
|
+
"import/no-duplicates": "warn",
|
|
100
|
+
"import/no-unresolved": "off",
|
|
101
|
+
"import/named": "off",
|
|
102
|
+
"import/namespace": "off",
|
|
103
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
104
|
+
"@typescript-eslint/no-unused-vars": "off",
|
|
105
|
+
"@typescript-eslint/no-misused-spread": "off",
|
|
106
|
+
"react-hooks/rules-of-hooks": "off"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
];
|
|
110
|
+
export {
|
|
111
|
+
lint_config_default as default
|
|
112
|
+
};
|
package/src/lintRule.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var lintRule_exports = {};
|
|
19
|
+
__export(lintRule_exports, {
|
|
20
|
+
default: () => lintRule_default
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(lintRule_exports);
|
|
23
|
+
var import_noImportClientFunctions = require("./rules/noImportClientFunctions");
|
|
24
|
+
var import_noImportExternalLibrary = require("./rules/noImportExternalLibrary");
|
|
25
|
+
var import_nonScalarPropsRestricted = require("./rules/nonScalarPropsRestricted");
|
|
26
|
+
var import_useClientByFile = require("./rules/useClientByFile");
|
|
27
|
+
const akanLint = {
|
|
28
|
+
rules: {
|
|
29
|
+
noImportExternalLibrary: import_noImportExternalLibrary.noImportExternalLibrary,
|
|
30
|
+
noImportClientFunctions: import_noImportClientFunctions.noImportClientFunctions,
|
|
31
|
+
nonScalarPropsRestricted: import_nonScalarPropsRestricted.nonScalarPropsRestricted,
|
|
32
|
+
useClientByFile: import_useClientByFile.useClientByFile
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
var lintRule_default = akanLint;
|
package/src/lintRule.mjs
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { noImportClientFunctions } from "./rules/noImportClientFunctions";
|
|
2
|
+
import { noImportExternalLibrary } from "./rules/noImportExternalLibrary";
|
|
3
|
+
import { nonScalarPropsRestricted } from "./rules/nonScalarPropsRestricted";
|
|
4
|
+
import { useClientByFile } from "./rules/useClientByFile";
|
|
5
|
+
const akanLint = {
|
|
6
|
+
rules: {
|
|
7
|
+
noImportExternalLibrary,
|
|
8
|
+
noImportClientFunctions,
|
|
9
|
+
nonScalarPropsRestricted,
|
|
10
|
+
useClientByFile
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
var lintRule_default = akanLint;
|
|
14
|
+
export {
|
|
15
|
+
lintRule_default as default
|
|
16
|
+
};
|