@akanjs/lint 0.0.76 → 0.0.77
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.d.ts +2 -0
- package/index.js +6 -13
- package/index.mjs +4 -2
- package/package.json +16 -2
- package/src/eslint.config.d.ts +118 -0
- package/src/eslint.config.js +145 -0
- package/src/eslint.config.mjs +112 -0
- package/{pkgs/@akanjs/lint/src → src}/lintRule.d.ts +1 -2
- package/src/lintRule.js +6 -3
- package/src/lintRule.mjs +2 -3
- package/pkgs/@akanjs/lint/index.d.ts +0 -1
- /package/{pkgs/@akanjs/lint/jest.config.d.ts → jest.config.d.ts} +0 -0
- /package/{pkgs/@akanjs/lint/src → src}/rules/noImportClientFunctions.d.ts +0 -0
- /package/{pkgs/@akanjs/lint/src → src}/rules/noImportExternalLibrary.d.ts +0 -0
- /package/{pkgs/@akanjs/lint/src → src}/rules/nonScalarPropsRestricted.d.ts +0 -0
- /package/{pkgs/@akanjs/lint/src → src}/rules/useClientByFile.d.ts +0 -0
- /package/{pkgs/@akanjs/lint/src → src}/util/fileHasClientFunction.d.ts +0 -0
- /package/{pkgs/@akanjs/lint/src → src}/util/fileHasContent.d.ts +0 -0
- /package/{pkgs/@akanjs/lint/src → src}/util/fileHasUseClient.d.ts +0 -0
- /package/{pkgs/@akanjs/lint/src → src}/util/fileIsPureImportFile.d.ts +0 -0
- /package/{pkgs/@akanjs/lint/src → src}/util/fileIsServerFile.d.ts +0 -0
- /package/{pkgs/@akanjs/lint/src → src}/util/getAppName.d.ts +0 -0
- /package/{pkgs/@akanjs/lint/src → src}/util/getFilename.d.ts +0 -0
- /package/{pkgs/@akanjs/lint/src → src}/util/index.d.ts +0 -0
- /package/{pkgs/@akanjs/lint/src → src}/util/isInternalImport.d.ts +0 -0
package/index.d.ts
ADDED
package/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
1
|
var __defProp = Object.defineProperty;
|
|
3
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
5
|
var __export = (target, all) => {
|
|
8
6
|
for (var name in all)
|
|
@@ -16,22 +14,17 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
14
|
}
|
|
17
15
|
return to;
|
|
18
16
|
};
|
|
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
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
18
|
var lint_exports = {};
|
|
29
19
|
__export(lint_exports, {
|
|
30
|
-
akanjsLint: () => import_lintRule.
|
|
20
|
+
akanjsLint: () => import_lintRule.akanjsLint,
|
|
21
|
+
eslintConfig: () => import_eslint.eslintConfig
|
|
31
22
|
});
|
|
32
23
|
module.exports = __toCommonJS(lint_exports);
|
|
33
|
-
var import_lintRule =
|
|
24
|
+
var import_lintRule = require("./src/lintRule");
|
|
25
|
+
var import_eslint = require("./src/eslint.config");
|
|
34
26
|
// Annotate the CommonJS export names for ESM import in node:
|
|
35
27
|
0 && (module.exports = {
|
|
36
|
-
akanjsLint
|
|
28
|
+
akanjsLint,
|
|
29
|
+
eslintConfig
|
|
37
30
|
});
|
package/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akanjs/lint",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.77",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -20,8 +20,22 @@
|
|
|
20
20
|
"@typescript-eslint/eslint-plugin": "^8.29.1",
|
|
21
21
|
"@typescript-eslint/parser": "^8.29.1",
|
|
22
22
|
"@typescript-eslint/utils": "^8.29.1",
|
|
23
|
+
"eslint": "^9.19.0",
|
|
24
|
+
"eslint-config-airbnb-typescript": "^18.0.0",
|
|
25
|
+
"eslint-config-next": "^15.1.3",
|
|
26
|
+
"eslint-config-prettier": "9.1.0",
|
|
27
|
+
"eslint-plugin-import": "^2.31.0",
|
|
28
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
29
|
+
"eslint-plugin-mocha": "^10.5.0",
|
|
30
|
+
"eslint-plugin-node": "^11.1.0",
|
|
31
|
+
"eslint-plugin-playwright": "^2.1.0",
|
|
32
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
33
|
+
"eslint-plugin-react": "^7.37.3",
|
|
34
|
+
"eslint-plugin-react-hooks": "5.1.0",
|
|
23
35
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
24
|
-
"eslint-plugin-unused-imports": "^4.1.4"
|
|
36
|
+
"eslint-plugin-unused-imports": "^4.1.4",
|
|
37
|
+
"jsonc-eslint-parser": "^2.4.0",
|
|
38
|
+
"typescript-eslint": "^8.20.0"
|
|
25
39
|
},
|
|
26
40
|
"exports": {
|
|
27
41
|
".": {
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import tsParser from "@typescript-eslint/parser";
|
|
2
|
+
export declare const eslintConfig: (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
|
+
})[];
|
|
@@ -0,0 +1,145 @@
|
|
|
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 eslint_config_exports = {};
|
|
29
|
+
__export(eslint_config_exports, {
|
|
30
|
+
eslintConfig: () => eslintConfig
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(eslint_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 = 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
|
+
const eslintConfig = [
|
|
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.akanjsLint,
|
|
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
|
+
];
|
|
142
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
143
|
+
0 && (module.exports = {
|
|
144
|
+
eslintConfig
|
|
145
|
+
});
|
|
@@ -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
|
+
const eslintConfig = [
|
|
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
|
+
eslintConfig
|
|
112
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
export declare const akanjsLint: {
|
|
2
2
|
rules: {
|
|
3
3
|
noImportExternalLibrary: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noImportExternalLibrary", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
4
4
|
noImportClientFunctions: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noImportClientFunctions", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
@@ -6,4 +6,3 @@ declare const akanLint: {
|
|
|
6
6
|
useClientByFile: import("@typescript-eslint/utils/ts-eslint").RuleModule<"noUseClient" | "forceUseClient", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
|
-
export default akanLint;
|
package/src/lintRule.js
CHANGED
|
@@ -17,14 +17,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
var lintRule_exports = {};
|
|
19
19
|
__export(lintRule_exports, {
|
|
20
|
-
|
|
20
|
+
akanjsLint: () => akanjsLint
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(lintRule_exports);
|
|
23
23
|
var import_noImportClientFunctions = require("./rules/noImportClientFunctions");
|
|
24
24
|
var import_noImportExternalLibrary = require("./rules/noImportExternalLibrary");
|
|
25
25
|
var import_nonScalarPropsRestricted = require("./rules/nonScalarPropsRestricted");
|
|
26
26
|
var import_useClientByFile = require("./rules/useClientByFile");
|
|
27
|
-
const
|
|
27
|
+
const akanjsLint = {
|
|
28
28
|
rules: {
|
|
29
29
|
noImportExternalLibrary: import_noImportExternalLibrary.noImportExternalLibrary,
|
|
30
30
|
noImportClientFunctions: import_noImportClientFunctions.noImportClientFunctions,
|
|
@@ -32,4 +32,7 @@ const akanLint = {
|
|
|
32
32
|
useClientByFile: import_useClientByFile.useClientByFile
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
|
|
35
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
36
|
+
0 && (module.exports = {
|
|
37
|
+
akanjsLint
|
|
38
|
+
});
|
package/src/lintRule.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { noImportClientFunctions } from "./rules/noImportClientFunctions";
|
|
|
2
2
|
import { noImportExternalLibrary } from "./rules/noImportExternalLibrary";
|
|
3
3
|
import { nonScalarPropsRestricted } from "./rules/nonScalarPropsRestricted";
|
|
4
4
|
import { useClientByFile } from "./rules/useClientByFile";
|
|
5
|
-
const
|
|
5
|
+
const akanjsLint = {
|
|
6
6
|
rules: {
|
|
7
7
|
noImportExternalLibrary,
|
|
8
8
|
noImportClientFunctions,
|
|
@@ -10,7 +10,6 @@ const akanLint = {
|
|
|
10
10
|
useClientByFile
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
|
-
var lintRule_default = akanLint;
|
|
14
13
|
export {
|
|
15
|
-
|
|
14
|
+
akanjsLint
|
|
16
15
|
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as akanjsLint } from "./src/lintRule";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|