@evaneos/front-config 5.1.4 → 5.2.0
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 +13 -1
- package/eslint/index.js +79 -43
- package/eslint/index.mjs +76 -40
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ In your `eslint.config.(c|m)js` file, add:
|
|
|
16
16
|
|
|
17
17
|
```cjs
|
|
18
18
|
const evaneosConfig = require('@evaneos/front-config/eslint/index.js');
|
|
19
|
-
module.
|
|
19
|
+
module.exports = [...evaneosConfig];
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
```mjs
|
|
@@ -105,6 +105,18 @@ module.exports = {
|
|
|
105
105
|
};
|
|
106
106
|
```
|
|
107
107
|
|
|
108
|
+
# Development
|
|
109
|
+
|
|
110
|
+
## Local Development Files
|
|
111
|
+
|
|
112
|
+
The following files at the repository root are **only for development experience within this repository** and are **not exported** as part of the package:
|
|
113
|
+
|
|
114
|
+
- `tsconfig.json` - TypeScript configuration for developing this package
|
|
115
|
+
- `eslint.config.ts` - ESLint configuration for linting this repository's source code
|
|
116
|
+
- `.prettierrc.js` - Prettier configuration for formatting this repository's code
|
|
117
|
+
|
|
118
|
+
These files are not included in the published package and should not be used as examples for consuming projects.
|
|
119
|
+
|
|
108
120
|
# Contribution
|
|
109
121
|
|
|
110
122
|
Contributing to this repo should be simple.
|
package/eslint/index.js
CHANGED
|
@@ -3059,24 +3059,91 @@ var require_globals2 = __commonJS({
|
|
|
3059
3059
|
}
|
|
3060
3060
|
});
|
|
3061
3061
|
|
|
3062
|
-
// src/eslint/
|
|
3063
|
-
var
|
|
3064
|
-
__export(
|
|
3065
|
-
default: () =>
|
|
3062
|
+
// src/eslint/shared.config.ts
|
|
3063
|
+
var shared_config_exports = {};
|
|
3064
|
+
__export(shared_config_exports, {
|
|
3065
|
+
default: () => shared_config_default
|
|
3066
3066
|
});
|
|
3067
|
-
module.exports = __toCommonJS(
|
|
3068
|
-
var import_eslint_config_prettier = __toESM(require("eslint-config-prettier"));
|
|
3067
|
+
module.exports = __toCommonJS(shared_config_exports);
|
|
3069
3068
|
var import_js = __toESM(require("@eslint/js"));
|
|
3069
|
+
var import_eslint_config_prettier = __toESM(require("eslint-config-prettier"));
|
|
3070
3070
|
var import_typescript_eslint = __toESM(require("typescript-eslint"));
|
|
3071
3071
|
|
|
3072
|
+
// src/eslint/rules/override.ts
|
|
3073
|
+
var import_eslint_plugin_import = __toESM(require("eslint-plugin-import"));
|
|
3074
|
+
var override_default = [
|
|
3075
|
+
{
|
|
3076
|
+
plugins: {
|
|
3077
|
+
import: import_eslint_plugin_import.default
|
|
3078
|
+
},
|
|
3079
|
+
rules: {
|
|
3080
|
+
"no-process-env": "off",
|
|
3081
|
+
"prefer-const": "warn",
|
|
3082
|
+
"prefer-destructuring": "warn",
|
|
3083
|
+
"prefer-spread": "warn",
|
|
3084
|
+
"arrow-body-style": "off",
|
|
3085
|
+
"react/display-name": "off",
|
|
3086
|
+
"react/prop-types": "off",
|
|
3087
|
+
"react/react-in-jsx-scope": "off",
|
|
3088
|
+
"react/jsx-uses-react": "error",
|
|
3089
|
+
"react/jsx-uses-vars": "error",
|
|
3090
|
+
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
3091
|
+
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
3092
|
+
"no-restricted-imports": [
|
|
3093
|
+
"warn",
|
|
3094
|
+
{
|
|
3095
|
+
paths: [
|
|
3096
|
+
{
|
|
3097
|
+
name: "react-intl",
|
|
3098
|
+
message: "Use next-intl instead of react-intl.\nADR: https://next-intl-docs.vercel.app/\nADR: https://www.notion.so/leather-yard-6b5/ADR-Next-intl-et-internationalisation-d-une-app-Next-17da97006602800bafd9cf4ebdfde508"
|
|
3099
|
+
}
|
|
3100
|
+
]
|
|
3101
|
+
}
|
|
3102
|
+
],
|
|
3103
|
+
"import/order": [
|
|
3104
|
+
"warn",
|
|
3105
|
+
{
|
|
3106
|
+
alphabetize: {
|
|
3107
|
+
order: "asc",
|
|
3108
|
+
caseInsensitive: true
|
|
3109
|
+
},
|
|
3110
|
+
"newlines-between": "always",
|
|
3111
|
+
pathGroups: [
|
|
3112
|
+
{
|
|
3113
|
+
pattern: "@/**",
|
|
3114
|
+
group: "parent",
|
|
3115
|
+
position: "before"
|
|
3116
|
+
}
|
|
3117
|
+
]
|
|
3118
|
+
}
|
|
3119
|
+
],
|
|
3120
|
+
"padding-line-between-statements": [
|
|
3121
|
+
"error",
|
|
3122
|
+
{
|
|
3123
|
+
blankLine: "always",
|
|
3124
|
+
// Ligne vide obligatoire après directive
|
|
3125
|
+
prev: "directive",
|
|
3126
|
+
next: "*"
|
|
3127
|
+
},
|
|
3128
|
+
{
|
|
3129
|
+
blankLine: "never",
|
|
3130
|
+
// Interdire ligne vide entre directives
|
|
3131
|
+
prev: "directive",
|
|
3132
|
+
next: "directive"
|
|
3133
|
+
}
|
|
3134
|
+
]
|
|
3135
|
+
}
|
|
3136
|
+
}
|
|
3137
|
+
];
|
|
3138
|
+
|
|
3072
3139
|
// src/eslint/rules/react.ts
|
|
3073
|
-
var import_eslint_plugin_react = __toESM(require("eslint-plugin-react"));
|
|
3074
3140
|
var import_eslint_plugin_jsx_a11y = __toESM(require("eslint-plugin-jsx-a11y"));
|
|
3141
|
+
var import_eslint_plugin_react = __toESM(require("eslint-plugin-react"));
|
|
3075
3142
|
var import_globals = __toESM(require_globals2());
|
|
3076
3143
|
var _a, _b;
|
|
3077
3144
|
var react_default = [
|
|
3078
|
-
(_a = import_eslint_plugin_react.default.configs.flat) == null ? void 0 : _a.recommended,
|
|
3079
|
-
(_b = import_eslint_plugin_react.default.configs.flat) == null ? void 0 : _b["jsx-runtime"],
|
|
3145
|
+
...((_a = import_eslint_plugin_react.default.configs.flat) == null ? void 0 : _a.recommended) ? [import_eslint_plugin_react.default.configs.flat.recommended] : [],
|
|
3146
|
+
...((_b = import_eslint_plugin_react.default.configs.flat) == null ? void 0 : _b["jsx-runtime"]) ? [import_eslint_plugin_react.default.configs.flat["jsx-runtime"]] : [],
|
|
3080
3147
|
{
|
|
3081
3148
|
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx}"],
|
|
3082
3149
|
plugins: {
|
|
@@ -3102,8 +3169,8 @@ var react_default = [
|
|
|
3102
3169
|
];
|
|
3103
3170
|
|
|
3104
3171
|
// src/eslint/rules/test.ts
|
|
3105
|
-
var import_eslint_plugin_testing_library = __toESM(require("eslint-plugin-testing-library"));
|
|
3106
3172
|
var import_eslint_plugin_jest = __toESM(require("eslint-plugin-jest"));
|
|
3173
|
+
var import_eslint_plugin_testing_library = __toESM(require("eslint-plugin-testing-library"));
|
|
3107
3174
|
var test_default = [
|
|
3108
3175
|
__spreadValues({
|
|
3109
3176
|
files: ["**/__tests__/**/*.[jt]s?(x)", "**/?(*.)+(spec|test).[jt]s?(x)"]
|
|
@@ -3123,39 +3190,8 @@ var test_default = [
|
|
|
3123
3190
|
}
|
|
3124
3191
|
];
|
|
3125
3192
|
|
|
3126
|
-
// src/eslint/
|
|
3127
|
-
var
|
|
3128
|
-
{
|
|
3129
|
-
rules: {
|
|
3130
|
-
"no-process-env": 0,
|
|
3131
|
-
"prefer-const": 1,
|
|
3132
|
-
"prefer-destructuring": 1,
|
|
3133
|
-
"prefer-spread": 1,
|
|
3134
|
-
"arrow-body-style": 0,
|
|
3135
|
-
"react/display-name": 0,
|
|
3136
|
-
"react/prop-types": 0,
|
|
3137
|
-
"react/react-in-jsx-scope": 0,
|
|
3138
|
-
"react/jsx-uses-react": "error",
|
|
3139
|
-
"react/jsx-uses-vars": "error",
|
|
3140
|
-
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
3141
|
-
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
3142
|
-
"no-restricted-imports": [
|
|
3143
|
-
"warn",
|
|
3144
|
-
{
|
|
3145
|
-
paths: [
|
|
3146
|
-
{
|
|
3147
|
-
name: "react-intl",
|
|
3148
|
-
message: "Use next-intl instead of react-intl.\nADR: https://next-intl-docs.vercel.app/\nADR: https://www.notion.so/leather-yard-6b5/ADR-Next-intl-et-internationalisation-d-une-app-Next-17da97006602800bafd9cf4ebdfde508"
|
|
3149
|
-
}
|
|
3150
|
-
]
|
|
3151
|
-
}
|
|
3152
|
-
]
|
|
3153
|
-
}
|
|
3154
|
-
}
|
|
3155
|
-
];
|
|
3156
|
-
|
|
3157
|
-
// src/eslint/eslint.config.ts
|
|
3158
|
-
var eslint_config_default = import_typescript_eslint.default.config(
|
|
3193
|
+
// src/eslint/shared.config.ts
|
|
3194
|
+
var shared_config_default = import_typescript_eslint.default.config(
|
|
3159
3195
|
import_js.default.configs.recommended,
|
|
3160
3196
|
import_typescript_eslint.default.configs.recommendedTypeChecked,
|
|
3161
3197
|
{
|
package/eslint/index.mjs
CHANGED
|
@@ -3053,19 +3053,86 @@ var require_globals2 = __commonJS({
|
|
|
3053
3053
|
}
|
|
3054
3054
|
});
|
|
3055
3055
|
|
|
3056
|
-
// src/eslint/
|
|
3057
|
-
import eslintConfigPrettier from "eslint-config-prettier";
|
|
3056
|
+
// src/eslint/shared.config.ts
|
|
3058
3057
|
import eslint from "@eslint/js";
|
|
3058
|
+
import eslintConfigPrettier from "eslint-config-prettier";
|
|
3059
3059
|
import tseslint from "typescript-eslint";
|
|
3060
3060
|
|
|
3061
|
+
// src/eslint/rules/override.ts
|
|
3062
|
+
import importPlugin from "eslint-plugin-import";
|
|
3063
|
+
var override_default = [
|
|
3064
|
+
{
|
|
3065
|
+
plugins: {
|
|
3066
|
+
import: importPlugin
|
|
3067
|
+
},
|
|
3068
|
+
rules: {
|
|
3069
|
+
"no-process-env": "off",
|
|
3070
|
+
"prefer-const": "warn",
|
|
3071
|
+
"prefer-destructuring": "warn",
|
|
3072
|
+
"prefer-spread": "warn",
|
|
3073
|
+
"arrow-body-style": "off",
|
|
3074
|
+
"react/display-name": "off",
|
|
3075
|
+
"react/prop-types": "off",
|
|
3076
|
+
"react/react-in-jsx-scope": "off",
|
|
3077
|
+
"react/jsx-uses-react": "error",
|
|
3078
|
+
"react/jsx-uses-vars": "error",
|
|
3079
|
+
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
3080
|
+
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
3081
|
+
"no-restricted-imports": [
|
|
3082
|
+
"warn",
|
|
3083
|
+
{
|
|
3084
|
+
paths: [
|
|
3085
|
+
{
|
|
3086
|
+
name: "react-intl",
|
|
3087
|
+
message: "Use next-intl instead of react-intl.\nADR: https://next-intl-docs.vercel.app/\nADR: https://www.notion.so/leather-yard-6b5/ADR-Next-intl-et-internationalisation-d-une-app-Next-17da97006602800bafd9cf4ebdfde508"
|
|
3088
|
+
}
|
|
3089
|
+
]
|
|
3090
|
+
}
|
|
3091
|
+
],
|
|
3092
|
+
"import/order": [
|
|
3093
|
+
"warn",
|
|
3094
|
+
{
|
|
3095
|
+
alphabetize: {
|
|
3096
|
+
order: "asc",
|
|
3097
|
+
caseInsensitive: true
|
|
3098
|
+
},
|
|
3099
|
+
"newlines-between": "always",
|
|
3100
|
+
pathGroups: [
|
|
3101
|
+
{
|
|
3102
|
+
pattern: "@/**",
|
|
3103
|
+
group: "parent",
|
|
3104
|
+
position: "before"
|
|
3105
|
+
}
|
|
3106
|
+
]
|
|
3107
|
+
}
|
|
3108
|
+
],
|
|
3109
|
+
"padding-line-between-statements": [
|
|
3110
|
+
"error",
|
|
3111
|
+
{
|
|
3112
|
+
blankLine: "always",
|
|
3113
|
+
// Ligne vide obligatoire après directive
|
|
3114
|
+
prev: "directive",
|
|
3115
|
+
next: "*"
|
|
3116
|
+
},
|
|
3117
|
+
{
|
|
3118
|
+
blankLine: "never",
|
|
3119
|
+
// Interdire ligne vide entre directives
|
|
3120
|
+
prev: "directive",
|
|
3121
|
+
next: "directive"
|
|
3122
|
+
}
|
|
3123
|
+
]
|
|
3124
|
+
}
|
|
3125
|
+
}
|
|
3126
|
+
];
|
|
3127
|
+
|
|
3061
3128
|
// src/eslint/rules/react.ts
|
|
3062
3129
|
var import_globals = __toESM(require_globals2());
|
|
3063
|
-
import reactPlugin from "eslint-plugin-react";
|
|
3064
3130
|
import jsxA11y from "eslint-plugin-jsx-a11y";
|
|
3131
|
+
import reactPlugin from "eslint-plugin-react";
|
|
3065
3132
|
var _a, _b;
|
|
3066
3133
|
var react_default = [
|
|
3067
|
-
(_a = reactPlugin.configs.flat) == null ? void 0 : _a.recommended,
|
|
3068
|
-
(_b = reactPlugin.configs.flat) == null ? void 0 : _b["jsx-runtime"],
|
|
3134
|
+
...((_a = reactPlugin.configs.flat) == null ? void 0 : _a.recommended) ? [reactPlugin.configs.flat.recommended] : [],
|
|
3135
|
+
...((_b = reactPlugin.configs.flat) == null ? void 0 : _b["jsx-runtime"]) ? [reactPlugin.configs.flat["jsx-runtime"]] : [],
|
|
3069
3136
|
{
|
|
3070
3137
|
files: ["**/*.{js,jsx,mjs,cjs,ts,tsx}"],
|
|
3071
3138
|
plugins: {
|
|
@@ -3091,8 +3158,8 @@ var react_default = [
|
|
|
3091
3158
|
];
|
|
3092
3159
|
|
|
3093
3160
|
// src/eslint/rules/test.ts
|
|
3094
|
-
import testingLibrary from "eslint-plugin-testing-library";
|
|
3095
3161
|
import pluginJest from "eslint-plugin-jest";
|
|
3162
|
+
import testingLibrary from "eslint-plugin-testing-library";
|
|
3096
3163
|
var test_default = [
|
|
3097
3164
|
__spreadValues({
|
|
3098
3165
|
files: ["**/__tests__/**/*.[jt]s?(x)", "**/?(*.)+(spec|test).[jt]s?(x)"]
|
|
@@ -3112,39 +3179,8 @@ var test_default = [
|
|
|
3112
3179
|
}
|
|
3113
3180
|
];
|
|
3114
3181
|
|
|
3115
|
-
// src/eslint/
|
|
3116
|
-
var
|
|
3117
|
-
{
|
|
3118
|
-
rules: {
|
|
3119
|
-
"no-process-env": 0,
|
|
3120
|
-
"prefer-const": 1,
|
|
3121
|
-
"prefer-destructuring": 1,
|
|
3122
|
-
"prefer-spread": 1,
|
|
3123
|
-
"arrow-body-style": 0,
|
|
3124
|
-
"react/display-name": 0,
|
|
3125
|
-
"react/prop-types": 0,
|
|
3126
|
-
"react/react-in-jsx-scope": 0,
|
|
3127
|
-
"react/jsx-uses-react": "error",
|
|
3128
|
-
"react/jsx-uses-vars": "error",
|
|
3129
|
-
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
3130
|
-
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
3131
|
-
"no-restricted-imports": [
|
|
3132
|
-
"warn",
|
|
3133
|
-
{
|
|
3134
|
-
paths: [
|
|
3135
|
-
{
|
|
3136
|
-
name: "react-intl",
|
|
3137
|
-
message: "Use next-intl instead of react-intl.\nADR: https://next-intl-docs.vercel.app/\nADR: https://www.notion.so/leather-yard-6b5/ADR-Next-intl-et-internationalisation-d-une-app-Next-17da97006602800bafd9cf4ebdfde508"
|
|
3138
|
-
}
|
|
3139
|
-
]
|
|
3140
|
-
}
|
|
3141
|
-
]
|
|
3142
|
-
}
|
|
3143
|
-
}
|
|
3144
|
-
];
|
|
3145
|
-
|
|
3146
|
-
// src/eslint/eslint.config.ts
|
|
3147
|
-
var eslint_config_default = tseslint.config(
|
|
3182
|
+
// src/eslint/shared.config.ts
|
|
3183
|
+
var shared_config_default = tseslint.config(
|
|
3148
3184
|
eslint.configs.recommended,
|
|
3149
3185
|
tseslint.configs.recommendedTypeChecked,
|
|
3150
3186
|
{
|
|
@@ -3165,5 +3201,5 @@ var eslint_config_default = tseslint.config(
|
|
|
3165
3201
|
...override_default
|
|
3166
3202
|
);
|
|
3167
3203
|
export {
|
|
3168
|
-
|
|
3204
|
+
shared_config_default as default
|
|
3169
3205
|
};
|