@culur/config-eslint 1.0.7 → 1.1.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.
- package/CHANGELOG.md +23 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -4
- package/dist/index.d.ts +2 -4
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
- package/src/index.test.ts +1 -1
- package/src/index.ts +2 -2
- package/src/overrides/sort-package-json.test.ts +1 -1
- package/src/overrides/vue-rules.test.ts +1 -1
- package/src/types/index.test.ts +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @culur/config-eslint
|
|
2
2
|
|
|
3
|
+
## 1.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 🩹 Fix: update return type of `defineConfig` ([`b490ed9`](https://github.com/culur/culur/commit/b490ed99b9887dee0b98763adbb2e4de525d50e6)) ([@phamhongphuc](https://github.com/phamhongphuc)).
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 🎨 Style: format code ([`7106ef6`](https://github.com/culur/culur/commit/7106ef687bd13fe3e695a241a95bb2168ef67d25)) ([@phamhongphuc](https://github.com/phamhongphuc)).
|
|
12
|
+
|
|
13
|
+
- 📦 Update dependencies ([`f0a03a3`](https://github.com/culur/culur/commit/f0a03a33fbca1233f3d4fecb2e47d6adde48ae6f)) ([@phamhongphuc](https://github.com/phamhongphuc)):
|
|
14
|
+
|
|
15
|
+
- `dependencies`:
|
|
16
|
+
- `@antfu/eslint-config@^3.4.1`
|
|
17
|
+
- `devDependencies`:
|
|
18
|
+
- `@types/node@^22.5.4`
|
|
19
|
+
- `@vue/compiler-sfc@^3.5.3`
|
|
20
|
+
- `eslint@^9.10.0`
|
|
21
|
+
- `type-fest@^4.26.1`
|
|
22
|
+
|
|
23
|
+
- 📦 Update workspace dependencies:
|
|
24
|
+
- [`@culur/utils-packages@1.0.6`](https://github.com/culur/culur/tree/main/packages/utils-packages#readme)
|
|
25
|
+
|
|
3
26
|
## 1.0.7
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":["defineHasPackages","antfu","filenameRules","yamlYarnrcRules","defineOverride","sortPackageJson","vueRules"],"mappings":";;;;;;;;;;;;;;;;AAMe,SAAR,gBACF,CAAC,OAAA,GAAU,EAAI,EAAA,GAAG,WAAW,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":["defineHasPackages","antfu","filenameRules","yamlYarnrcRules","defineOverride","sortPackageJson","vueRules"],"mappings":";;;;;;;;;;;;;;;;AAMe,SAAR,gBACF,CAAC,OAAA,GAAU,EAAI,EAAA,GAAG,WAAW,CACN,EAAA;AAC1B,EAAM,MAAA,EAAE,MAAO,EAAA,GAAIA,+BAAkB,CAAA,EAAE,KAAK,CAAC,CAAC,OAAQ,CAAA,GAAA,EAAK,CAAA,CAAA;AAE3D,EAAA,MAAM,MAAS,GAAAC,sBAAA;AAAA,IACb;AAAA,MACE,UAAY,EAAA,KAAA;AAAA,MACZ,SAAW,EAAA,KAAA;AAAA,MACX,UAAY,EAAA,KAAA;AAAA,MACZ,GAAG,OAAA;AAAA,KACL;AAAA,IACAC,+BAAA;AAAA,IACAC,iCAAA;AAAA,IACA,GAAG,WAAA;AAAA,GACL,CAAA;AAEA,EAAA,MAAA,CAAO,QAAS,CAAA,GAAGC,gCAAe,CAAAC,iCAAe,CAAC,CAAA,CAAA;AAElD,EAAA,IAAI,QAAU,EAAA;AACZ,IAAA,MAAA,CAAO,QAAS,CAAA,GAAGD,gCAAe,CAAAE,0BAAQ,CAAC,CAAA,CAAA;AAAA,GAC7C;AAEA,EAAO,OAAA,MAAA,CAAA;AACT","file":"index.cjs","sourcesContent":["import antfu from '@antfu/eslint-config';\nimport { defineHasPackages } from '@culur/utils-packages';\nimport { sortPackageJson, vueRules } from './overrides';\nimport { filenameRules, yamlYarnrcRules } from './rules';\nimport { defineOverride } from './types';\n\nexport default function defineConfig(\n ...[options = {}, ...userConfigs]: Parameters<typeof antfu>\n): ReturnType<typeof antfu> {\n const { hasVue } = defineHasPackages({ vue: !!options.vue });\n\n const config = antfu(\n {\n isInEditor: false,\n stylistic: false,\n formatters: false,\n ...options,\n },\n filenameRules,\n yamlYarnrcRules,\n ...userConfigs,\n );\n\n config.override(...defineOverride(sortPackageJson));\n\n if (hasVue()) {\n config.override(...defineOverride(vueRules));\n }\n\n return config;\n}\n"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as _antfu_eslint_config from '@antfu/eslint-config';
|
|
3
|
-
import _antfu_eslint_config__default from '@antfu/eslint-config';
|
|
1
|
+
import antfu from '@antfu/eslint-config';
|
|
4
2
|
|
|
5
|
-
declare function defineConfig(...[options, ...userConfigs]: Parameters<typeof
|
|
3
|
+
declare function defineConfig(...[options, ...userConfigs]: Parameters<typeof antfu>): ReturnType<typeof antfu>;
|
|
6
4
|
|
|
7
5
|
export { defineConfig as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import * as _antfu_eslint_config from '@antfu/eslint-config';
|
|
3
|
-
import _antfu_eslint_config__default from '@antfu/eslint-config';
|
|
1
|
+
import antfu from '@antfu/eslint-config';
|
|
4
2
|
|
|
5
|
-
declare function defineConfig(...[options, ...userConfigs]: Parameters<typeof
|
|
3
|
+
declare function defineConfig(...[options, ...userConfigs]: Parameters<typeof antfu>): ReturnType<typeof antfu>;
|
|
6
4
|
|
|
7
5
|
export { defineConfig as default };
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;AAMe,SAAR,gBACF,CAAC,OAAA,GAAU,EAAI,EAAA,GAAG,WAAW,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;AAMe,SAAR,gBACF,CAAC,OAAA,GAAU,EAAI,EAAA,GAAG,WAAW,CACN,EAAA;AAC1B,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,iBAAkB,CAAA,EAAE,KAAK,CAAC,CAAC,OAAQ,CAAA,GAAA,EAAK,CAAA,CAAA;AAE3D,EAAA,MAAM,MAAS,GAAA,KAAA;AAAA,IACb;AAAA,MACE,UAAY,EAAA,KAAA;AAAA,MACZ,SAAW,EAAA,KAAA;AAAA,MACX,UAAY,EAAA,KAAA;AAAA,MACZ,GAAG,OAAA;AAAA,KACL;AAAA,IACA,aAAA;AAAA,IACA,eAAA;AAAA,IACA,GAAG,WAAA;AAAA,GACL,CAAA;AAEA,EAAA,MAAA,CAAO,QAAS,CAAA,GAAG,cAAe,CAAA,eAAe,CAAC,CAAA,CAAA;AAElD,EAAA,IAAI,QAAU,EAAA;AACZ,IAAA,MAAA,CAAO,QAAS,CAAA,GAAG,cAAe,CAAA,QAAQ,CAAC,CAAA,CAAA;AAAA,GAC7C;AAEA,EAAO,OAAA,MAAA,CAAA;AACT","file":"index.js","sourcesContent":["import antfu from '@antfu/eslint-config';\nimport { defineHasPackages } from '@culur/utils-packages';\nimport { sortPackageJson, vueRules } from './overrides';\nimport { filenameRules, yamlYarnrcRules } from './rules';\nimport { defineOverride } from './types';\n\nexport default function defineConfig(\n ...[options = {}, ...userConfigs]: Parameters<typeof antfu>\n): ReturnType<typeof antfu> {\n const { hasVue } = defineHasPackages({ vue: !!options.vue });\n\n const config = antfu(\n {\n isInEditor: false,\n stylistic: false,\n formatters: false,\n ...options,\n },\n filenameRules,\n yamlYarnrcRules,\n ...userConfigs,\n );\n\n config.override(...defineOverride(sortPackageJson));\n\n if (hasVue()) {\n config.override(...defineOverride(vueRules));\n }\n\n return config;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@culur/config-eslint",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Culur's eslint configuration",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -69,24 +69,24 @@
|
|
|
69
69
|
"node": ">=20"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@antfu/eslint-config": "^3.
|
|
73
|
-
"@culur/utils-packages": "1.0.
|
|
72
|
+
"@antfu/eslint-config": "^3.4.1",
|
|
73
|
+
"@culur/utils-packages": "1.0.6"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"@culur/config-tsup": "1.1.
|
|
77
|
-
"@culur/config-typescript": "1.0.
|
|
78
|
-
"@culur/config-vite": "1.0.
|
|
76
|
+
"@culur/config-tsup": "1.1.4",
|
|
77
|
+
"@culur/config-typescript": "1.0.5",
|
|
78
|
+
"@culur/config-vite": "1.0.7",
|
|
79
79
|
"@eslint/config-inspector": "^0.5.4",
|
|
80
80
|
"@eslint/eslintrc": "^3.1.0",
|
|
81
81
|
"@types/eslint": "^9.6.1",
|
|
82
|
-
"@types/node": "^
|
|
82
|
+
"@types/node": "^22.5.4",
|
|
83
83
|
"@vitest/coverage-v8": "^2.0.5",
|
|
84
84
|
"@vitest/ui": "^2.0.5",
|
|
85
|
-
"@vue/compiler-sfc": "^3.
|
|
86
|
-
"eslint": "^9.
|
|
85
|
+
"@vue/compiler-sfc": "^3.5.3",
|
|
86
|
+
"eslint": "^9.10.0",
|
|
87
87
|
"rimraf": "^6.0.1",
|
|
88
88
|
"tsup": "^8.2.4",
|
|
89
|
-
"type-fest": "^4.26.
|
|
89
|
+
"type-fest": "^4.26.1",
|
|
90
90
|
"typescript": "^5.5.4",
|
|
91
91
|
"vitest": "^2.0.5"
|
|
92
92
|
},
|
package/src/index.test.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import antfu from '@antfu/eslint-config';
|
|
2
2
|
import { defineHasPackages } from '@culur/utils-packages';
|
|
3
3
|
import { sortPackageJson, vueRules } from './overrides';
|
|
4
|
-
import { defineOverride } from './types';
|
|
5
4
|
import { filenameRules, yamlYarnrcRules } from './rules';
|
|
5
|
+
import { defineOverride } from './types';
|
|
6
6
|
|
|
7
7
|
export default function defineConfig(
|
|
8
8
|
...[options = {}, ...userConfigs]: Parameters<typeof antfu>
|
|
9
|
-
) {
|
|
9
|
+
): ReturnType<typeof antfu> {
|
|
10
10
|
const { hasVue } = defineHasPackages({ vue: !!options.vue });
|
|
11
11
|
|
|
12
12
|
const config = antfu(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { sortPackageJson as sortPackageJsonAntfuFunction } from '@antfu/eslint-config';
|
|
2
2
|
import { assert, it } from 'vitest';
|
|
3
|
-
import { sortPackageJson as sortPackageJsonLocalOverride } from './sort-package-json';
|
|
4
3
|
import { defineOverride } from '~/types';
|
|
4
|
+
import { sortPackageJson as sortPackageJsonLocalOverride } from './sort-package-json';
|
|
5
5
|
|
|
6
6
|
it('should be valid rule', async () => {
|
|
7
7
|
const [configAntfu] = await sortPackageJsonAntfuFunction();
|
package/src/types/index.test.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { Awaitable } from 'vitest';
|
|
2
1
|
import { expect, expectTypeOf, it } from 'vitest';
|
|
3
|
-
import type { TypedFlatConfigItem } from '@antfu/eslint-config';
|
|
4
|
-
import type { OverrideConfig } from '.';
|
|
2
|
+
import type { Awaitable, TypedFlatConfigItem } from '@antfu/eslint-config';
|
|
5
3
|
import { defineOverride } from '.';
|
|
4
|
+
import type { OverrideConfig } from '.';
|
|
6
5
|
|
|
7
6
|
it.each<OverrideConfig>([
|
|
8
7
|
{
|