@tofrankie/eslint 0.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/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ # Changelog
2
+
3
+ ## v0.0.1 (2026-02-10)
4
+
5
+ - Initial alpha release
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023-PRESENT Tom Gao<tom@tomgao.cc>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # @tofrankie/eslint
2
+
3
+ Based on [ESLint](https://eslint.org/docs/latest/) + [@antfu/eslint-config](https://github.com/antfu/eslint-config).
4
+
5
+ ## Quick Start
6
+
7
+ ```bash
8
+ $ pnpm add eslint @tofrankie/eslint -D
9
+ ```
10
+
11
+ Create an `eslint.config.js` in your project root:
12
+
13
+ ```js
14
+ import { defineConfig } from '@tofrankie/eslint'
15
+
16
+ export default defineConfig()
17
+ ```
package/dist/index.cjs ADDED
@@ -0,0 +1,48 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ //#region \0rolldown/runtime.js
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
12
+ key = keys[i];
13
+ if (!__hasOwnProp.call(to, key) && key !== except) {
14
+ __defProp(to, key, {
15
+ get: ((k) => from[k]).bind(null, key),
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ }
19
+ }
20
+ }
21
+ return to;
22
+ };
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
24
+ value: mod,
25
+ enumerable: true
26
+ }) : target, mod));
27
+
28
+ //#endregion
29
+ let _antfu_eslint_config = require("@antfu/eslint-config");
30
+ let lodash_merge = require("lodash.merge");
31
+ lodash_merge = __toESM(lodash_merge);
32
+
33
+ //#region src/config.ts
34
+ function defineConfig(options, userConfigs) {
35
+ return (0, _antfu_eslint_config.antfu)((0, lodash_merge.default)({
36
+ formatters: true,
37
+ rules: {
38
+ "no-console": "off",
39
+ "no-debugger": "warn",
40
+ "node/prefer-global/process": "off",
41
+ "test/prefer-lowercase-title": "off",
42
+ "pnpm/yaml-enforce-settings": "off"
43
+ }
44
+ }, options), userConfigs);
45
+ }
46
+
47
+ //#endregion
48
+ exports.defineConfig = defineConfig;
@@ -0,0 +1,12 @@
1
+ import { OptionsConfig as OptionsConfig$1, TypedFlatConfigItem, antfu } from "@antfu/eslint-config";
2
+
3
+ //#region src/types.d.ts
4
+ interface OptionsConfig extends OptionsConfig$1 {}
5
+ //#endregion
6
+ //#region src/config.d.ts
7
+ type Options = OptionsConfig & Omit<TypedFlatConfigItem, 'files'>;
8
+ type UserConfigs = Parameters<typeof antfu>[1];
9
+ type Config = ReturnType<typeof antfu>;
10
+ declare function defineConfig(options: Options, userConfigs: UserConfigs): Config;
11
+ //#endregion
12
+ export { OptionsConfig, defineConfig };
@@ -0,0 +1,12 @@
1
+ import { OptionsConfig as OptionsConfig$1, TypedFlatConfigItem, antfu } from "@antfu/eslint-config";
2
+
3
+ //#region src/types.d.ts
4
+ interface OptionsConfig extends OptionsConfig$1 {}
5
+ //#endregion
6
+ //#region src/config.d.ts
7
+ type Options = OptionsConfig & Omit<TypedFlatConfigItem, 'files'>;
8
+ type UserConfigs = Parameters<typeof antfu>[1];
9
+ type Config = ReturnType<typeof antfu>;
10
+ declare function defineConfig(options: Options, userConfigs: UserConfigs): Config;
11
+ //#endregion
12
+ export { OptionsConfig, defineConfig };
package/dist/index.mjs ADDED
@@ -0,0 +1,19 @@
1
+ import { antfu } from "@antfu/eslint-config";
2
+ import merge from "lodash.merge";
3
+
4
+ //#region src/config.ts
5
+ function defineConfig(options, userConfigs) {
6
+ return antfu(merge({
7
+ formatters: true,
8
+ rules: {
9
+ "no-console": "off",
10
+ "no-debugger": "warn",
11
+ "node/prefer-global/process": "off",
12
+ "test/prefer-lowercase-title": "off",
13
+ "pnpm/yaml-enforce-settings": "off"
14
+ }
15
+ }, options), userConfigs);
16
+ }
17
+
18
+ //#endregion
19
+ export { defineConfig };
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@tofrankie/eslint",
3
+ "type": "module",
4
+ "version": "0.0.1",
5
+ "description": "Shared ESLint configuration for @tofrankie projects",
6
+ "author": "Frankie <1426203851@qq.com>",
7
+ "license": "MIT",
8
+ "homepage": "https://github.com/tofrankie/config#readme",
9
+ "repository": "github:tofrankie/config",
10
+ "bugs": "https://github.com/tofrankie/config/issues",
11
+ "keywords": [
12
+ "eslint",
13
+ "eslintconfig",
14
+ "eslint-config",
15
+ "lint",
16
+ "tofrankie"
17
+ ],
18
+ "exports": {
19
+ "types": "./dist/index.d.mts",
20
+ "import": "./dist/index.mjs",
21
+ "require": "./dist/index.cjs"
22
+ },
23
+ "main": "dist/index.cjs",
24
+ "module": "dist/index.mjs",
25
+ "types": "dist/index.d.mts",
26
+ "files": [
27
+ "CHANGELOG.md",
28
+ "dist"
29
+ ],
30
+ "publishConfig": {
31
+ "access": "public"
32
+ },
33
+ "engines": {
34
+ "node": ">=18"
35
+ },
36
+ "peerDependencies": {
37
+ "@antfu/eslint-config": ">=7.0.0",
38
+ "eslint": ">=9.0.0"
39
+ },
40
+ "dependencies": {
41
+ "eslint-plugin-format": "^1.4.0",
42
+ "lodash.merge": "^4.6.2"
43
+ },
44
+ "devDependencies": {
45
+ "@antfu/eslint-config": "^7.3.0",
46
+ "@types/lodash.merge": "^4.6.9",
47
+ "eslint": "^10.0.0"
48
+ },
49
+ "scripts": {
50
+ "build": "tsdown"
51
+ }
52
+ }