@wongxy/eslint-config 0.0.4 → 0.0.6

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 ADDED
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // index.ts
21
+ var eslint_config_exports = {};
22
+ __export(eslint_config_exports, {
23
+ default: () => eslint_config_default,
24
+ wongxy: () => wongxy
25
+ });
26
+ module.exports = __toCommonJS(eslint_config_exports);
27
+ var import_eslint_config = require("@antfu/eslint-config");
28
+ function wongxy(options, ...userConfigs) {
29
+ return (0, import_eslint_config.antfu)(options, {
30
+ rules: {
31
+ "no-console": "off",
32
+ "no-multiple-empty-lines": "warn"
33
+ }
34
+ }, {
35
+ files: ["**/*.vue"],
36
+ rules: {
37
+ "vue/singleline-html-element-content-newline": "off",
38
+ "vue/valid-template-root": "off",
39
+ "vue/block-order": ["warn", {
40
+ order: [["script", "template"], "style"]
41
+ }]
42
+ }
43
+ }, ...userConfigs);
44
+ }
45
+ var eslint_config_default = wongxy;
46
+ // Annotate the CommonJS export names for ESM import in node:
47
+ 0 && (module.exports = {
48
+ wongxy
49
+ });
@@ -0,0 +1,5 @@
1
+ import { OptionsConfig, FlatConfigItem, Awaitable, UserConfigItem } from '@antfu/eslint-config';
2
+
3
+ declare function wongxy(options?: OptionsConfig & FlatConfigItem, ...userConfigs: Awaitable<UserConfigItem | UserConfigItem[]>[]): Promise<UserConfigItem[]>;
4
+
5
+ export { wongxy as default, wongxy };
@@ -0,0 +1,5 @@
1
+ import { OptionsConfig, FlatConfigItem, Awaitable, UserConfigItem } from '@antfu/eslint-config';
2
+
3
+ declare function wongxy(options?: OptionsConfig & FlatConfigItem, ...userConfigs: Awaitable<UserConfigItem | UserConfigItem[]>[]): Promise<UserConfigItem[]>;
4
+
5
+ export { wongxy as default, wongxy };
package/dist/index.js ADDED
@@ -0,0 +1,24 @@
1
+ // index.ts
2
+ import { antfu } from "@antfu/eslint-config";
3
+ function wongxy(options, ...userConfigs) {
4
+ return antfu(options, {
5
+ rules: {
6
+ "no-console": "off",
7
+ "no-multiple-empty-lines": "warn"
8
+ }
9
+ }, {
10
+ files: ["**/*.vue"],
11
+ rules: {
12
+ "vue/singleline-html-element-content-newline": "off",
13
+ "vue/valid-template-root": "off",
14
+ "vue/block-order": ["warn", {
15
+ order: [["script", "template"], "style"]
16
+ }]
17
+ }
18
+ }, ...userConfigs);
19
+ }
20
+ var eslint_config_default = wongxy;
21
+ export {
22
+ eslint_config_default as default,
23
+ wongxy
24
+ };
package/package.json CHANGED
@@ -1,17 +1,31 @@
1
1
  {
2
2
  "name": "@wongxy/eslint-config",
3
- "version": "0.0.4",
3
+ "type": "module",
4
+ "version": "0.0.6",
4
5
  "description": "xiyaowong's eslint config",
5
6
  "author": "xiyaowong (https://github.com/xiyaowong)",
6
7
  "license": "MIT",
7
- "scripts": {
8
- "test": "echo \"Error: no test specified\" && exit 1"
9
- },
10
8
  "main": "index.js",
11
9
  "files": [
12
- "index.js"
10
+ "dist"
13
11
  ],
14
12
  "dependencies": {
15
- "@antfu/eslint-config": "^1.0.0"
13
+ "@antfu/eslint-config": "^2.1.0"
14
+ },
15
+ "devDependencies": {
16
+ "@types/eslint": "^8.44.7",
17
+ "bumpp": "9.2.0",
18
+ "eslint": "8.54.0",
19
+ "tsup": "8.0.1",
20
+ "typescript": "5.3.2"
21
+ },
22
+ "scripts": {
23
+ "build": "tsup --format esm,cjs --clean --dts",
24
+ "stub": "tsup --format esm",
25
+ "dev": "tsup --format esm,cjs --watch & eslint-flat-config-viewer",
26
+ "lint": "pnpm run stub && eslint .",
27
+ "lint:fix": "pnpm run stub && eslint . --fix",
28
+ "release": "bumpp && pnpm publish",
29
+ "typecheck": "tsc --noEmit"
16
30
  }
17
- }
31
+ }
package/index.js DELETED
@@ -1,25 +0,0 @@
1
- const antfu = require('@antfu/eslint-config').default
2
-
3
- module.exports = antfu(
4
- {
5
- rules: {
6
- semi: 'off',
7
- quotes: 'off',
8
- 'no-console': 'off',
9
- 'no-multiple-empty-lines': 'warn',
10
- },
11
- overrides: {
12
- vue: {
13
- "vue/block-order": ["warn", {
14
- "order": [["script", "template"], "style"]
15
- }],
16
- "vue/valid-template-root": "off"
17
- },
18
- typescript: {
19
- '@typescript-eslint/prefer-ts-expect-error': 'off',
20
- '@typescript-eslint/semi': ['warn', 'never'],
21
- '@typescript-eslint/quotes': ['warn', 'single'],
22
- },
23
- }
24
- }
25
- )