@evaneos/front-config 1.0.2 → 1.0.3
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/README.md +19 -8
- package/config/tsconfig.json +16 -14
- package/eslint/index.js +108 -0
- package/eslint/index.js.map +1 -0
- package/eslint/index.mjs +80 -0
- package/eslint/index.mjs.map +1 -0
- package/package.json +39 -30
- package/linting/eslint.config.js +0 -33
- package/linting/prettier.js +0 -5
- package/linting/rules/override.js +0 -24
- package/linting/rules/react.js +0 -15
- package/linting/rules/test.js +0 -6
package/README.md
CHANGED
|
@@ -8,17 +8,20 @@
|
|
|
8
8
|
npm install @evaneos/front-config@latest
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
#
|
|
11
|
+
# Install
|
|
12
12
|
|
|
13
13
|
## Eslint flat config
|
|
14
14
|
|
|
15
|
-
In your `eslint.config.js` file, add:
|
|
15
|
+
In your `eslint.config.(c|m)js` file, add:
|
|
16
16
|
|
|
17
|
-
```
|
|
18
|
-
const evaneosConfig = require("@evaneos/front-config/
|
|
19
|
-
module.export = [
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
```cjs
|
|
18
|
+
const evaneosConfig = require("@evaneos/front-config/eslint/eslint.config.js");
|
|
19
|
+
module.export = [...evaneosConfig];
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```mjs
|
|
23
|
+
import evaneosConfig from "@evaneos/front-config/eslint/eslint.config.mjs";
|
|
24
|
+
export default [...evaneosConfig];
|
|
22
25
|
```
|
|
23
26
|
|
|
24
27
|
## TSConfig
|
|
@@ -33,10 +36,18 @@ In your `tsconfig.json` file, add:
|
|
|
33
36
|
|
|
34
37
|
## Prettier
|
|
35
38
|
|
|
36
|
-
In your `.prettierrc` file add:
|
|
39
|
+
In your `.prettierrc.js` file add:
|
|
37
40
|
|
|
38
41
|
```js
|
|
39
42
|
module.exports = {
|
|
40
43
|
...require("@evaneos/front-config/linting/prettier-config.js"),
|
|
41
44
|
};
|
|
42
45
|
```
|
|
46
|
+
|
|
47
|
+
# Contribution
|
|
48
|
+
|
|
49
|
+
Contributing to this repo should be simple.
|
|
50
|
+
|
|
51
|
+
If you want to add a rule, plugin or anything, make a simple PR that does it, get it reviewed, merge it and then a release PR will automatically appear few minutes after.
|
|
52
|
+
Make sure you follow standard commit.
|
|
53
|
+
Merge it and it will automatically build and publish.
|
package/config/tsconfig.json
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es6",
|
|
4
|
+
"lib": ["dom", "esnext"],
|
|
5
|
+
"jsx": "react",
|
|
6
|
+
"allowJs": true,
|
|
7
|
+
"checkJs": false,
|
|
8
|
+
"noEmit": true,
|
|
9
|
+
"isolatedModules": true,
|
|
10
|
+
"strict": true,
|
|
11
|
+
"noImplicitAny": true,
|
|
12
|
+
"module": "es2020",
|
|
13
|
+
"moduleResolution": "node",
|
|
14
|
+
"esModuleInterop": true,
|
|
15
|
+
"skipLibCheck": true,
|
|
16
|
+
"resolveJsonModule": true
|
|
17
|
+
}
|
|
16
18
|
}
|
package/eslint/index.js
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __export = (target, all) => {
|
|
23
|
+
for (var name in all)
|
|
24
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
25
|
+
};
|
|
26
|
+
var __copyProps = (to, from, except, desc) => {
|
|
27
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
28
|
+
for (let key of __getOwnPropNames(from))
|
|
29
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
30
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
31
|
+
}
|
|
32
|
+
return to;
|
|
33
|
+
};
|
|
34
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
35
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
36
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
37
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
38
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
39
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
40
|
+
mod
|
|
41
|
+
));
|
|
42
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
43
|
+
|
|
44
|
+
// linting/eslint.config.ts
|
|
45
|
+
var eslint_config_exports = {};
|
|
46
|
+
__export(eslint_config_exports, {
|
|
47
|
+
default: () => eslint_config_default
|
|
48
|
+
});
|
|
49
|
+
module.exports = __toCommonJS(eslint_config_exports);
|
|
50
|
+
var import_eslint_config_prettier = __toESM(require("eslint-config-prettier"));
|
|
51
|
+
var import_js = __toESM(require("@eslint/js"));
|
|
52
|
+
var import_typescript_eslint = __toESM(require("typescript-eslint"));
|
|
53
|
+
|
|
54
|
+
// linting/rules/react.ts
|
|
55
|
+
var import_eslint_plugin_react = __toESM(require("eslint-plugin-react"));
|
|
56
|
+
var react_default = [
|
|
57
|
+
import_eslint_plugin_react.default.configs.flat.recommended,
|
|
58
|
+
import_eslint_plugin_react.default.configs.flat["jsx-runtime"],
|
|
59
|
+
{
|
|
60
|
+
rules: {
|
|
61
|
+
"react/display-name": 0,
|
|
62
|
+
"react/prop-types": 0,
|
|
63
|
+
"react/react-in-jsx-scope": 0
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
// linting/rules/test.ts
|
|
69
|
+
var import_eslint_plugin_testing_library = __toESM(require("eslint-plugin-testing-library"));
|
|
70
|
+
var test_default = __spreadValues({
|
|
71
|
+
files: ["**/__tests__/**/*.[jt]s?(x)", "**/?(*.)+(spec|test).[jt]s?(x)"]
|
|
72
|
+
}, import_eslint_plugin_testing_library.default.configs["flat/react"]);
|
|
73
|
+
|
|
74
|
+
// linting/rules/override.ts
|
|
75
|
+
var override_default = [
|
|
76
|
+
{
|
|
77
|
+
rules: {
|
|
78
|
+
"no-process-env": 0,
|
|
79
|
+
"prefer-const": 1,
|
|
80
|
+
"prefer-destructuring": 1,
|
|
81
|
+
"prefer-spread": 1,
|
|
82
|
+
"arrow-body-style": 0
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
];
|
|
86
|
+
|
|
87
|
+
// linting/eslint.config.ts
|
|
88
|
+
var eslint_config_default = import_typescript_eslint.default.config(
|
|
89
|
+
import_js.default.configs.recommended,
|
|
90
|
+
import_typescript_eslint.default.configs.recommendedTypeChecked,
|
|
91
|
+
{
|
|
92
|
+
languageOptions: {
|
|
93
|
+
parserOptions: {
|
|
94
|
+
projectService: true,
|
|
95
|
+
tsconfigRootDir: process.cwd()
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
files: ["**/*.js", "**/*.cjs"],
|
|
101
|
+
extends: [import_typescript_eslint.default.configs.disableTypeChecked]
|
|
102
|
+
},
|
|
103
|
+
import_eslint_config_prettier.default,
|
|
104
|
+
test_default,
|
|
105
|
+
...react_default,
|
|
106
|
+
...override_default
|
|
107
|
+
);
|
|
108
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../linting/eslint.config.ts","../linting/rules/react.ts","../linting/rules/test.ts","../linting/rules/override.ts"],"sourcesContent":["import eslintConfigPrettier from \"eslint-config-prettier\";\n\nimport eslint from \"@eslint/js\";\nimport tseslint from \"typescript-eslint\";\n\nimport reactLint from \"./rules/react\";\nimport testLint from \"./rules/test\";\nimport evaneosOverrides from \"./rules/override\";\n\nexport default tseslint.config(\n eslint.configs.recommended,\n tseslint.configs.recommendedTypeChecked,\n {\n languageOptions: {\n parserOptions: {\n projectService: true,\n tsconfigRootDir: process.cwd(),\n },\n },\n },\n {\n files: [\"**/*.js\", \"**/*.cjs\"],\n extends: [tseslint.configs.disableTypeChecked],\n },\n eslintConfigPrettier,\n testLint,\n ...reactLint,\n // custom evaneos rules\n ...evaneosOverrides\n);\n","import reactPlugin from \"eslint-plugin-react\";\n\nexport default [\n reactPlugin.configs.flat.recommended,\n reactPlugin.configs.flat[\"jsx-runtime\"],\n {\n rules: {\n \"react/display-name\": 0,\n \"react/prop-types\": 0,\n \"react/react-in-jsx-scope\": 0,\n },\n },\n];\n","import testingLibrary from \"eslint-plugin-testing-library\";\r\n\r\nexport default {\r\n files: [\"**/__tests__/**/*.[jt]s?(x)\", \"**/?(*.)+(spec|test).[jt]s?(x)\"],\r\n ...testingLibrary.configs[\"flat/react\"],\r\n};\r\n","export default [\n {\n rules: {\n \"no-process-env\": 0,\n \"prefer-const\": 1,\n \"prefer-destructuring\": 1,\n \"prefer-spread\": 1,\n \"arrow-body-style\": 0,\n },\n },\n] as const;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oCAAiC;AAEjC,gBAAmB;AACnB,+BAAqB;;;ACHrB,iCAAwB;AAExB,IAAO,gBAAQ;AAAA,EACb,2BAAAA,QAAY,QAAQ,KAAK;AAAA,EACzB,2BAAAA,QAAY,QAAQ,KAAK,aAAa;AAAA,EACtC;AAAA,IACE,OAAO;AAAA,MACL,sBAAsB;AAAA,MACtB,oBAAoB;AAAA,MACpB,4BAA4B;AAAA,IAC9B;AAAA,EACF;AACF;;;ACZA,2CAA2B;AAE3B,IAAO,eAAQ;AAAA,EACb,OAAO,CAAC,+BAA+B,gCAAgC;AAAA,GACpE,qCAAAC,QAAe,QAAQ,YAAY;;;ACJxC,IAAO,mBAAQ;AAAA,EACb;AAAA,IACE,OAAO;AAAA,MACL,kBAAkB;AAAA,MAClB,gBAAgB;AAAA,MAChB,wBAAwB;AAAA,MACxB,iBAAiB;AAAA,MACjB,oBAAoB;AAAA,IACtB;AAAA,EACF;AACF;;;AHDA,IAAO,wBAAQ,yBAAAC,QAAS;AAAA,EACtB,UAAAC,QAAO,QAAQ;AAAA,EACf,yBAAAD,QAAS,QAAQ;AAAA,EACjB;AAAA,IACE,iBAAiB;AAAA,MACf,eAAe;AAAA,QACb,gBAAgB;AAAA,QAChB,iBAAiB,QAAQ,IAAI;AAAA,MAC/B;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,OAAO,CAAC,WAAW,UAAU;AAAA,IAC7B,SAAS,CAAC,yBAAAA,QAAS,QAAQ,kBAAkB;AAAA,EAC/C;AAAA,EACA,8BAAAE;AAAA,EACA;AAAA,EACA,GAAG;AAAA,EAEH,GAAG;AACL;","names":["reactPlugin","testingLibrary","tseslint","eslint","eslintConfigPrettier"]}
|
package/eslint/index.mjs
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// linting/eslint.config.ts
|
|
19
|
+
import eslintConfigPrettier from "eslint-config-prettier";
|
|
20
|
+
import eslint from "@eslint/js";
|
|
21
|
+
import tseslint from "typescript-eslint";
|
|
22
|
+
|
|
23
|
+
// linting/rules/react.ts
|
|
24
|
+
import reactPlugin from "eslint-plugin-react";
|
|
25
|
+
var react_default = [
|
|
26
|
+
reactPlugin.configs.flat.recommended,
|
|
27
|
+
reactPlugin.configs.flat["jsx-runtime"],
|
|
28
|
+
{
|
|
29
|
+
rules: {
|
|
30
|
+
"react/display-name": 0,
|
|
31
|
+
"react/prop-types": 0,
|
|
32
|
+
"react/react-in-jsx-scope": 0
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
// linting/rules/test.ts
|
|
38
|
+
import testingLibrary from "eslint-plugin-testing-library";
|
|
39
|
+
var test_default = __spreadValues({
|
|
40
|
+
files: ["**/__tests__/**/*.[jt]s?(x)", "**/?(*.)+(spec|test).[jt]s?(x)"]
|
|
41
|
+
}, testingLibrary.configs["flat/react"]);
|
|
42
|
+
|
|
43
|
+
// linting/rules/override.ts
|
|
44
|
+
var override_default = [
|
|
45
|
+
{
|
|
46
|
+
rules: {
|
|
47
|
+
"no-process-env": 0,
|
|
48
|
+
"prefer-const": 1,
|
|
49
|
+
"prefer-destructuring": 1,
|
|
50
|
+
"prefer-spread": 1,
|
|
51
|
+
"arrow-body-style": 0
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
];
|
|
55
|
+
|
|
56
|
+
// linting/eslint.config.ts
|
|
57
|
+
var eslint_config_default = tseslint.config(
|
|
58
|
+
eslint.configs.recommended,
|
|
59
|
+
tseslint.configs.recommendedTypeChecked,
|
|
60
|
+
{
|
|
61
|
+
languageOptions: {
|
|
62
|
+
parserOptions: {
|
|
63
|
+
projectService: true,
|
|
64
|
+
tsconfigRootDir: process.cwd()
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
files: ["**/*.js", "**/*.cjs"],
|
|
70
|
+
extends: [tseslint.configs.disableTypeChecked]
|
|
71
|
+
},
|
|
72
|
+
eslintConfigPrettier,
|
|
73
|
+
test_default,
|
|
74
|
+
...react_default,
|
|
75
|
+
...override_default
|
|
76
|
+
);
|
|
77
|
+
export {
|
|
78
|
+
eslint_config_default as default
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../linting/eslint.config.ts","../linting/rules/react.ts","../linting/rules/test.ts","../linting/rules/override.ts"],"sourcesContent":["import eslintConfigPrettier from \"eslint-config-prettier\";\n\nimport eslint from \"@eslint/js\";\nimport tseslint from \"typescript-eslint\";\n\nimport reactLint from \"./rules/react\";\nimport testLint from \"./rules/test\";\nimport evaneosOverrides from \"./rules/override\";\n\nexport default tseslint.config(\n eslint.configs.recommended,\n tseslint.configs.recommendedTypeChecked,\n {\n languageOptions: {\n parserOptions: {\n projectService: true,\n tsconfigRootDir: process.cwd(),\n },\n },\n },\n {\n files: [\"**/*.js\", \"**/*.cjs\"],\n extends: [tseslint.configs.disableTypeChecked],\n },\n eslintConfigPrettier,\n testLint,\n ...reactLint,\n // custom evaneos rules\n ...evaneosOverrides\n);\n","import reactPlugin from \"eslint-plugin-react\";\n\nexport default [\n reactPlugin.configs.flat.recommended,\n reactPlugin.configs.flat[\"jsx-runtime\"],\n {\n rules: {\n \"react/display-name\": 0,\n \"react/prop-types\": 0,\n \"react/react-in-jsx-scope\": 0,\n },\n },\n];\n","import testingLibrary from \"eslint-plugin-testing-library\";\r\n\r\nexport default {\r\n files: [\"**/__tests__/**/*.[jt]s?(x)\", \"**/?(*.)+(spec|test).[jt]s?(x)\"],\r\n ...testingLibrary.configs[\"flat/react\"],\r\n};\r\n","export default [\n {\n rules: {\n \"no-process-env\": 0,\n \"prefer-const\": 1,\n \"prefer-destructuring\": 1,\n \"prefer-spread\": 1,\n \"arrow-body-style\": 0,\n },\n },\n] as const;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAO,0BAA0B;AAEjC,OAAO,YAAY;AACnB,OAAO,cAAc;;;ACHrB,OAAO,iBAAiB;AAExB,IAAO,gBAAQ;AAAA,EACb,YAAY,QAAQ,KAAK;AAAA,EACzB,YAAY,QAAQ,KAAK,aAAa;AAAA,EACtC;AAAA,IACE,OAAO;AAAA,MACL,sBAAsB;AAAA,MACtB,oBAAoB;AAAA,MACpB,4BAA4B;AAAA,IAC9B;AAAA,EACF;AACF;;;ACZA,OAAO,oBAAoB;AAE3B,IAAO,eAAQ;AAAA,EACb,OAAO,CAAC,+BAA+B,gCAAgC;AAAA,GACpE,eAAe,QAAQ,YAAY;;;ACJxC,IAAO,mBAAQ;AAAA,EACb;AAAA,IACE,OAAO;AAAA,MACL,kBAAkB;AAAA,MAClB,gBAAgB;AAAA,MAChB,wBAAwB;AAAA,MACxB,iBAAiB;AAAA,MACjB,oBAAoB;AAAA,IACtB;AAAA,EACF;AACF;;;AHDA,IAAO,wBAAQ,SAAS;AAAA,EACtB,OAAO,QAAQ;AAAA,EACf,SAAS,QAAQ;AAAA,EACjB;AAAA,IACE,iBAAiB;AAAA,MACf,eAAe;AAAA,QACb,gBAAgB;AAAA,QAChB,iBAAiB,QAAQ,IAAI;AAAA,MAC/B;AAAA,IACF;AAAA,EACF;AAAA,EACA;AAAA,IACE,OAAO,CAAC,WAAW,UAAU;AAAA,IAC7B,SAAS,CAAC,SAAS,QAAQ,kBAAkB;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AAAA,EAEH,GAAG;AACL;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,32 +1,41 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
2
|
+
"name": "@evaneos/front-config",
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"engines": {
|
|
5
|
+
"node": ">=v18",
|
|
6
|
+
"npm": ">=9"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"eslint/*",
|
|
10
|
+
"config/*",
|
|
11
|
+
"README.md"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"prepare": "husky",
|
|
15
|
+
"build": "tsup",
|
|
16
|
+
"lint": "eslint -c ./eslint.config.ts",
|
|
17
|
+
"prettier:check": "prettier --check linting/",
|
|
18
|
+
"prettier:fix": "prettier --write linting/"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@commitlint/cli": "^19.4.0",
|
|
22
|
+
"@commitlint/config-conventional": "^19.2.2",
|
|
23
|
+
"@types/eslint-config-prettier": "^6.11.3",
|
|
24
|
+
"commitlint-plugin-function-rules": "^4.0.0",
|
|
25
|
+
"globals": "^15.14.0",
|
|
26
|
+
"husky": "^9.1.4",
|
|
27
|
+
"jiti": "^2.4.2",
|
|
28
|
+
"prettier": "3.4.2",
|
|
29
|
+
"tsup": "^8.3.5"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@eslint/js": "^9.18.0",
|
|
33
|
+
"eslint": "^9.18.0",
|
|
34
|
+
"eslint-config-prettier": "^9.1.0",
|
|
35
|
+
"eslint-plugin-import": "^2.31.0",
|
|
36
|
+
"eslint-plugin-react": "^7.37.3",
|
|
37
|
+
"eslint-plugin-testing-library": "^6.5.0",
|
|
38
|
+
"typescript": "^5.7.2",
|
|
39
|
+
"typescript-eslint": "^8.19.0"
|
|
40
|
+
}
|
|
32
41
|
}
|
package/linting/eslint.config.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
const eslintConfigPrettier = require("eslint-config-prettier");
|
|
4
|
-
|
|
5
|
-
const eslint = require("@eslint/js");
|
|
6
|
-
const tseslint = require("typescript-eslint");
|
|
7
|
-
|
|
8
|
-
const reactLint = require("./rules/react");
|
|
9
|
-
const testLint = require("./rules/test");
|
|
10
|
-
const evaneosOverrides = require("./rules/override");
|
|
11
|
-
|
|
12
|
-
module.exports = tseslint.config(
|
|
13
|
-
eslint.configs.recommended,
|
|
14
|
-
tseslint.configs.recommendedTypeChecked,
|
|
15
|
-
{
|
|
16
|
-
languageOptions: {
|
|
17
|
-
parserOptions: {
|
|
18
|
-
projectService: true,
|
|
19
|
-
tsconfigRootDir: __dirname,
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
files: ["**/*.js"],
|
|
25
|
-
extends: [tseslint.configs.disableTypeChecked],
|
|
26
|
-
},
|
|
27
|
-
eslintConfigPrettier,
|
|
28
|
-
testLint,
|
|
29
|
-
// @ts-expect-error
|
|
30
|
-
...reactLint,
|
|
31
|
-
// custom evaneos rules
|
|
32
|
-
...evaneosOverrides
|
|
33
|
-
);
|
package/linting/prettier.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
module.exports = [
|
|
2
|
-
{
|
|
3
|
-
rules: {
|
|
4
|
-
"import/no-default-export": 2,
|
|
5
|
-
"import/newline-after-import": 1,
|
|
6
|
-
"import/no-duplicates": 2,
|
|
7
|
-
"import/order": [
|
|
8
|
-
"warn",
|
|
9
|
-
{
|
|
10
|
-
alphabetize: {
|
|
11
|
-
order: "asc",
|
|
12
|
-
caseInsensitive: true,
|
|
13
|
-
},
|
|
14
|
-
"newlines-between": "always",
|
|
15
|
-
},
|
|
16
|
-
],
|
|
17
|
-
"no-process-env": 0,
|
|
18
|
-
"prefer-const": 1,
|
|
19
|
-
"prefer-destructuring": 1,
|
|
20
|
-
"prefer-spread": 1,
|
|
21
|
-
"arrow-body-style": 0,
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
];
|
package/linting/rules/react.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
const reactPlugin = require("eslint-plugin-react");
|
|
2
|
-
|
|
3
|
-
module.exports = [
|
|
4
|
-
reactPlugin.configs.flat.recommended,
|
|
5
|
-
reactPlugin.configs.flat["jsx-runtime"],
|
|
6
|
-
{
|
|
7
|
-
rules: {
|
|
8
|
-
"react-hooks/exhaustive-deps": 1,
|
|
9
|
-
"react-hooks/rules-of-hooks": 2,
|
|
10
|
-
"react/display-name": 0,
|
|
11
|
-
"react/prop-types": 0,
|
|
12
|
-
"react/react-in-jsx-scope": 0,
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
];
|