@lightwing/eslint-config 0.0.24 → 1.0.1

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,61 @@
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
+ // src/index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ default: () => src_default
24
+ });
25
+ module.exports = __toCommonJS(src_exports);
26
+ var import_eslint_config = require("@antfu/eslint-config");
27
+ function lightwing(options = {}, ...userConfigs) {
28
+ const lightwingConfigs = [
29
+ {
30
+ rules: {
31
+ "node/prefer-global/process": "off"
32
+ }
33
+ },
34
+ {
35
+ files: [
36
+ "*.{adapter,gateway,guard}.{ts,js}",
37
+ "*.{module,service,controller,middleware}.{ts,js}",
38
+ "*.{model,entity,repository,mapper,validator,helper,strategy}.{ts,js}"
39
+ ],
40
+ rules: {
41
+ "ts/interface-name-prefix": "off",
42
+ "ts/consistent-type-imports": "off"
43
+ }
44
+ },
45
+ {
46
+ files: ["*.{ts,js,tsx,jsx}"],
47
+ rules: {
48
+ "ts/no-unused-vars": [
49
+ "error",
50
+ {
51
+ argsIgnorePattern: "^_",
52
+ varsIgnorePattern: "^_",
53
+ caughtErrorsIgnorePattern: "^_"
54
+ }
55
+ ]
56
+ }
57
+ }
58
+ ];
59
+ return (0, import_eslint_config.antfu)(options, ...lightwingConfigs, ...userConfigs);
60
+ }
61
+ var src_default = lightwing;
@@ -0,0 +1,5 @@
1
+ import { OptionsConfig, ConfigItem } from '@antfu/eslint-config';
2
+
3
+ declare function lightwing(options?: OptionsConfig & ConfigItem, ...userConfigs: (ConfigItem | ConfigItem[])[]): ConfigItem[];
4
+
5
+ export { lightwing as default };
@@ -0,0 +1,5 @@
1
+ import { OptionsConfig, ConfigItem } from '@antfu/eslint-config';
2
+
3
+ declare function lightwing(options?: OptionsConfig & ConfigItem, ...userConfigs: (ConfigItem | ConfigItem[])[]): ConfigItem[];
4
+
5
+ export { lightwing as default };
package/dist/index.js ADDED
@@ -0,0 +1,40 @@
1
+ // src/index.ts
2
+ import { antfu } from "@antfu/eslint-config";
3
+ function lightwing(options = {}, ...userConfigs) {
4
+ const lightwingConfigs = [
5
+ {
6
+ rules: {
7
+ "node/prefer-global/process": "off"
8
+ }
9
+ },
10
+ {
11
+ files: [
12
+ "*.{adapter,gateway,guard}.{ts,js}",
13
+ "*.{module,service,controller,middleware}.{ts,js}",
14
+ "*.{model,entity,repository,mapper,validator,helper,strategy}.{ts,js}"
15
+ ],
16
+ rules: {
17
+ "ts/interface-name-prefix": "off",
18
+ "ts/consistent-type-imports": "off"
19
+ }
20
+ },
21
+ {
22
+ files: ["*.{ts,js,tsx,jsx}"],
23
+ rules: {
24
+ "ts/no-unused-vars": [
25
+ "error",
26
+ {
27
+ argsIgnorePattern: "^_",
28
+ varsIgnorePattern: "^_",
29
+ caughtErrorsIgnorePattern: "^_"
30
+ }
31
+ ]
32
+ }
33
+ }
34
+ ];
35
+ return antfu(options, ...lightwingConfigs, ...userConfigs);
36
+ }
37
+ var src_default = lightwing;
38
+ export {
39
+ src_default as default
40
+ };
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@lightwing/eslint-config",
3
- "version": "0.0.24",
3
+ "type": "module",
4
+ "version": "1.0.1",
4
5
  "description": "Lightwing ESLint config",
5
6
  "author": "Archer Gu (https://github.com/ArcherGu/)",
6
7
  "license": "MIT",
@@ -13,19 +14,30 @@
13
14
  "keywords": [
14
15
  "eslint-config"
15
16
  ],
16
- "main": "index.js",
17
+ "exports": {
18
+ ".": {
19
+ "import": "./dist/index.js",
20
+ "require": "./dist/index.cjs"
21
+ }
22
+ },
23
+ "main": "./dist/index.js",
24
+ "types": "./dist/index.d.ts",
17
25
  "files": [
18
- "index.js"
26
+ "dist"
19
27
  ],
28
+ "scripts": {
29
+ "build": "tsup src/index.ts --format esm,cjs --clean --dts",
30
+ "prepublishOnly": "npm run build"
31
+ },
20
32
  "peerDependencies": {
21
33
  "eslint": ">=8.0.0",
22
34
  "typescript": ">=4.0.0"
23
35
  },
24
36
  "dependencies": {
25
- "@antfu/eslint-config": "^0.43.1"
37
+ "@antfu/eslint-config": "^1.1.0"
26
38
  },
27
39
  "devDependencies": {
28
- "eslint": "8.50.0",
40
+ "eslint": "8.52.0",
29
41
  "typescript": "5.2.2"
30
42
  }
31
43
  }
package/index.js DELETED
@@ -1,36 +0,0 @@
1
- /**
2
- * @type {import('eslint').Linter.Config}
3
- * @see https://eslint.org/docs/user-guide/configuring/
4
- */
5
- module.exports = {
6
- extends: ['@antfu'],
7
- rules: {
8
- 'n/prefer-global/process': 'off',
9
- },
10
- overrides: [
11
- {
12
- files: [
13
- '*.{adapter,gateway,guard}.{ts,js}',
14
- '*.{module,service,controller,middleware}.{ts,js}',
15
- '*.{model,entity,repository,mapper,validator,helper,strategy}.{ts,js}',
16
- ],
17
- rules: {
18
- '@typescript-eslint/interface-name-prefix': 'off',
19
- '@typescript-eslint/consistent-type-imports': 'off',
20
- },
21
- },
22
- {
23
- files: ['*.{ts,js,tsx,jsx}'],
24
- rules: {
25
- '@typescript-eslint/no-unused-vars': [
26
- 'error',
27
- {
28
- argsIgnorePattern: '^_',
29
- varsIgnorePattern: '^_',
30
- caughtErrorsIgnorePattern: '^_',
31
- },
32
- ],
33
- },
34
- },
35
- ],
36
- }