@maz-ui/eslint-config 4.2.1 → 4.3.0-rc.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 +42 -5
  2. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -30,13 +30,47 @@ function baseRules(isProduction) {
30
30
  };
31
31
  }
32
32
 
33
+ const GLOBAL_IGNORES = [
34
+ "**/node_modules",
35
+ "**/dist",
36
+ "**/package-lock.json",
37
+ "**/yarn.lock",
38
+ "**/pnpm-lock.yaml",
39
+ "**/bun.lockb",
40
+ "**/output",
41
+ "**/coverage",
42
+ "**/temp",
43
+ "**/.temp",
44
+ "**/tmp",
45
+ "**/.tmp",
46
+ "**/.history",
47
+ "**/.vitepress/cache",
48
+ "**/.nuxt",
49
+ "**/.next",
50
+ "**/.svelte-kit",
51
+ "**/.vercel",
52
+ "**/.changeset",
53
+ "**/.idea",
54
+ "**/.cache",
55
+ "**/.output",
56
+ "**/.vite-inspect",
57
+ "**/.yarn",
58
+ "**/vite.config.*.timestamp-*",
59
+ "**/*.min.*",
60
+ "**/LICENSE*",
61
+ "**/__snapshots__",
62
+ "**/auto-import?(s).d.ts",
63
+ "**/components.d.ts"
64
+ ];
65
+
33
66
  const markdown = {
34
- ignores: ["**/*.md"],
67
+ files: ["**/*.md/**"],
35
68
  rules: {
36
69
  "ts/no-unused-vars": "off",
37
70
  "sonarjs/unused-import": "off",
38
71
  "sonarjs/no-labels": "off",
39
- "sonarjs/label-position": "off"
72
+ "sonarjs/label-position": "off",
73
+ "no-console": "off"
40
74
  }
41
75
  };
42
76
 
@@ -87,11 +121,11 @@ const defaultOptions = {
87
121
  sonarjs: true,
88
122
  tailwindcss: false,
89
123
  unicorn: true,
90
- ignores: ["dist/**", "node_modules/**"],
124
+ ignores: GLOBAL_IGNORES,
91
125
  rules: {}
92
126
  };
93
127
  function defineConfig(options = {}, ...userConfigs) {
94
- const opts = { ...defaultOptions, ...options };
128
+ const opts = { ...defaultOptions, ...options, ignores: [...GLOBAL_IGNORES, ...options.ignores || []] };
95
129
  const env = opts.env || process.env.NODE_ENV || "production";
96
130
  let allRules = {
97
131
  ...baseRules(env === "production"),
@@ -151,7 +185,10 @@ function defineConfig(options = {}, ...userConfigs) {
151
185
  return antfu({
152
186
  formatters: opts.formatters,
153
187
  ...opts,
154
- rules: allRules
188
+ rules: allRules,
189
+ ignores: (() => {
190
+ return opts.ignores;
191
+ })
155
192
  }, ...additionalConfigs, ...userConfigs, markdown);
156
193
  }
157
194
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maz-ui/eslint-config",
3
3
  "type": "module",
4
- "version": "4.2.1",
4
+ "version": "4.3.0-rc.0",
5
5
  "description": "ESLint configuration for JavaScript/TypeScript projects",
6
6
  "author": "Louis Mazel <me@loicmazuel.com>",
7
7
  "license": "MIT",
@@ -47,7 +47,7 @@
47
47
  }
48
48
  },
49
49
  "dependencies": {
50
- "@antfu/eslint-config": "^6.0.0",
50
+ "@antfu/eslint-config": "^6.2.0",
51
51
  "eslint-plugin-format": "^1.0.2",
52
52
  "eslint-plugin-sonarjs": "^3.0.5",
53
53
  "eslint-plugin-tailwindcss": "^3.18.2",
@@ -55,7 +55,7 @@
55
55
  },
56
56
  "devDependencies": {
57
57
  "@types/eslint-plugin-tailwindcss": "^3.17.0",
58
- "eslint": "^9.38.0",
58
+ "eslint": "^9.39.1",
59
59
  "unbuild": "^3.6.1"
60
60
  },
61
61
  "lint-staged": {