@icebreakers/eslint-config 0.3.7 → 0.3.9

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.cjs CHANGED
@@ -1,13 +1,8 @@
1
1
  'use strict';
2
2
 
3
- const eslintPluginPrettierRecommended = require('eslint-plugin-prettier/recommended');
4
3
  const localPkg = require('local-pkg');
5
4
  const eslintConfig = require('@antfu/eslint-config');
6
5
 
7
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
8
-
9
- const eslintPluginPrettierRecommended__default = /*#__PURE__*/_interopDefaultCompat(eslintPluginPrettierRecommended);
10
-
11
6
  function isPlainObject(value) {
12
7
  if (value === null || typeof value !== "object") {
13
8
  return false;
@@ -66,7 +61,6 @@ const defu = createDefu();
66
61
 
67
62
  function icebreaker(options = {}, ...userConfigs) {
68
63
  const {
69
- prettier: enablePrettier,
70
64
  tailwindcss: enableTailwindcss = localPkg.isPackageExists("tailwindcss"),
71
65
  mdx: enableMDX,
72
66
  ...opts
@@ -80,13 +74,13 @@ function icebreaker(options = {}, ...userConfigs) {
80
74
  "no-console": ["warn"],
81
75
  "ts/prefer-ts-expect-error": "off",
82
76
  "ts/ban-ts-comment": "off",
83
- "vue/attribute-hyphenation": "off"
77
+ "vue/attribute-hyphenation": "off",
78
+ // 问题在于 auto fix 的时候,会直接 remove 整个 import ,而我们想让用户自己去 remove
79
+ // 'unused-imports/no-unused-imports': 'error',
80
+ "no-unused-vars": "warn"
84
81
  }
85
82
  }
86
83
  ];
87
- if (enablePrettier) {
88
- presets.push(eslintPluginPrettierRecommended__default);
89
- }
90
84
  if (enableTailwindcss) {
91
85
  presets.push(
92
86
  eslintConfig.interopDefault(
package/dist/index.d.cts CHANGED
@@ -3,7 +3,6 @@ import { FlatConfigComposer } from 'eslint-flat-config-utils';
3
3
  import { Linter } from 'eslint';
4
4
 
5
5
  type UserDefinedOptions = OptionsConfig & TypedFlatConfigItem & {
6
- prettier?: boolean;
7
6
  tailwindcss?: boolean;
8
7
  mdx?: boolean;
9
8
  };
package/dist/index.d.mts CHANGED
@@ -3,7 +3,6 @@ import { FlatConfigComposer } from 'eslint-flat-config-utils';
3
3
  import { Linter } from 'eslint';
4
4
 
5
5
  type UserDefinedOptions = OptionsConfig & TypedFlatConfigItem & {
6
- prettier?: boolean;
7
6
  tailwindcss?: boolean;
8
7
  mdx?: boolean;
9
8
  };
package/dist/index.d.ts CHANGED
@@ -3,7 +3,6 @@ import { FlatConfigComposer } from 'eslint-flat-config-utils';
3
3
  import { Linter } from 'eslint';
4
4
 
5
5
  type UserDefinedOptions = OptionsConfig & TypedFlatConfigItem & {
6
- prettier?: boolean;
7
6
  tailwindcss?: boolean;
8
7
  mdx?: boolean;
9
8
  };
package/dist/index.mjs CHANGED
@@ -1,4 +1,3 @@
1
- import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
2
1
  import { isPackageExists } from 'local-pkg';
3
2
  import { interopDefault, antfu } from '@antfu/eslint-config';
4
3
 
@@ -60,7 +59,6 @@ const defu = createDefu();
60
59
 
61
60
  function icebreaker(options = {}, ...userConfigs) {
62
61
  const {
63
- prettier: enablePrettier,
64
62
  tailwindcss: enableTailwindcss = isPackageExists("tailwindcss"),
65
63
  mdx: enableMDX,
66
64
  ...opts
@@ -74,13 +72,13 @@ function icebreaker(options = {}, ...userConfigs) {
74
72
  "no-console": ["warn"],
75
73
  "ts/prefer-ts-expect-error": "off",
76
74
  "ts/ban-ts-comment": "off",
77
- "vue/attribute-hyphenation": "off"
75
+ "vue/attribute-hyphenation": "off",
76
+ // 问题在于 auto fix 的时候,会直接 remove 整个 import ,而我们想让用户自己去 remove
77
+ // 'unused-imports/no-unused-imports': 'error',
78
+ "no-unused-vars": "warn"
78
79
  }
79
80
  }
80
81
  ];
81
- if (enablePrettier) {
82
- presets.push(eslintPluginPrettierRecommended);
83
- }
84
82
  if (enableTailwindcss) {
85
83
  presets.push(
86
84
  interopDefault(
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@icebreakers/eslint-config",
3
3
  "type": "module",
4
- "version": "0.3.7",
4
+ "version": "0.3.9",
5
5
  "description": "icebreakers's eslint config",
6
6
  "author": "SonOfMagic <qq1324318532@gmail.com>",
7
7
  "license": "MIT",
@@ -33,13 +33,11 @@
33
33
  "dist"
34
34
  ],
35
35
  "dependencies": {
36
- "@antfu/eslint-config": "2.21.0",
37
- "eslint-config-prettier": "^9.1.0",
38
- "eslint-plugin-format": "^0.1.1",
39
- "eslint-plugin-mdx": "^3.1.5",
40
- "eslint-plugin-prettier": "^5.1.3",
41
- "eslint-plugin-tailwindcss": "^3.17.3",
42
- "local-pkg": "^0.5.0"
36
+ "@antfu/eslint-config": "2.21.1",
37
+ "eslint-plugin-format": "0.1.2",
38
+ "eslint-plugin-mdx": "3.1.5",
39
+ "eslint-plugin-tailwindcss": "3.17.4",
40
+ "local-pkg": "0.5.0"
43
41
  },
44
42
  "publishConfig": {
45
43
  "access": "public",