@icebreakers/eslint-config 0.3.4 → 0.3.5
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 +8 -3
- package/dist/index.mjs +8 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
const eslintPluginPrettierRecommended = require('eslint-plugin-prettier/recommended');
|
|
4
4
|
const localPkg = require('local-pkg');
|
|
5
|
-
const tailwind = require('eslint-plugin-tailwindcss');
|
|
6
5
|
const eslintConfig = require('@antfu/eslint-config');
|
|
7
6
|
|
|
8
7
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
9
8
|
|
|
10
9
|
const eslintPluginPrettierRecommended__default = /*#__PURE__*/_interopDefaultCompat(eslintPluginPrettierRecommended);
|
|
11
|
-
const tailwind__default = /*#__PURE__*/_interopDefaultCompat(tailwind);
|
|
12
10
|
|
|
13
11
|
function icebreaker(options = {}, ...userConfigs) {
|
|
14
12
|
const {
|
|
@@ -31,7 +29,14 @@ function icebreaker(options = {}, ...userConfigs) {
|
|
|
31
29
|
presets.push(eslintPluginPrettierRecommended__default);
|
|
32
30
|
}
|
|
33
31
|
if (enableTailwindcss) {
|
|
34
|
-
presets.push(
|
|
32
|
+
presets.push(
|
|
33
|
+
eslintConfig.interopDefault(
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
import('eslint-plugin-tailwindcss')
|
|
36
|
+
).then((tailwind) => {
|
|
37
|
+
return tailwind.configs["flat/recommended"];
|
|
38
|
+
})
|
|
39
|
+
);
|
|
35
40
|
}
|
|
36
41
|
if (enableMDX) {
|
|
37
42
|
presets.push(eslintConfig.interopDefault(import('eslint-plugin-mdx')).then((mdx) => {
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
|
|
2
2
|
import { isPackageExists } from 'local-pkg';
|
|
3
|
-
import tailwind from 'eslint-plugin-tailwindcss';
|
|
4
3
|
import { interopDefault, antfu } from '@antfu/eslint-config';
|
|
5
4
|
|
|
6
5
|
function icebreaker(options = {}, ...userConfigs) {
|
|
@@ -24,7 +23,14 @@ function icebreaker(options = {}, ...userConfigs) {
|
|
|
24
23
|
presets.push(eslintPluginPrettierRecommended);
|
|
25
24
|
}
|
|
26
25
|
if (enableTailwindcss) {
|
|
27
|
-
presets.push(
|
|
26
|
+
presets.push(
|
|
27
|
+
interopDefault(
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
import('eslint-plugin-tailwindcss')
|
|
30
|
+
).then((tailwind) => {
|
|
31
|
+
return tailwind.configs["flat/recommended"];
|
|
32
|
+
})
|
|
33
|
+
);
|
|
28
34
|
}
|
|
29
35
|
if (enableMDX) {
|
|
30
36
|
presets.push(interopDefault(import('eslint-plugin-mdx')).then((mdx) => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icebreakers/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.5",
|
|
5
5
|
"description": "icebreakers's eslint config",
|
|
6
6
|
"author": "SonOfMagic <qq1324318532@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"dist"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@antfu/eslint-config": "2.
|
|
36
|
+
"@antfu/eslint-config": "2.20.0",
|
|
37
37
|
"eslint-config-prettier": "^9.1.0",
|
|
38
38
|
"eslint-plugin-mdx": "^3.1.5",
|
|
39
39
|
"eslint-plugin-prettier": "^5.1.3",
|