@maz-ui/eslint-config 4.3.1-alpha.2 → 4.3.1-beta.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.
Files changed (2) hide show
  1. package/dist/index.mjs +1 -11
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1,5 +1,3 @@
1
- import { readFileSync } from 'node:fs';
2
- import { resolve } from 'node:path';
3
1
  import antfu from '@antfu/eslint-config';
4
2
  import sonarjs from 'eslint-plugin-sonarjs';
5
3
  import tailwind from 'eslint-plugin-tailwindcss';
@@ -126,14 +124,6 @@ const defaultOptions = {
126
124
  ignores: GLOBAL_IGNORES,
127
125
  rules: {}
128
126
  };
129
- function getPackageJson() {
130
- const packageJsonPath = resolve(process.cwd(), "package.json");
131
- return JSON.parse(readFileSync(packageJsonPath, "utf-8"));
132
- }
133
- function hasVueDependency() {
134
- const packageJson = getPackageJson();
135
- return packageJson.dependencies?.vue || packageJson.dependencies?.["@vue/*"] || packageJson.devDependencies?.vue || packageJson.devDependencies?.["@vue/*"] || packageJson.optionalDependencies?.vue || packageJson.optionalDependencies?.["@vue/*"];
136
- }
137
127
  function defineConfig(options = {}, ...userConfigs) {
138
128
  const opts = { ...defaultOptions, ...options, ignores: [...GLOBAL_IGNORES, ...options.ignores || []] };
139
129
  const env = opts.env || process.env.NODE_ENV || "production";
@@ -141,7 +131,7 @@ function defineConfig(options = {}, ...userConfigs) {
141
131
  ...baseRules(env === "production"),
142
132
  ...opts.rules
143
133
  };
144
- if (opts.vue || opts.vueAccessibility || hasVueDependency()) {
134
+ if (opts.vue || opts.formatters) {
145
135
  allRules = {
146
136
  ...allRules,
147
137
  ...vueRules
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maz-ui/eslint-config",
3
3
  "type": "module",
4
- "version": "4.3.1-alpha.2",
4
+ "version": "4.3.1-beta.0",
5
5
  "description": "ESLint configuration for JavaScript/TypeScript projects",
6
6
  "author": "Louis Mazel <me@loicmazuel.com>",
7
7
  "license": "MIT",