@jsse/eslint-config 0.4.9 → 0.4.12

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.
Files changed (104) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +1 -1
  3. package/dist/cli.js +10 -6
  4. package/dist/index.d.ts +22 -3
  5. package/dist/index.js +60 -148
  6. package/dist/version-BbraMghN.js +39 -0
  7. package/package.json +18 -15
  8. package/dist/esm/cli.d.ts +0 -1
  9. package/dist/esm/cli.js +0 -121
  10. package/dist/esm/config-fns.d.ts +0 -138
  11. package/dist/esm/config-fns.js +0 -161
  12. package/dist/esm/configs/antfu.d.ts +0 -4
  13. package/dist/esm/configs/antfu.js +0 -30
  14. package/dist/esm/configs/command.d.ts +0 -10
  15. package/dist/esm/configs/command.js +0 -17
  16. package/dist/esm/configs/de-morgan.d.ts +0 -2
  17. package/dist/esm/configs/de-morgan.js +0 -9
  18. package/dist/esm/configs/eslint-comments.d.ts +0 -2
  19. package/dist/esm/configs/eslint-comments.js +0 -16
  20. package/dist/esm/configs/gql.d.ts +0 -2
  21. package/dist/esm/configs/gql.js +0 -4
  22. package/dist/esm/configs/ignores.d.ts +0 -2
  23. package/dist/esm/configs/ignores.js +0 -9
  24. package/dist/esm/configs/imports.d.ts +0 -2
  25. package/dist/esm/configs/imports.js +0 -28
  26. package/dist/esm/configs/javascript.d.ts +0 -6
  27. package/dist/esm/configs/javascript.js +0 -262
  28. package/dist/esm/configs/jsdoc.d.ts +0 -2
  29. package/dist/esm/configs/jsdoc.js +0 -31
  30. package/dist/esm/configs/jsonc.d.ts +0 -4
  31. package/dist/esm/configs/jsonc.js +0 -76
  32. package/dist/esm/configs/markdown.d.ts +0 -4
  33. package/dist/esm/configs/markdown.js +0 -122
  34. package/dist/esm/configs/n.d.ts +0 -2
  35. package/dist/esm/configs/n.js +0 -21
  36. package/dist/esm/configs/no-only-tests.d.ts +0 -4
  37. package/dist/esm/configs/no-only-tests.js +0 -31
  38. package/dist/esm/configs/perfectionist.d.ts +0 -7
  39. package/dist/esm/configs/perfectionist.js +0 -60
  40. package/dist/esm/configs/pnpm.d.ts +0 -2
  41. package/dist/esm/configs/pnpm.js +0 -34
  42. package/dist/esm/configs/prettier.d.ts +0 -7
  43. package/dist/esm/configs/prettier.js +0 -126
  44. package/dist/esm/configs/react.d.ts +0 -6
  45. package/dist/esm/configs/react.js +0 -300
  46. package/dist/esm/configs/sort-package-json.d.ts +0 -7
  47. package/dist/esm/configs/sort-package-json.js +0 -102
  48. package/dist/esm/configs/sort-tsconfig.d.ts +0 -14
  49. package/dist/esm/configs/sort-tsconfig.js +0 -135
  50. package/dist/esm/configs/stylistic.d.ts +0 -2
  51. package/dist/esm/configs/stylistic.js +0 -39
  52. package/dist/esm/configs/tailwind.d.ts +0 -1
  53. package/dist/esm/configs/tailwind.js +0 -81
  54. package/dist/esm/configs/toml.d.ts +0 -2
  55. package/dist/esm/configs/toml.js +0 -50
  56. package/dist/esm/configs/ts/parser.d.ts +0 -7
  57. package/dist/esm/configs/ts/parser.js +0 -71
  58. package/dist/esm/configs/ts/requires-type-checking.d.ts +0 -1
  59. package/dist/esm/configs/ts/requires-type-checking.js +0 -61
  60. package/dist/esm/configs/ts/typescript-language-options.d.ts +0 -2
  61. package/dist/esm/configs/ts/typescript-language-options.js +0 -22
  62. package/dist/esm/configs/ts/typescript-rules.d.ts +0 -11
  63. package/dist/esm/configs/ts/typescript-rules.js +0 -379
  64. package/dist/esm/configs/ts/typescript.d.ts +0 -4
  65. package/dist/esm/configs/ts/typescript.js +0 -123
  66. package/dist/esm/configs/tsdoc.d.ts +0 -2
  67. package/dist/esm/configs/tsdoc.js +0 -16
  68. package/dist/esm/configs/unicorn.d.ts +0 -2
  69. package/dist/esm/configs/unicorn.js +0 -114
  70. package/dist/esm/configs/vitest.d.ts +0 -4
  71. package/dist/esm/configs/vitest.js +0 -29
  72. package/dist/esm/configs/yml.d.ts +0 -4
  73. package/dist/esm/configs/yml.js +0 -51
  74. package/dist/esm/const.d.ts +0 -5
  75. package/dist/esm/const.js +0 -25
  76. package/dist/esm/define-config.d.ts +0 -7
  77. package/dist/esm/define-config.js +0 -256
  78. package/dist/esm/dev.d.ts +0 -4
  79. package/dist/esm/dev.js +0 -25
  80. package/dist/esm/fixable.d.ts +0 -2
  81. package/dist/esm/fixable.js +0 -4
  82. package/dist/esm/generated/fixable-rules-map.d.ts +0 -2
  83. package/dist/esm/generated/fixable-rules-map.js +0 -443
  84. package/dist/esm/generated/version.d.ts +0 -1
  85. package/dist/esm/generated/version.js +0 -1
  86. package/dist/esm/globs.d.ts +0 -25
  87. package/dist/esm/globs.js +0 -73
  88. package/dist/esm/index.d.ts +0 -9
  89. package/dist/esm/index.js +0 -8
  90. package/dist/esm/lager.d.ts +0 -32
  91. package/dist/esm/lager.js +0 -87
  92. package/dist/esm/log.d.ts +0 -2
  93. package/dist/esm/log.js +0 -2
  94. package/dist/esm/plugins-all.d.ts +0 -26
  95. package/dist/esm/plugins-all.js +0 -120
  96. package/dist/esm/plugins.d.ts +0 -1570
  97. package/dist/esm/plugins.js +0 -97
  98. package/dist/esm/presets.d.ts +0 -18
  99. package/dist/esm/presets.js +0 -75
  100. package/dist/esm/types.d.ts +0 -287
  101. package/dist/esm/types.js +0 -1
  102. package/dist/esm/utils.d.ts +0 -51
  103. package/dist/esm/utils.js +0 -156
  104. package/dist/version-DNhPWuQE.js +0 -5
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jsse/eslint-config",
3
3
  "type": "module",
