@jsse/eslint-config 0.4.8 → 0.4.11

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 (105) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +1 -1
  3. package/dist/cli.d.ts +1 -1
  4. package/dist/cli.js +11 -8
  5. package/dist/index.d.ts +14 -4
  6. package/dist/index.js +38 -132
  7. package/dist/version-Cmu7XVG1.js +39 -0
  8. package/package.json +23 -20
  9. package/dist/esm/cli.d.ts +0 -1
  10. package/dist/esm/cli.js +0 -121
  11. package/dist/esm/config-fns.d.ts +0 -138
  12. package/dist/esm/config-fns.js +0 -161
  13. package/dist/esm/configs/antfu.d.ts +0 -4
  14. package/dist/esm/configs/antfu.js +0 -30
  15. package/dist/esm/configs/command.d.ts +0 -10
  16. package/dist/esm/configs/command.js +0 -17
  17. package/dist/esm/configs/de-morgan.d.ts +0 -2
  18. package/dist/esm/configs/de-morgan.js +0 -9
  19. package/dist/esm/configs/eslint-comments.d.ts +0 -2
  20. package/dist/esm/configs/eslint-comments.js +0 -16
  21. package/dist/esm/configs/gql.d.ts +0 -2
  22. package/dist/esm/configs/gql.js +0 -4
  23. package/dist/esm/configs/ignores.d.ts +0 -2
  24. package/dist/esm/configs/ignores.js +0 -9
  25. package/dist/esm/configs/imports.d.ts +0 -2
  26. package/dist/esm/configs/imports.js +0 -28
  27. package/dist/esm/configs/javascript.d.ts +0 -6
  28. package/dist/esm/configs/javascript.js +0 -262
  29. package/dist/esm/configs/jsdoc.d.ts +0 -2
  30. package/dist/esm/configs/jsdoc.js +0 -31
  31. package/dist/esm/configs/jsonc.d.ts +0 -4
  32. package/dist/esm/configs/jsonc.js +0 -76
  33. package/dist/esm/configs/markdown.d.ts +0 -4
  34. package/dist/esm/configs/markdown.js +0 -122
  35. package/dist/esm/configs/n.d.ts +0 -2
  36. package/dist/esm/configs/n.js +0 -21
  37. package/dist/esm/configs/no-only-tests.d.ts +0 -4
  38. package/dist/esm/configs/no-only-tests.js +0 -31
  39. package/dist/esm/configs/perfectionist.d.ts +0 -7
  40. package/dist/esm/configs/perfectionist.js +0 -60
  41. package/dist/esm/configs/pnpm.d.ts +0 -2
  42. package/dist/esm/configs/pnpm.js +0 -34
  43. package/dist/esm/configs/prettier.d.ts +0 -7
  44. package/dist/esm/configs/prettier.js +0 -126
  45. package/dist/esm/configs/react.d.ts +0 -6
  46. package/dist/esm/configs/react.js +0 -300
  47. package/dist/esm/configs/sort-package-json.d.ts +0 -7
  48. package/dist/esm/configs/sort-package-json.js +0 -102
  49. package/dist/esm/configs/sort-tsconfig.d.ts +0 -14
  50. package/dist/esm/configs/sort-tsconfig.js +0 -135
  51. package/dist/esm/configs/stylistic.d.ts +0 -2
  52. package/dist/esm/configs/stylistic.js +0 -39
  53. package/dist/esm/configs/tailwind.d.ts +0 -1
  54. package/dist/esm/configs/tailwind.js +0 -81
  55. package/dist/esm/configs/toml.d.ts +0 -2
  56. package/dist/esm/configs/toml.js +0 -50
  57. package/dist/esm/configs/ts/parser.d.ts +0 -7
  58. package/dist/esm/configs/ts/parser.js +0 -71
  59. package/dist/esm/configs/ts/requires-type-checking.d.ts +0 -1
  60. package/dist/esm/configs/ts/requires-type-checking.js +0 -61
  61. package/dist/esm/configs/ts/typescript-language-options.d.ts +0 -2
  62. package/dist/esm/configs/ts/typescript-language-options.js +0 -22
  63. package/dist/esm/configs/ts/typescript-rules.d.ts +0 -11
  64. package/dist/esm/configs/ts/typescript-rules.js +0 -379
  65. package/dist/esm/configs/ts/typescript.d.ts +0 -4
  66. package/dist/esm/configs/ts/typescript.js +0 -123
  67. package/dist/esm/configs/tsdoc.d.ts +0 -2
  68. package/dist/esm/configs/tsdoc.js +0 -16
  69. package/dist/esm/configs/unicorn.d.ts +0 -2
  70. package/dist/esm/configs/unicorn.js +0 -114
  71. package/dist/esm/configs/vitest.d.ts +0 -4
  72. package/dist/esm/configs/vitest.js +0 -29
  73. package/dist/esm/configs/yml.d.ts +0 -4
  74. package/dist/esm/configs/yml.js +0 -51
  75. package/dist/esm/const.d.ts +0 -5
  76. package/dist/esm/const.js +0 -25
  77. package/dist/esm/define-config.d.ts +0 -7
  78. package/dist/esm/define-config.js +0 -256
  79. package/dist/esm/dev.d.ts +0 -4
  80. package/dist/esm/dev.js +0 -25
  81. package/dist/esm/fixable.d.ts +0 -2
  82. package/dist/esm/fixable.js +0 -4
  83. package/dist/esm/generated/fixable-rules-map.d.ts +0 -2
  84. package/dist/esm/generated/fixable-rules-map.js +0 -443
  85. package/dist/esm/generated/version.d.ts +0 -1
  86. package/dist/esm/generated/version.js +0 -1
  87. package/dist/esm/globs.d.ts +0 -25
  88. package/dist/esm/globs.js +0 -73
  89. package/dist/esm/index.d.ts +0 -9
  90. package/dist/esm/index.js +0 -8
  91. package/dist/esm/lager.d.ts +0 -32
  92. package/dist/esm/lager.js +0 -87
  93. package/dist/esm/log.d.ts +0 -2
  94. package/dist/esm/log.js +0 -2
  95. package/dist/esm/plugins-all.d.ts +0 -26
  96. package/dist/esm/plugins-all.js +0 -120
  97. package/dist/esm/plugins.d.ts +0 -1570
  98. package/dist/esm/plugins.js +0 -97
  99. package/dist/esm/presets.d.ts +0 -18
  100. package/dist/esm/presets.js +0 -75
  101. package/dist/esm/types.d.ts +0 -287
  102. package/dist/esm/types.js +0 -1
  103. package/dist/esm/utils.d.ts +0 -51
  104. package/dist/esm/utils.js +0 -156
  105. package/dist/version-PF6gUNyJ.js +0 -5
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
- };
@@ -1,6 +0,0 @@
1
- import type { EslintConfigFn, OptionsIsInEditor, OptionsOverrides } from "../types.js";
2
- type JavascriptOptions = OptionsIsInEditor & OptionsOverrides & {
3
- reportUnusedDisableDirectives?: boolean;
4
- };
5
- export declare const javascript: EslintConfigFn<JavascriptOptions>;
6
- export {};