@vp-tw/eslint-config 0.0.20 → 0.0.21

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.
@@ -29,24 +29,33 @@ const mdx = async ({
29
29
  name: "vdustr/mdx/processor"
30
30
  };
31
31
  const rulesConfig = (0, _defu.default)(options.mdx, {
32
- ...(0, _esToolkit.omit)(mdxPlugin.flat, ["plugins", "processor"]),
33
- name: "vdustr/mdx/rules",
34
- rules: (0, _renameRules.renameRules)(mdxPlugin.flat.rules ?? {}),
32
+ ignores: [
35
33
  /**
36
34
  * Handled by `@eslint/markdown`.
37
35
  */
38
- ignores: [...(mdxPlugin.flat.ignores ?? []), _eslintConfig.GLOB_MARKDOWN]
36
+ _eslintConfig.GLOB_MARKDOWN]
37
+ }, {
38
+ ...(0, _esToolkit.omit)(mdxPlugin.flat, ["plugins", "processor"]),
39
+ name: "vdustr/mdx/rules",
40
+ rules: (0, _renameRules.renameRules)(mdxPlugin.flat.rules ?? {}),
41
+ ignores: mdxPlugin.flat.ignores ?? []
39
42
  });
40
43
  const configs = [setupConfig, processorConfig, rulesConfig];
41
44
  if (codeBlocks) {
42
45
  const codeBlocksConfig = (0, _defu.default)(codeBlocksOptions, {
43
- ...mdxPlugin.flatCodeBlocks,
44
- name: "vdustr/mdx/code-blocks",
45
- rules: (0, _renameRules.renameRules)(mdxPlugin.flatCodeBlocks.rules ?? {}),
46
+ rules: {
47
+ "import/no-default-export": "off"
48
+ },
49
+ ignores: [
46
50
  /**
47
51
  * Handled by `@eslint/markdown`.
48
52
  */
49
- ignores: [...(mdxPlugin.flatCodeBlocks.ignores ?? []), _eslintConfig.GLOB_MARKDOWN_CODE]
53
+ _eslintConfig.GLOB_MARKDOWN_CODE]
54
+ }, {
55
+ ...mdxPlugin.flatCodeBlocks,
56
+ name: "vdustr/mdx/code-blocks",
57
+ rules: (0, _renameRules.renameRules)(mdxPlugin.flatCodeBlocks.rules ?? {}),
58
+ ignores: mdxPlugin.flatCodeBlocks.ignores ?? []
50
59
  });
51
60
  configs.push(codeBlocksConfig);
52
61
  }
@@ -28,30 +28,43 @@ const mdx = async ({
28
28
  };
29
29
  const rulesConfig = defu(
30
30
  options.mdx,
31
+ {
32
+ ignores: [
33
+ /**
34
+ * Handled by `@eslint/markdown`.
35
+ */
36
+ GLOB_MARKDOWN
37
+ ]
38
+ },
31
39
  {
32
40
  ...omit(mdxPlugin.flat, ["plugins", "processor"]),
33
41
  name: "vdustr/mdx/rules",
34
42
  rules: renameRules(mdxPlugin.flat.rules ?? {}),
35
- /**
36
- * Handled by `@eslint/markdown`.
37
- */
38
- ignores: [...mdxPlugin.flat.ignores ?? [], GLOB_MARKDOWN]
43
+ ignores: mdxPlugin.flat.ignores ?? []
39
44
  }
40
45
  );
41
46
  const configs = [setupConfig, processorConfig, rulesConfig];
42
47
  if (codeBlocks) {
43
- const codeBlocksConfig = defu(codeBlocksOptions, {
44
- ...mdxPlugin.flatCodeBlocks,
45
- name: "vdustr/mdx/code-blocks",
46
- rules: renameRules(mdxPlugin.flatCodeBlocks.rules ?? {}),
47
- /**
48
- * Handled by `@eslint/markdown`.
49
- */
50
- ignores: [
51
- ...mdxPlugin.flatCodeBlocks.ignores ?? [],
52
- GLOB_MARKDOWN_CODE
53
- ]
54
- });
48
+ const codeBlocksConfig = defu(
49
+ codeBlocksOptions,
50
+ {
51
+ rules: {
52
+ "import/no-default-export": "off"
53
+ },
54
+ ignores: [
55
+ /**
56
+ * Handled by `@eslint/markdown`.
57
+ */
58
+ GLOB_MARKDOWN_CODE
59
+ ]
60
+ },
61
+ {
62
+ ...mdxPlugin.flatCodeBlocks,
63
+ name: "vdustr/mdx/code-blocks",
64
+ rules: renameRules(mdxPlugin.flatCodeBlocks.rules ?? {}),
65
+ ignores: mdxPlugin.flatCodeBlocks.ignores ?? []
66
+ }
67
+ );
55
68
  configs.push(codeBlocksConfig);
56
69
  }
57
70
  return configs;
@@ -21,8 +21,6 @@ const javascript = (composer, options) => {
21
21
  */
22
22
  "no-unused-vars": "off",
23
23
  "unused-imports/no-unused-vars": "off",
24
- "unused-imports/no-unused-imports-ts": "off",
25
- "unused-imports/no-unused-vars-ts": "off",
26
24
  "unused-imports/no-unused-imports": "off"
27
25
  }
28
26
  },
@@ -41,13 +41,7 @@ const vdustr = (options, ...userConfigs) => {
41
41
  config = config.append(
42
42
  mdx({
43
43
  ...mdxOptions,
44
- codeBlocks: !mdxFlatCodeBlocksEnabled ? false : {
45
- ...mdxFlatCodeBlocksOptions,
46
- rules: {
47
- "import/no-default-export": "off",
48
- ...mdxFlatCodeBlocksOptions?.rules
49
- }
50
- }
44
+ codeBlocks: !mdxFlatCodeBlocksEnabled ? false : mdxFlatCodeBlocksOptions
51
45
  })
52
46
  );
53
47
  }
@@ -26,8 +26,6 @@ const javascript = (composer, options) => {
26
26
  */
27
27
  "no-unused-vars": "off",
28
28
  "unused-imports/no-unused-vars": "off",
29
- "unused-imports/no-unused-imports-ts": "off",
30
- "unused-imports/no-unused-vars-ts": "off",
31
29
  "unused-imports/no-unused-imports": "off"
32
30
  }
33
31
  }, omittedConfig);
package/dist/vdustr.js CHANGED
@@ -43,13 +43,7 @@ const vdustr = (options, ...userConfigs) => {
43
43
  };
44
44
  config = config.append((0, _mdx.mdx)({
45
45
  ...mdxOptions,
46
- codeBlocks: !mdxFlatCodeBlocksEnabled ? false : {
47
- ...mdxFlatCodeBlocksOptions,
48
- rules: {
49
- "import/no-default-export": "off",
50
- ...mdxFlatCodeBlocksOptions?.rules
51
- }
52
- }
46
+ codeBlocks: !mdxFlatCodeBlocksEnabled ? false : mdxFlatCodeBlocksOptions
53
47
  }));
54
48
  }
55
49
  const prettierEnabled = Boolean(options?.prettier ?? true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vp-tw/eslint-config",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
4
4
  "description": "ViPro's ESLint configuration",
5
5
  "homepage": "https://github.com/vdustr/eslint-config",
6
6
  "author": {