@evaneos/front-config 5.1.2 → 5.1.4
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/eslint/index.js +4 -21
- package/eslint/index.mjs +4 -21
- package/package.json +1 -1
package/eslint/index.js
CHANGED
|
@@ -3124,25 +3124,9 @@ var test_default = [
|
|
|
3124
3124
|
];
|
|
3125
3125
|
|
|
3126
3126
|
// src/eslint/rules/override.ts
|
|
3127
|
-
var import_fs = require("fs");
|
|
3128
|
-
var import_path = require("path");
|
|
3129
|
-
function hasNextJs() {
|
|
3130
|
-
try {
|
|
3131
|
-
const packageJsonPath = (0, import_path.join)(process.cwd(), "package.json");
|
|
3132
|
-
if (!(0, import_fs.existsSync)(packageJsonPath)) {
|
|
3133
|
-
return false;
|
|
3134
|
-
}
|
|
3135
|
-
const packageJsonContent = (0, import_fs.readFileSync)(packageJsonPath, "utf8");
|
|
3136
|
-
const packageJson = JSON.parse(packageJsonContent);
|
|
3137
|
-
const dependencies = __spreadValues(__spreadValues({}, packageJson.dependencies), packageJson.devDependencies);
|
|
3138
|
-
return "next" in dependencies;
|
|
3139
|
-
} catch (e) {
|
|
3140
|
-
return false;
|
|
3141
|
-
}
|
|
3142
|
-
}
|
|
3143
3127
|
var override_default = [
|
|
3144
3128
|
{
|
|
3145
|
-
rules:
|
|
3129
|
+
rules: {
|
|
3146
3130
|
"no-process-env": 0,
|
|
3147
3131
|
"prefer-const": 1,
|
|
3148
3132
|
"prefer-destructuring": 1,
|
|
@@ -3154,20 +3138,19 @@ var override_default = [
|
|
|
3154
3138
|
"react/jsx-uses-react": "error",
|
|
3155
3139
|
"react/jsx-uses-vars": "error",
|
|
3156
3140
|
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
3157
|
-
"@typescript-eslint/no-unsafe-assignment": "off"
|
|
3158
|
-
}, hasNextJs() ? {
|
|
3141
|
+
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
3159
3142
|
"no-restricted-imports": [
|
|
3160
3143
|
"warn",
|
|
3161
3144
|
{
|
|
3162
3145
|
paths: [
|
|
3163
3146
|
{
|
|
3164
3147
|
name: "react-intl",
|
|
3165
|
-
message: "Use next-intl instead of 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"
|
|
3166
3149
|
}
|
|
3167
3150
|
]
|
|
3168
3151
|
}
|
|
3169
3152
|
]
|
|
3170
|
-
}
|
|
3153
|
+
}
|
|
3171
3154
|
}
|
|
3172
3155
|
];
|
|
3173
3156
|
|
package/eslint/index.mjs
CHANGED
|
@@ -3113,25 +3113,9 @@ var test_default = [
|
|
|
3113
3113
|
];
|
|
3114
3114
|
|
|
3115
3115
|
// src/eslint/rules/override.ts
|
|
3116
|
-
import { existsSync, readFileSync } from "fs";
|
|
3117
|
-
import { join } from "path";
|
|
3118
|
-
function hasNextJs() {
|
|
3119
|
-
try {
|
|
3120
|
-
const packageJsonPath = join(process.cwd(), "package.json");
|
|
3121
|
-
if (!existsSync(packageJsonPath)) {
|
|
3122
|
-
return false;
|
|
3123
|
-
}
|
|
3124
|
-
const packageJsonContent = readFileSync(packageJsonPath, "utf8");
|
|
3125
|
-
const packageJson = JSON.parse(packageJsonContent);
|
|
3126
|
-
const dependencies = __spreadValues(__spreadValues({}, packageJson.dependencies), packageJson.devDependencies);
|
|
3127
|
-
return "next" in dependencies;
|
|
3128
|
-
} catch (e) {
|
|
3129
|
-
return false;
|
|
3130
|
-
}
|
|
3131
|
-
}
|
|
3132
3116
|
var override_default = [
|
|
3133
3117
|
{
|
|
3134
|
-
rules:
|
|
3118
|
+
rules: {
|
|
3135
3119
|
"no-process-env": 0,
|
|
3136
3120
|
"prefer-const": 1,
|
|
3137
3121
|
"prefer-destructuring": 1,
|
|
@@ -3143,20 +3127,19 @@ var override_default = [
|
|
|
3143
3127
|
"react/jsx-uses-react": "error",
|
|
3144
3128
|
"react/jsx-uses-vars": "error",
|
|
3145
3129
|
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
3146
|
-
"@typescript-eslint/no-unsafe-assignment": "off"
|
|
3147
|
-
}, hasNextJs() ? {
|
|
3130
|
+
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
3148
3131
|
"no-restricted-imports": [
|
|
3149
3132
|
"warn",
|
|
3150
3133
|
{
|
|
3151
3134
|
paths: [
|
|
3152
3135
|
{
|
|
3153
3136
|
name: "react-intl",
|
|
3154
|
-
message: "Use next-intl instead of 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"
|
|
3155
3138
|
}
|
|
3156
3139
|
]
|
|
3157
3140
|
}
|
|
3158
3141
|
]
|
|
3159
|
-
}
|
|
3142
|
+
}
|
|
3160
3143
|
}
|
|
3161
3144
|
];
|
|
3162
3145
|
|