@jsse/eslint-config 0.4.9 → 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 (104) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +1 -1
  3. package/dist/cli.js +9 -6
  4. package/dist/index.d.ts +2 -1
  5. package/dist/index.js +29 -123
  6. package/dist/version-Cmu7XVG1.js +39 -0
  7. package/package.json +12 -9
  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
@@ -1,135 +0,0 @@
1
- import { uniqueStrings } from "src/utils.js";
2
- import { GLOB_TSCONFIG } from "../globs.js";
3
- const tsconfigGlobs = (extendGlobs) => {
4
- return extendGlobs === undefined || extendGlobs.length === 0
5
- ? GLOB_TSCONFIG
6
- : uniqueStrings(GLOB_TSCONFIG, extendGlobs);
7
- };
8
- export const sortTsconfig = async (options) => {
9
- return [
10
- {
11
- files: tsconfigGlobs(options?.extendTsconfigGlobs),
12
- name: "jsse/sort/tsconfig",
13
- rules: {
14
- "jsonc/sort-keys": [
15
- "error",
16
- {
17
- order: [
18
- "extends",
19
- "compilerOptions",
20
- "references",
21
- "files",
22
- "include",
23
- "exclude",
24
- ],
25
- pathPattern: "^$",
26
- },
27
- {
28
- order: [
29
- /* Projects */
30
- "incremental",
31
- "composite",
32
- "tsBuildInfoFile",
33
- "disableSourceOfProjectReferenceRedirect",
34
- "disableSolutionSearching",
35
- "disableReferencedProjectLoad",
36
- /* Language and Environment */
37
- "target",
38
- "jsx",
39
- "jsxFactory",
40
- "jsxFragmentFactory",
41
- "jsxImportSource",
42
- "lib",
43
- "moduleDetection",
44
- "noLib",
45
- "reactNamespace",
46
- "useDefineForClassFields",
47
- "emitDecoratorMetadata",
48
- "experimentalDecorators",
49
- "libReplacement",
50
- /* Modules */
51
- "baseUrl",
52
- "rootDir",
53
- "rootDirs",
54
- "customConditions",
55
- "module",
56
- "moduleResolution",
57
- "moduleSuffixes",
58
- "noResolve",
59
- "paths",
60
- "resolveJsonModule",
61
- "resolvePackageJsonExports",
62
- "resolvePackageJsonImports",
63
- "typeRoots",
64
- "types",
65
- "allowArbitraryExtensions",
66
- "allowImportingTsExtensions",
67
- "allowUmdGlobalAccess",
68
- /* JavaScript Support */
69
- "allowJs",
70
- "checkJs",
71
- "maxNodeModuleJsDepth",
72
- /* Type Checking */
73
- "strict",
74
- "strictBindCallApply",
75
- "strictFunctionTypes",
76
- "strictNullChecks",
77
- "strictPropertyInitialization",
78
- "allowUnreachableCode",
79
- "allowUnusedLabels",
80
- "alwaysStrict",
81
- "exactOptionalPropertyTypes",
82
- "noFallthroughCasesInSwitch",
83
- "noImplicitAny",
84
- "noImplicitOverride",
85
- "noImplicitReturns",
86
- "noImplicitThis",
87
- "noPropertyAccessFromIndexSignature",
88
- "noUncheckedIndexedAccess",
89
- "noUnusedLocals",
90
- "noUnusedParameters",
91
- "useUnknownInCatchVariables",
92
- /* Emit */
93
- "declaration",
94
- "declarationDir",
95
- "declarationMap",
96
- "downlevelIteration",
97
- "emitBOM",
98
- "emitDeclarationOnly",
99
- "importHelpers",
100
- "importsNotUsedAsValues",
101
- "inlineSourceMap",
102
- "inlineSources",
103
- "mapRoot",
104
- "newLine",
105
- "noEmit",
106
- "noEmitHelpers",
107
- "noEmitOnError",
108
- "outDir",
109
- "outFile",
110
- "preserveConstEnums",
111
- "preserveValueImports",
112
- "removeComments",
113
- "sourceMap",
114
- "sourceRoot",
115
- "stripInternal",
116
- /* Interop Constraints */
117
- "allowSyntheticDefaultImports",
118
- "esModuleInterop",
119
- "forceConsistentCasingInFileNames",
120
- "isolatedDeclarations",
121
- "isolatedModules",
122
- "preserveSymlinks",
123
- "verbatimModuleSyntax",
124
- "erasableSyntaxOnly",
125
- /* Completeness */
126
- "skipDefaultLibCheck",
127
- "skipLibCheck",
128
- ],
129
- pathPattern: "^compilerOptions$",
130
- },
131
- ],
132
- },
133
- },
134
- ];
135
- };
@@ -1,2 +0,0 @@
1
- import type { EslintConfigFn, StylisticConfig } from "../types.js";
2
- export declare const stylistic: EslintConfigFn<StylisticConfig>;
@@ -1,39 +0,0 @@
1
- import { importPluginStylistic } from "../plugins.js";
2
- function jsxStylistic() {
3
- return {
4
- "@stylistic/jsx-curly-brace-presence": [
5
- "error",
6
- { propElementValues: "always" },
7
- ],
8
- // TODO: maybe bring back? tis a formatter thing tho...
9
- "@stylistic/jsx-indent-props": [
10
- "error",
11
- {
12
- indentMode: 2,
13
- },
14
- ],
15
- "@stylistic/jsx-quotes": "error",
16
- };
17
- }
18
- export const stylistic = async (options) => {
19
- const { jsx = true, quotes = "double" } = options ?? {};
20
- const { pluginStylistic } = await importPluginStylistic();
21
- return [
22
- {
23
- name: "jsse/stylistic",
24
- plugins: {
25
- // eslint-disable-next-line @typescript-eslint/naming-convention
26
- "@stylistic": pluginStylistic,
27
- },
28
- rules: {
29
- "@stylistic/quote-props": ["error", "as-needed"],
30
- "@stylistic/quotes": [
31
- "error",
32
- quotes,
33
- { allowTemplateLiterals: "never", avoidEscape: true },
34
- ],
35
- ...(jsx ? jsxStylistic() : {}),
36
- },
37
- },
38
- ];
39
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,81 +0,0 @@
1
- /* eslint-disable unicorn/no-empty-file */
2
- // import { err, ok } from "neverthrow";
3
- // import type {
4
- // EslintConfigFn,
5
- // TailwindEslintSettings,
6
- // TailwindOptions,
7
- // } from "../types.js";
8
- // import { GLOB_SRC } from "../globs.js";
9
- // import { log } from "../log.js";
10
- // import { interopDefault } from "../utils.js";
11
- export {};
12
- // async function importPluginTailwind() {
13
- // // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
14
- // const pluginTailwind = await interopDefault(
15
- // // @ts-expect-error - bad types
16
- // import("eslint-plugin-tailwindcss"),
17
- // );
18
- // // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
19
- // return { pluginTailwind };
20
- // }
21
- // async function safeImportPluginTailwind() {
22
- // try {
23
- // const plugin = await importPluginTailwind();
24
- // return ok(plugin);
25
- // } catch (e: unknown) {
26
- // const msg =
27
- // (e instanceof Error ? e.message : String(e)) ||
28
- // `unknown error ${String(e)}`;
29
- // return err(new Error(msg));
30
- // }
31
- // }
32
- // const TAILWIND_ESLINT_SETTINGS_DEFAULT: TailwindEslintSettings = {
33
- // // These are the default values but feel free to customize
34
- // callees: ["classnames", "clsx", "ctl", "cn", "cx", "twMerge", "twJoin"],
35
- // classRegex: "^class(Name)?$", // can be modified to support custom attributes. E.g. "^tw$" for `twin.macro`
36
- // config: "tailwind.config.js", // returned from `loadConfig()` utility if not provided
37
- // cssFiles: ["**/*.css", "!**/node_modules", "!**/.*", "!**/dist", "!**/build"],
38
- // cssFilesRefreshRate: 5000,
39
- // removeDuplicates: true,
40
- // skipClassAttribute: false,
41
- // tags: [], // can be set to e.g. ['tw'] for use in tw`bg-blue`
42
- // whitelist: [],
43
- // };
44
- // function tailwindSettings(options?: TailwindOptions): TailwindEslintSettings {
45
- // if (typeof options === "boolean") {
46
- // return TAILWIND_ESLINT_SETTINGS_DEFAULT;
47
- // }
48
- // return { ...TAILWIND_ESLINT_SETTINGS_DEFAULT, ...options };
49
- // }
50
- // export const tailwind: EslintConfigFn<Partial<TailwindEslintSettings>> = async (
51
- // options,
52
- // ) => {
53
- // // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
54
- // const importResult = await safeImportPluginTailwind();
55
- // return importResult.match(
56
- // ({ pluginTailwind }) => {
57
- // return [
58
- // {
59
- // files: [GLOB_SRC],
60
- // name: "jsse/tailwind/rules",
61
- // plugins: {
62
- // // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
63
- // tailwindcss: pluginTailwind,
64
- // },
65
- // // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
66
- // rules: {
67
- // // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
68
- // ...pluginTailwind.configs.recommended.rules,
69
- // },
70
- // settings: {
71
- // tailwindcss: tailwindSettings(options),
72
- // },
73
- // },
74
- // ];
75
- // },
76
- // (error) => {
77
- // log.error(error.message);
78
- // return [];
79
- // },
80
- // );
81
- // };
@@ -1,2 +0,0 @@
1
- import type { EslintConfigFn, OptionsFiles, OptionsOverrides, OptionsStylistic } from "../types.js";
2
- export declare const toml: EslintConfigFn<OptionsOverrides & OptionsFiles & OptionsStylistic>;
@@ -1,50 +0,0 @@
1
- import { GLOB_TOML } from "../globs.js";
2
- import { interopDefault } from "../utils.js";
3
- export const toml = async (options) => {
4
- const { files = [GLOB_TOML], overrides = {}, stylistic = true, } = options ?? {};
5
- const [pluginToml, parserToml] = await Promise.all([
6
- interopDefault(import("eslint-plugin-toml")),
7
- interopDefault(import("toml-eslint-parser")),
8
- ]);
9
- return [
10
- {
11
- name: "jsse/toml/setup",
12
- plugins: {
13
- toml: pluginToml,
14
- },
15
- },
16
- {
17
- files,
18
- languageOptions: {
19
- parser: parserToml,
20
- },
21
- name: "jsse/toml/rules",
22
- rules: {
23
- "toml/comma-style": "error",
24
- "toml/keys-order": "error",
25
- "toml/no-space-dots": "error",
26
- "toml/no-unreadable-number-separator": "error",
27
- "toml/precision-of-fractional-seconds": "error",
28
- "toml/precision-of-integer": "error",
29
- "toml/tables-order": "error",
30
- "toml/vue-custom-block/no-parsing-error": "error",
31
- ...(stylistic
32
- ? {
33
- "toml/array-bracket-newline": "error",
34
- "toml/array-bracket-spacing": "error",
35
- "toml/array-element-newline": "error",
36
- "toml/indent": ["error", 2],
37
- "toml/inline-table-curly-spacing": "error",
38
- "toml/key-spacing": "error",
39
- "toml/padding-line-between-pairs": "error",
40
- "toml/padding-line-between-tables": "error",
41
- "toml/quoted-keys": "error",
42
- "toml/spaced-comment": "error",
43
- "toml/table-bracket-spacing": "error",
44
- }
45
- : {}),
46
- ...overrides,
47
- },
48
- },
49
- ];
50
- };
@@ -1,7 +0,0 @@
1
- import type { Config, OptionsComponentExts, OptionsReact, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes } from "../../types.js";
2
- export type TsParserOptions = OptionsComponentExts & OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes & OptionsReact & {
3
- name?: string;
4
- };
5
- export declare function typescriptParser(options: TsParserOptions): Config & {
6
- name: string;
7
- };
@@ -1,71 +0,0 @@
1
- import process from "node:process";
2
- import { dbg } from "src/lager.js";
3
- import { GLOB_MARKDOWN, GLOB_TS, GLOB_TSX } from "../../globs.js";
4
- import { parserTs } from "../../plugins.js";
5
- function autoUseParserService(options) {
6
- if (options.useProjectService !== undefined) {
7
- return options.useProjectService;
8
- }
9
- return !!(options.tsconfig &&
10
- ((typeof options.tsconfig === "string" &&
11
- options.tsconfig === "tsconfig.json") ||
12
- (Array.isArray(options.tsconfig) &&
13
- options.tsconfig.length === 1 &&
14
- options.tsconfig[0] === "tsconfig.json")));
15
- }
16
- export function typescriptParser(options) {
17
- const { componentExts = [], filesTypeAware: files = [GLOB_TS, GLOB_TSX], ignoresTypeAware: ignores = [GLOB_MARKDOWN], name, parserOptions: parserOptionsOverride = {}, react, tsconfig, useProjectService = autoUseParserService(options), } = options;
18
- const typeAware = !!tsconfig;
19
- if (useProjectService) {
20
- dbg("ts parser-options using `projectService`project service");
21
- return {
22
- files,
23
- ...(ignores.length > 0 ? { ignores } : {}),
24
- languageOptions: {
25
- parser: parserTs,
26
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
27
- parserOptions: {
28
- extraFileExtensions: componentExts.map((ext) => `.${ext}`),
29
- jsxPragma: react ? "React" : undefined,
30
- sourceType: "module",
31
- ...(typeAware
32
- ? {
33
- projectService: {
34
- allowDefaultProject: ["*.js"],
35
- defaultProject: (typeof tsconfig === "string" ? tsconfig : tsconfig[0]) ??
36
- "tsconfig.json",
37
- },
38
- tsconfigRootDir: process.cwd().replaceAll("\\", "/"),
39
- }
40
- : {}),
41
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
42
- ...parserOptionsOverride,
43
- },
44
- },
45
- name: name ?? `jsse/typescript/${typeAware ? "type-aware-parser" : "parser"}`,
46
- };
47
- }
48
- dbg("ts parser-options NOT using `projectService`project service - using `project`");
49
- return {
50
- files,
51
- ...(ignores.length > 0 ? { ignores } : {}),
52
- languageOptions: {
53
- parser: parserTs,
54
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
55
- parserOptions: {
56
- extraFileExtensions: componentExts.map((ext) => `.${ext}`),
57
- jsxPragma: react ? "React" : undefined,
58
- sourceType: "module",
59
- ...(typeAware
60
- ? {
61
- project: Array.isArray(tsconfig) ? tsconfig : [tsconfig],
62
- tsconfigRootDir: process.cwd().replaceAll("\\", "/"),
63
- }
64
- : {}),
65
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
66
- ...parserOptionsOverride,
67
- },
68
- },
69
- name: name ?? `jsse/typescript/${typeAware ? "type-aware-parser" : "parser"}`,
70
- };
71
- }
@@ -1 +0,0 @@
1
- export declare const requiresTypeChecking: string[];
@@ -1,61 +0,0 @@
1
- export const requiresTypeChecking = [
2
- "@typescript-eslint/await-thenable",
3
- "@typescript-eslint/consistent-return",
4
- "@typescript-eslint/consistent-type-exports",
5
- "@typescript-eslint/dot-notation",
6
- "@typescript-eslint/naming-convention",
7
- "@typescript-eslint/no-array-delete",
8
- "@typescript-eslint/no-base-to-string",
9
- "@typescript-eslint/no-confusing-void-expression",
10
- "@typescript-eslint/no-deprecated",
11
- "@typescript-eslint/no-duplicate-type-constituents",
12
- "@typescript-eslint/no-floating-promises",
13
- "@typescript-eslint/no-for-in-array",
14
- "@typescript-eslint/no-implied-eval",
15
- "@typescript-eslint/no-meaningless-void-operator",
16
- "@typescript-eslint/no-misused-promises",
17
- "@typescript-eslint/no-misused-spread",
18
- "@typescript-eslint/no-mixed-enums",
19
- "@typescript-eslint/no-redundant-type-constituents",
20
- "@typescript-eslint/no-unnecessary-boolean-literal-compare",
21
- "@typescript-eslint/no-unnecessary-condition",
22
- "@typescript-eslint/no-unnecessary-qualifier",
23
- "@typescript-eslint/no-unnecessary-template-expression",
24
- "@typescript-eslint/no-unnecessary-type-arguments",
25
- "@typescript-eslint/no-unnecessary-type-assertion",
26
- "@typescript-eslint/no-unnecessary-type-conversion",
27
- "@typescript-eslint/no-unnecessary-type-parameters",
28
- "@typescript-eslint/no-unsafe-argument",
29
- "@typescript-eslint/no-unsafe-assignment",
30
- "@typescript-eslint/no-unsafe-call",
31
- "@typescript-eslint/no-unsafe-enum-comparison",
32
- "@typescript-eslint/no-unsafe-member-access",
33
- "@typescript-eslint/no-unsafe-return",
34
- "@typescript-eslint/no-unsafe-type-assertion",
35
- "@typescript-eslint/no-unsafe-unary-minus",
36
- "@typescript-eslint/non-nullable-type-assertion-style",
37
- "@typescript-eslint/only-throw-error",
38
- "@typescript-eslint/prefer-destructuring",
39
- "@typescript-eslint/prefer-find",
40
- "@typescript-eslint/prefer-includes",
41
- "@typescript-eslint/prefer-nullish-coalescing",
42
- "@typescript-eslint/prefer-optional-chain",
43
- "@typescript-eslint/prefer-promise-reject-errors",
44
- "@typescript-eslint/prefer-readonly",
45
- "@typescript-eslint/prefer-readonly-parameter-types",
46
- "@typescript-eslint/prefer-reduce-type-parameter",
47
- "@typescript-eslint/prefer-regexp-exec",
48
- "@typescript-eslint/prefer-return-this-type",
49
- "@typescript-eslint/prefer-string-starts-ends-with",
50
- "@typescript-eslint/promise-function-async",
51
- "@typescript-eslint/related-getter-setter-pairs",
52
- "@typescript-eslint/require-array-sort-compare",
53
- "@typescript-eslint/require-await",
54
- "@typescript-eslint/restrict-plus-operands",
55
- "@typescript-eslint/restrict-template-expressions",
56
- "@typescript-eslint/return-await",
57
- "@typescript-eslint/strict-boolean-expressions",
58
- "@typescript-eslint/switch-exhaustiveness-check",
59
- "@typescript-eslint/unbound-method",
60
- "@typescript-eslint/use-unknown-in-catch-callback-variable",
61
- ];
@@ -1,2 +0,0 @@
1
- import type { LanguageOptions, OptionsComponentExts, OptionsReact, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes } from "../../types.js";
2
- export declare function typescriptLanguageOptions(options: OptionsComponentExts & OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes & OptionsReact): LanguageOptions;
@@ -1,22 +0,0 @@
1
- import process from "node:process";
2
- import { parserTs } from "../../plugins.js";
3
- export function typescriptLanguageOptions(options) {
4
- const { componentExts = [], react, tsconfig } = options || {};
5
- const tsOptions = tsconfig
6
- ? {
7
- project: Array.isArray(tsconfig) ? tsconfig : [tsconfig],
8
- tsconfigRootDir: process.cwd(),
9
- }
10
- : {};
11
- const parserOptions = {
12
- ecmaFeatures: react ? { jsx: true, modules: true } : undefined,
13
- extraFileExtensions: componentExts.map((ext) => `.${ext}`),
14
- sourceType: "module",
15
- ...tsOptions,
16
- jsxPragma: react ? "React" : undefined,
17
- };
18
- return {
19
- parser: parserTs,
20
- parserOptions,
21
- };
22
- }
@@ -1,11 +0,0 @@
1
- import type { Config } from "../../types.js";
2
- export declare function typescriptRulesTypeAware(props?: {
3
- strict?: boolean;
4
- }): Config["rules"];
5
- export declare function typescriptRulesTypeOblivious(props?: {
6
- strict?: boolean;
7
- }): Config["rules"];
8
- export declare function typescriptRules(props?: {
9
- typeAware: boolean;
10
- strict: boolean;
11
- }): Config["rules"];