@maz-ui/eslint-config 5.0.0-beta.39 → 5.0.0-beta.43
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/dist/index.mjs +11 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -30,8 +30,6 @@ function baseRules(isProduction) {
|
|
|
30
30
|
"no-unassigned-vars": "error",
|
|
31
31
|
"no-useless-assignment": "error",
|
|
32
32
|
"preserve-caught-error": "error",
|
|
33
|
-
// Unicorn
|
|
34
|
-
"unicorn/prefer-global-this": "error",
|
|
35
33
|
// Test
|
|
36
34
|
"test/prefer-lowercase-title": "off",
|
|
37
35
|
// e18e
|
|
@@ -292,6 +290,13 @@ const testRules = {
|
|
|
292
290
|
"max-nested-callbacks": "off"
|
|
293
291
|
};
|
|
294
292
|
|
|
293
|
+
const unicorn = {
|
|
294
|
+
files: ["**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,vue}"],
|
|
295
|
+
rules: {
|
|
296
|
+
"unicorn/prefer-global-this": "error"
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
|
|
295
300
|
const vueRules = {
|
|
296
301
|
"vue/custom-event-name-casing": ["error", "kebab-case"]
|
|
297
302
|
};
|
|
@@ -419,6 +424,10 @@ function defineConfig(options = {}, ...userConfigs) {
|
|
|
419
424
|
});
|
|
420
425
|
log.debug(`${TAG} SonarJS: applied recommended preset + ${Object.keys(sonarjsRules).length} extra rules + test-file relaxations`);
|
|
421
426
|
}
|
|
427
|
+
if (resolved.unicorn) {
|
|
428
|
+
additionalConfigs.push(unicorn);
|
|
429
|
+
log.debug(`${TAG} Unicorn: applied JS/TS-scoped rule overrides`);
|
|
430
|
+
}
|
|
422
431
|
if (resolved.vueAccessibility) {
|
|
423
432
|
const vueA11yConfigs = vueA11y.configs["flat/recommended"];
|
|
424
433
|
const configsArray = Array.isArray(vueA11yConfigs) ? vueA11yConfigs : [vueA11yConfigs];
|
package/package.json
CHANGED