4
- "version": "0.4.9",
4
+ "version": "0.4.12",
5
5
  "description": "@jsse/eslint-config ~ WYSIWYG",
6
6
  "author": "jessekrubin <jessekrubin@gmail.com> (https://github.com/jessekrubin/)",
7
7
  "license": "MIT",
@@ -62,20 +62,20 @@
62
62
  "dependencies": {
63
63
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
64
64
  "@eslint/compat": "^1.3.2",
65
- "@eslint/js": "~9.33.0",
66
- "@eslint/markdown": "^7.1.0",
65
+ "@eslint/js": "~9.34.0",
66
+ "@eslint/markdown": "^7.2.0",
67
67
  "@stylistic/eslint-plugin": "5.2.3",
68
- "@typescript-eslint/eslint-plugin": "^8.39.1",
69
- "@typescript-eslint/parser": "^8.39.1",
68
+ "@typescript-eslint/eslint-plugin": "^8.41.0",
69
+ "@typescript-eslint/parser": "^8.41.0",
70
70
  "@vitest/eslint-plugin": "^1.3.4",
71
71
  "debug": "^4.4.1",
72
72
  "eslint-config-flat-gitignore": "^2.1.0",
73
73
  "eslint-merge-processors": "^2.0.0",
74
74
  "eslint-plugin-antfu": "^3.1.1",
75
75
  "eslint-plugin-command": "^3.3.1",
76
- "eslint-plugin-de-morgan": "^1.3.0",
76
+ "eslint-plugin-de-morgan": "^1.3.1",
77
77
  "eslint-plugin-import-lite": "^0.3.0",
78
- "eslint-plugin-jsdoc": "^54.1.0",
78
+ "eslint-plugin-jsdoc": "^54.1.1",
79
79
  "eslint-plugin-jsonc": "^2.20.1",
80
80
  "eslint-plugin-n": "^17.21.3",
81
81
  "eslint-plugin-no-only-tests": "^3.3.0",
@@ -91,11 +91,11 @@
91
91
  "eslint-plugin-yml": "^1.18.0",
92
92
  "jsonc-eslint-parser": "^2.4.0",
93
93
  "toml-eslint-parser": "^0.10.0",
94
- "typescript-eslint": "^8.39.1",
94
+ "typescript-eslint": "^8.41.0",
95
95
  "yaml-eslint-parser": "^1.3.0"
96
96
  },
97
97
  "devDependencies": {
98
- "@biomejs/biome": "2.2.0",
98
+ "@biomejs/biome": "2.2.2",
99
99
  "@changesets/cli": "^2.29.6",
100
100
  "@jsse/prettier-config": "^1.0.0",
101
101
  "@jsse/tsconfig": "^0.3.0",
@@ -103,21 +103,22 @@
103
103
  "@types/fs-extra": "^11.0.4",
104
104
  "@types/node": "^24.3.0",
105
105
  "cac": "^6.7.14",
106
- "eslint": "^9.33.0",
106
+ "eslint": "^9.34.0",
107
107
  "eslint-flat-config-utils": "^2.1.1",
108
108
  "eslint-typegen": "^2.3.0",
109
109
  "execa": "~9.6.0",
110
110
  "fast-glob": "^3.3.3",
111
- "fs-extra": "^11.3.0",
111
+ "fs-extra": "^11.3.1",
112
112
  "globals": "^16.3.0",
113
- "local-pkg": "^1.1.1",
113
+ "local-pkg": "^1.1.2",
114
+ "oxlint": "^1.13.0",
114
115
  "picocolors": "^1.1.1",
115
116
  "prettier": "^3.6.2",
116
117
  "react": "~19.1.1",
117
118
  "rimraf": "^6.0.1",
118
- "tsdown": "^0.14.1",
119
- "tsx": "^4.20.4",
120
- "typescript": "5.8.3",
119
+ "tsdown": "^0.14.2",
120
+ "tsx": "^4.20.5",
121
+ "typescript": "~5.9.2",
121
122
  "vitest": "^3.2.4"
122
123
  },
123
124
  "prettier": "@jsse/prettier-config",
@@ -130,6 +131,8 @@
130
131
  "fmt": "prettier -w .",
131
132
  "fmtc": "prettier --check .",
132
133
  "lint": "pnpm run build-fast && eslint .",
134
+ "lint:self": "pnpm run build-fast && eslint --report-unused-disable-directives .",
135
+ "oxlint": "oxlint",
133
136
  "change": "changeset",
134
137
  "release": "pnpm run ci:version && pnpm run ci:publish",
135
138
  "stub": "tsdown src/index.ts --format esm",
package/dist/esm/cli.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};
package/dist/esm/cli.js DELETED
@@ -1,121 +0,0 @@
1
- /* eslint-disable no-console */
2
- import fs from "node:fs";
3
- import process from "node:process";
4
- import { cac } from "cac";
5
- import { VERSION } from "./generated/version.js";
6
- const cli = cac("jsselint");
7
- const CONFIG_OPTIONS_STRING = `
8
- {
9
- /**
10
- * ===================
11
- * jsse eslint options
12
- * ===================
13
- */
14
- debug: false,
15
-
16
- /**
17
- * Enable TypeScript support.
18
- */
19
- // typescript: {
20
- // tsconfigPath: "tsconfig.json", // or ["tsconfig.json", "tsconfig.eslint.json", ...]
21
- // },
22
-
23
- /**
24
- * Enable React support.
25
- * @default false
26
- */
27
- // react: true,
28
- // reactRefresh: true,
29
-
30
- /**
31
- * Report unused disable directives
32
- * @default true
33
- */
34
- // reportUnusedDisableDirectives: false,
35
-
36
- /**
37
- * rules 2 turn off
38
- * @default []
39
- * @example ["super-annoying-rule"]
40
- */
41
- // off: [],
42
- }
43
- `;
44
- const CONFIG_STRING_CJS = `// @ts-check
45
-
46
- module.exports = require("@jsse/eslint-config").jsse(
47
- ${CONFIG_OPTIONS_STRING}
48
- )
49
- `;
50
- const CONFIG_STRING_ESM = `// @ts-check
51
- import jsse from "@jsse/eslint-config";
52
-
53
- export default jsse(
54
- ${CONFIG_OPTIONS_STRING}
55
- );
56
- `;
57
- // DEFAULT COMMAND
58
- cli.command("", "default command").action(() => {
59
- cli.outputHelp();
60
- process.exit(1);
61
- });
62
- cli
63
- .command("init", "create eslint config file")
64
- .option("--force", "force create eslint config file")
65
- .action(async (options) => {
66
- console.log("init");
67
- const configPath = "eslint.config.js";
68
- if (fs.existsSync(configPath)) {
69
- const msg = "eslint.config.js already exists";
70
- console.warn(msg);
71
- if (!options.force) {
72
- throw new Error(msg);
73
- }
74
- }
75
- if (!fs.existsSync("package.json")) {
76
- const msg = "package.json not found";
77
- console.warn(msg);
78
- throw new Error(msg);
79
- }
80
- const packageJson = JSON.parse(fs.readFileSync("package.json", "utf8"));
81
- // type o package
82
- const isModule = packageJson.type === "module";
83
- const eslintConfigString = [
84
- isModule ? CONFIG_STRING_ESM : CONFIG_STRING_CJS,
85
- "/* ALT */",
86
- (isModule ? CONFIG_STRING_CJS : CONFIG_STRING_ESM)
87
- .split("\n")
88
- .map((line) => `// ${line}`)
89
- .join("\n"),
90
- ];
91
- fs.writeFileSync(configPath, eslintConfigString.join("\n"));
92
- console.log(`made eslint.config.js (type: ${packageJson.type})`);
93
- });
94
- cli.command("version", "echo version").action(() => {
95
- console.log(VERSION);
96
- });
97
- cli.version(typeof VERSION === "string" ? VERSION : "unknown");
98
- cli.help();
99
- async function main(args) {
100
- const argv = args ?? process.argv.slice(2);
101
- try {
102
- const parsed = cli.parse(argv, { run: false });
103
- console.log("=====");
104
- console.log(parsed);
105
- console.log("=====");
106
- await cli.runMatchedCommand();
107
- }
108
- catch (error) {
109
- if (error instanceof Error) {
110
- console.error("Error: %s\n\n%s", error.message, error.stack);
111
- }
112
- else {
113
- console.error(error);
114
- }
115
- process.exit(1);
116
- }
117
- }
118
- main().catch((e) => {
119
- console.error(e);
120
- throw e;
121
- });
@@ -1,138 +0,0 @@
1
- import { reactHooks } from "./configs/react.js";
2
- export declare const CONFIGS_MAPPING: {
3
- antfu: {
4
- fn: import("./types.js").EslintConfigFn<{
5
- topLevelFunction: "error" | "off";
6
- }>;
7
- typeName: string;
8
- };
9
- command: {
10
- fn: import("./types.js").EslintConfigFn;
11
- typeName: string;
12
- };
13
- "de-morgan": {
14
- fn: import("./types.js").EslintConfigFn;
15
- typeName: string;
16
- };
17
- "eslint-comments": {
18
- fn: import("./types.js").EslintConfigFn;
19
- typeName: string;
20
- };
21
- ignores: {
22
- fn: import("./types.js").EslintConfigFn;
23
- typeName: string;
24
- };
25
- imports: {
26
- fn: import("./types.js").EslintConfigFn<import("./types.js").OptionsStylistic>;
27
- typeName: string;
28
- };
29
- javascript: {
30
- fn: import("./types.js").EslintConfigFn<import("./types.js").OptionsIsInEditor & import("./types.js").OptionsOverrides & {
31
- reportUnusedDisableDirectives?: boolean;
32
- }>;
33
- typeName: string;
34
- };
35
- jsdoc: {
36
- fn: import("./types.js").EslintConfigFn;
37
- typeName: string;
38
- };
39
- jsonc: {
40
- fn: import("./types.js").EslintConfigFn<import("./types.js").OptionsStylistic & import("./types.js").OptionsOverrides>;
41
- typeName: string;
42
- };
43
- markdown: {
44
- fn: import("./types.js").EslintConfigFn<import("./types.js").OptionsComponentExts & import("./types.js").OptionsOverrides>;
45
- typeName: string;
46
- };
47
- n: {
48
- fn: import("./types.js").EslintConfigFn;
49
- typeName: string;
50
- };
51
- "no-only-tests": {
52
- fn: import("./types.js").EslintConfigFn<import("./types.js").OptionsIsInEditor & import("./types.js").OptionsOverrides>;
53
- typeName: string;
54
- };
55
- perfectionist: {
56
- fn: import("./types.js").EslintConfigFn;
57
- typeName: string;
58
- };
59
- pnpm: {
60
- fn: import("./types.js").EslintConfigFn;
61
- typeName: string;
62
- };
63
- prettier: {
64
- fn: import("./types.js").EslintConfigFn;
65
- typeName: string;
66
- };
67
- react: {
68
- fn: import("./types.js").EslintConfigFn<import("./types.js").OptionsComponentExts & import("./types.js").OptionsOverrides & import("./types.js").OptionsTypeScriptWithTypes & import("./types.js").OptionsTypeScriptParserOptions & import("./types.js").OptionsReact>;
69
- typeName: string;
70
- };
71
- "react-hooks": {
72
- fn: typeof reactHooks;
73
- typeName: string;
74
- };
75
- "sort-package-json": {
76
- fn: import("./types.js").EslintConfigFn;
77
- typeName: string;
78
- };
79
- "sort-tsconfig": {
80
- fn: import("./types.js").EslintConfigFn<{
81
- extendTsconfigGlobs?: string[];
82
- }>;
83
- typeName: string;
84
- };
85
- stylistic: {
86
- fn: import("./types.js").EslintConfigFn<import("./types.js").StylisticConfig>;
87
- typeName: string;
88
- };
89
- toml: {
90
- fn: import("./types.js").EslintConfigFn<import("./types.js").OptionsOverrides & import("./types.js").OptionsFiles & import("./types.js").OptionsStylistic>;
91
- typeName: string;
92
- };
93
- tsdoc: {
94
- fn: import("./types.js").EslintConfigFn;
95
- typeName: string;
96
- };
97
- typescript: {
98
- fn: import("./types.js").EslintConfigFn<import("./types.js").OptionsComponentExts & import("./types.js").OptionsOverrides & import("./types.js").OptionsTypeScriptWithTypes & import("./types.js").OptionsTypeScriptParserOptions & import("./types.js").OptionsReact & import("./types.js").OptionsPrefix>;
99
- typeName: string;
100
- };
101
- unicorn: {
102
- fn: import("./types.js").EslintConfigFn;
103
- typeName: string;
104
- };
105
- vitest: {
106
- fn: import("./types.js").EslintConfigFn<import("./types.js").OptionsIsInEditor & import("./types.js").OptionsOverrides>;
107
- typeName: string;
108
- };
109
- yml: {
110
- fn: import("./types.js").EslintConfigFn<import("./types.js").OptionsOverrides & import("./types.js").OptionsStylistic & import("./types.js").OptionsFiles>;
111
- typeName: string;
112
- };
113
- };
114
- export { antfu } from "./configs/antfu.js";
115
- export { command } from "./configs/command.js";
116
- export { deMorgan } from "./configs/de-morgan.js";
117
- export { eslintComments } from "./configs/eslint-comments.js";
118
- export { ignores } from "./configs/ignores.js";
119
- export { imports } from "./configs/imports.js";
120
- export { javascript } from "./configs/javascript.js";
121
- export { jsdoc } from "./configs/jsdoc.js";
122
- export { jsonc } from "./configs/jsonc.js";
123
- export { markdown } from "./configs/markdown.js";
124
- export { n } from "./configs/n.js";
125
- export { noOnlyTests } from "./configs/no-only-tests.js";
126
- export { perfectionist } from "./configs/perfectionist.js";
127
- export { pnpm } from "./configs/pnpm.js";
128
- export { prettier } from "./configs/prettier.js";
129
- export { react, reactHooks } from "./configs/react.js";
130
- export { sortPackageJson } from "./configs/sort-package-json.js";
131
- export { sortTsconfig } from "./configs/sort-tsconfig.js";
132
- export { stylistic } from "./configs/stylistic.js";
133
- export { toml } from "./configs/toml.js";
134
- export { typescript } from "./configs/ts/typescript.js";
135
- export { tsdoc } from "./configs/tsdoc.js";
136
- export { unicorn } from "./configs/unicorn.js";
137
- export { vitest } from "./configs/vitest.js";
138
- export { yml } from "./configs/yml.js";
@@ -1,161 +0,0 @@
1
- import { antfu } from "./configs/antfu.js";
2
- import { command } from "./configs/command.js";
3
- import { deMorgan } from "./configs/de-morgan.js";
4
- import { eslintComments } from "./configs/eslint-comments.js";
5
- import { ignores } from "./configs/ignores.js";
6
- import { imports } from "./configs/imports.js";
7
- import { javascript } from "./configs/javascript.js";
8
- import { jsdoc } from "./configs/jsdoc.js";
9
- import { jsonc } from "./configs/jsonc.js";
10
- import { markdown } from "./configs/markdown.js";
11
- import { n } from "./configs/n.js";
12
- import { noOnlyTests } from "./configs/no-only-tests.js";
13
- import { perfectionist } from "./configs/perfectionist.js";
14
- import { pnpm } from "./configs/pnpm.js";
15
- import { prettier } from "./configs/prettier.js";
16
- import { react, reactHooks } from "./configs/react.js";
17
- import { sortPackageJson } from "./configs/sort-package-json.js";
18
- import { sortTsconfig } from "./configs/sort-tsconfig.js";
19
- import { stylistic } from "./configs/stylistic.js";
20
- import { toml } from "./configs/toml.js";
21
- import { typescript } from "./configs/ts/typescript.js";
22
- import { tsdoc } from "./configs/tsdoc.js";
23
- import { unicorn } from "./configs/unicorn.js";
24
- import { vitest } from "./configs/vitest.js";
25
- import { yml } from "./configs/yml.js";
26
- export const CONFIGS_MAPPING = {
27
- antfu: {
28
- fn: antfu,
29
- typeName: "AntfuRuleOptions",
30
- },
31
- command: {
32
- fn: command,
33
- typeName: "CommandRuleOptions",
34
- },
35
- "de-morgan": {
36
- fn: deMorgan,
37
- typeName: "DeMorganRuleOptions",
38
- },
39
- "eslint-comments": {
40
- fn: eslintComments,
41
- typeName: "EslintCommentsRuleOptions",
42
- },
43
- ignores: {
44
- fn: ignores,
45
- typeName: "IgnoresRuleOptions",
46
- },
47
- imports: {
48
- fn: imports,
49
- typeName: "ImportsRuleOptions",
50
- },
51
- javascript: {
52
- fn: javascript,
53
- typeName: "JavascriptRuleOptions",
54
- },
55
- jsdoc: {
56
- fn: jsdoc,
57
- typeName: "JsdocRuleOptions",
58
- },
59
- jsonc: {
60
- fn: jsonc,
61
- typeName: "JsoncRuleOptions",
62
- },
63
- markdown: {
64
- fn: markdown,
65
- typeName: "MarkdownRuleOptions",
66
- },
67
- n: {
68
- fn: n,
69
- typeName: "NRuleOptions",
70
- },
71
- "no-only-tests": {
72
- fn: noOnlyTests,
73
- typeName: "NoOnlyTestsRuleOptions",
74
- },
75
- perfectionist: {
76
- fn: perfectionist,
77
- typeName: "PerfectionistRuleOptions",
78
- },
79
- pnpm: {
80
- fn: pnpm,
81
- typeName: "PnpmRuleOptions",
82
- },
83
- prettier: {
84
- fn: prettier,
85
- typeName: "PrettierRuleOptions",
86
- },
87
- react: {
88
- fn: react,
89
- typeName: "ReactRuleOptions",
90
- },
91
- "react-hooks": {
92
- fn: reactHooks,
93
- typeName: "ReactHooksRuleOptions",
94
- },
95
- "sort-package-json": {
96
- fn: sortPackageJson,
97
- typeName: "SortPackageJsonRuleOptions",
98
- },
99
- "sort-tsconfig": {
100
- fn: sortTsconfig,
101
- typeName: "SortTsconfigRuleOptions",
102
- },
103
- stylistic: {
104
- fn: stylistic,
105
- typeName: "StylisticRuleOptions",
106
- },
107
- toml: {
108
- fn: toml,
109
- typeName: "TomlRuleOptions",
110
- },
111
- tsdoc: {
112
- fn: tsdoc,
113
- typeName: "TsdocRuleOptions",
114
- },
115
- // deprecated
116
- // tailwind: {
117
- // typeName: "TailwindRuleOptions",
118
- // fn: tailwind,
119
- // },
120
- typescript: {
121
- fn: typescript,
122
- typeName: "TypescriptRuleOptions",
123
- },
124
- unicorn: {
125
- fn: unicorn,
126
- typeName: "UnicornRuleOptions",
127
- },
128
- vitest: {
129
- fn: vitest,
130
- typeName: "VitestRuleOptions",
131
- },
132
- yml: {
133
- fn: yml,
134
- typeName: "YmlRuleOptions",
135
- },
136
- };
137
- export { antfu } from "./configs/antfu.js";
138
- export { command } from "./configs/command.js";
139
- export { deMorgan } from "./configs/de-morgan.js";
140
- export { eslintComments } from "./configs/eslint-comments.js";
141
- export { ignores } from "./configs/ignores.js";
142
- export { imports } from "./configs/imports.js";
143
- export { javascript } from "./configs/javascript.js";
144
- export { jsdoc } from "./configs/jsdoc.js";
145
- export { jsonc } from "./configs/jsonc.js";
146
- export { markdown } from "./configs/markdown.js";
147
- export { n } from "./configs/n.js";
148
- export { noOnlyTests } from "./configs/no-only-tests.js";
149
- export { perfectionist } from "./configs/perfectionist.js";
150
- export { pnpm } from "./configs/pnpm.js";
151
- export { prettier } from "./configs/prettier.js";
152
- export { react, reactHooks } from "./configs/react.js";
153
- export { sortPackageJson } from "./configs/sort-package-json.js";
154
- export { sortTsconfig } from "./configs/sort-tsconfig.js";
155
- export { stylistic } from "./configs/stylistic.js";
156
- export { toml } from "./configs/toml.js";
157
- export { typescript } from "./configs/ts/typescript.js";
158
- export { tsdoc } from "./configs/tsdoc.js";
159
- export { unicorn } from "./configs/unicorn.js";
160
- export { vitest } from "./configs/vitest.js";
161
- export { yml } from "./configs/yml.js";
@@ -1,4 +0,0 @@
1
- import type { EslintConfigFn } from "../types.js";
2
- export declare const antfu: EslintConfigFn<{
3
- topLevelFunction: "error" | "off";
4
- }>;
@@ -1,30 +0,0 @@
1
- import { pluginAntfu } from "../plugins.js";
2
- export const antfu = async (options) => {
3
- return [
4
- {
5
- name: "jsse/antfu",
6
- plugins: {
7
- antfu: pluginAntfu,
8
- },
9
- rules: {
10
- // used to like the following rule, but now find it annoying
11
- "antfu/top-level-function": options?.topLevelFunction ?? "off",
12
- },
13
- },
14
- // {
15
- // files: ["**/src/**/*"],
16
- // name: "jsse/antfu/src",
17
- // rules: {
18
- // "antfu/no-import-dist": "error",
19
- // },
20
- // },
21
- // {
22
- // files: ["**/bin/**/*", `**/bin.${GLOB_SRC_EXT}`],
23
- // name: "jsse/antfu/bin",
24
- // rules: {
25
- // "antfu/no-import-dist": "off",
26
- // "antfu/no-import-node-modules-by-path": "off",
27
- // },
28
- // },
29
- ];
30
- };
@@ -1,10 +0,0 @@
1
- import type { EslintConfigFn } from "../types.js";
2
- /**
3
- * Config for `eslint-plugin-command`
4
- *
5
- * Repo: https://github.com/antfu/eslint-plugin-command
6
- * Docs: https://eslint-plugin-command.antfu.me/guide/
7
- *
8
- * @returns Typed config arr
9
- */
10
- export declare const command: EslintConfigFn;
@@ -1,17 +0,0 @@
1
- import createCommand from "eslint-plugin-command/config";
2
- /**
3
- * Config for `eslint-plugin-command`
4
- *
5
- * Repo: https://github.com/antfu/eslint-plugin-command
6
- * Docs: https://eslint-plugin-command.antfu.me/guide/
7
- *
8
- * @returns Typed config arr
9
- */
10
- export const command = async () => {
11
- return [
12
- {
13
- ...createCommand(),
14
- name: "jsse/command/rules",
15
- },
16
- ];
17
- };
@@ -1,2 +0,0 @@
1
- import type { EslintConfigFn } from "../types.js";
2
- export declare const deMorgan: EslintConfigFn;
@@ -1,9 +0,0 @@
1
- import { pluginDeMorgan } from "../plugins.js";
2
- export const deMorgan = async () => {
3
- return [
4
- {
5
- ...pluginDeMorgan.configs.recommended,
6
- name: "jsse/de-morgan",
7
- },
8
- ];
9
- };
@@ -1,2 +0,0 @@
1
- import type { EslintConfigFn } from "../types.js";
2
- export declare const eslintComments: EslintConfigFn;
@@ -1,16 +0,0 @@
1
- import { pluginEslintComments } from "../plugins.js";
2
- export const eslintComments = async () => [
3
- {
4
- name: "jsse/eslint-comments",
5
- plugins: {
6
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
7
- "eslint-comments": pluginEslintComments,
8
- },
9
- rules: {
10
- "eslint-comments/no-aggregating-enable": "error",
11
- "eslint-comments/no-duplicate-disable": "error",
12
- "eslint-comments/no-unlimited-disable": "error",
13
- "eslint-comments/no-unused-enable": "error",
14
- },
15
- },
16
- ];
@@ -1,2 +0,0 @@
1
- import type { Config } from "src/types.js";
2
- export declare function gql(): Config[];
@@ -1,4 +0,0 @@
1
- // TODO: adhok
2
- export function gql() {
3
- return [];
4
- }
@@ -1,2 +0,0 @@
1
- import type { EslintConfigFn } from "../types.js";
2
- export declare const ignores: EslintConfigFn;
@@ -1,9 +0,0 @@
1
- import { GLOB_EXCLUDE } from "../globs.js";
2
- export const ignores = async () => {
3
- return [
4
- {
5
- ignores: GLOB_EXCLUDE,
6
- name: "jsse/ignores",
7
- },
8
- ];
9
- };
@@ -1,2 +0,0 @@
1
- import type { EslintConfigFn, OptionsStylistic } from "../types.js";
2
- export declare const imports: EslintConfigFn<OptionsStylistic>;
@@ -1,28 +0,0 @@
1
- import { pluginImportLite } from "../plugins.js";
2
- export const imports = async (options) => {
3
- const { stylistic = true } = options ?? {};
4
- return [
5
- {
6
- name: "jsse/import",
7
- plugins: {
8
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
9
- import: pluginImportLite,
10
- },
11
- rules: {
12
- "import/first": "error",
13
- "import/no-duplicates": "error",
14
- "import/no-mutable-exports": "error",
15
- "import/no-named-default": "error",
16
- "import/order": "off",
17
- ...(stylistic
18
- ? {
19
- "import/newline-after-import": [
20
- "error",
21
- { considerComments: true, count: 1 },
22
- ],
23
- }
24
- : {}),
25
- },
26
- },
27
- ];
28
- };