@antfu/eslint-config 0.43.1 → 1.0.0-beta.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/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # @antfu/eslint-config
2
+
3
+ [![code style](https://antfu.me/badge-code-style.svg)](https://github.com/antfu/eslint-config)
4
+
5
+ - Single quotes, no semi
6
+ - Auto fix for formatting (aimed to be used standalone **without** Prettier)
7
+ - Designed to work with TypeScript, Vue out-of-box
8
+ - Lint also for json, yaml, markdown
9
+ - Sorted imports, dangling commas
10
+ - Reasonable defaults, best practices, only one-line of config
11
+ - [ESLint Flat config](https://eslint.org/docs/latest/use/configure/configuration-files-new), compose easily!
12
+ - Using [ESLint Stylistic](https://github.com/eslint-stylistic/eslint-stylistic)
13
+ - **Style principle**: Minimal for reading, stable for diff
14
+
15
+ ## Usage
16
+
17
+ Check [antfu/eslint-config](https://github.com/antfu/eslint-config) for more details.
@@ -0,0 +1,100 @@
1
+ import * as eslint_define_config from 'eslint-define-config';
2
+ import { FlatESLintConfigItem } from 'eslint-define-config';
3
+ export { default as pluginAntfu } from 'eslint-plugin-antfu';
4
+ export { default as pluginComments } from 'eslint-plugin-eslint-comments';
5
+ export { default as pluginImport } from 'eslint-plugin-i';
6
+ export { default as pluginJsdoc } from 'eslint-plugin-jsdoc';
7
+ export { default as pluginJsonc } from 'eslint-plugin-jsonc';
8
+ export { default as pluginMarkdown } from 'eslint-plugin-markdown';
9
+ export { default as pluginNode } from 'eslint-plugin-n';
10
+ export { default as pluginStylisticJs } from '@stylistic/eslint-plugin-js';
11
+ export { default as pluginStylisticTs } from '@stylistic/eslint-plugin-ts';
12
+ export { default as pluginTs } from '@typescript-eslint/eslint-plugin';
13
+ export { default as pluginUnicorn } from 'eslint-plugin-unicorn';
14
+ export { default as pluginUnusedImports } from 'eslint-plugin-unused-imports';
15
+ export { default as pluginVue } from 'eslint-plugin-vue';
16
+ export { default as pluginYml } from 'eslint-plugin-yml';
17
+ export { default as pluginNoOnlyTests } from 'eslint-plugin-no-only-tests';
18
+ export { default as parserTs } from '@typescript-eslint/parser';
19
+ export { default as parserVue } from 'vue-eslint-parser';
20
+ export { default as parserYml } from 'yaml-eslint-parser';
21
+ export { default as parserJsonc } from 'jsonc-eslint-parser';
22
+
23
+ /**
24
+ * The fundamental preset
25
+ */
26
+ declare const presetJavaScript: eslint_define_config.FlatESLintConfigItem[];
27
+ /**
28
+ * Preset for TypeScript
29
+ */
30
+ declare const presetTypeScript: eslint_define_config.FlatESLintConfigItem[];
31
+ /**
32
+ * Preset for Markdown, JSONC, YAML
33
+ */
34
+ declare const presetLangsExtensions: eslint_define_config.FlatESLintConfigItem[];
35
+ /**
36
+ * The full preset
37
+ *
38
+ * Automatically detects TypeScript and Vue rules based on the dependencies
39
+ */
40
+ declare const presetAuto: eslint_define_config.FlatESLintConfigItem[];
41
+ /**
42
+ * Include rules for all supported integrations
43
+ */
44
+ declare const presetAll: eslint_define_config.FlatESLintConfigItem[];
45
+
46
+ declare const comments: FlatESLintConfigItem[];
47
+
48
+ declare const ignores: FlatESLintConfigItem[];
49
+
50
+ declare const imports: FlatESLintConfigItem[];
51
+
52
+ declare const javascript: FlatESLintConfigItem[];
53
+
54
+ declare const jsdoc: FlatESLintConfigItem[];
55
+
56
+ declare const jsonc: FlatESLintConfigItem[];
57
+
58
+ declare const markdown: FlatESLintConfigItem[];
59
+
60
+ declare const node: FlatESLintConfigItem[];
61
+
62
+ /**
63
+ * Sort package.json
64
+ *
65
+ * Requires `jsonc` config
66
+ */
67
+ declare const sortPackageJson: FlatESLintConfigItem[];
68
+ /**
69
+ * Sort tsconfig.json
70
+ *
71
+ * Requires `jsonc` config
72
+ */
73
+ declare const sortTsconfig: FlatESLintConfigItem[];
74
+
75
+ declare const javascriptStylistic: FlatESLintConfigItem[];
76
+ declare const typescriptStylistic: FlatESLintConfigItem[];
77
+
78
+ declare const typescript: FlatESLintConfigItem[];
79
+ declare function typescriptWithLanguageServer({ tsconfig, }: {
80
+ tsconfig: string;
81
+ }): FlatESLintConfigItem[];
82
+
83
+ declare const unicorn: FlatESLintConfigItem[];
84
+
85
+ declare const vue: FlatESLintConfigItem[];
86
+
87
+ declare const yml: FlatESLintConfigItem[];
88
+
89
+ declare const test: FlatESLintConfigItem[];
90
+
91
+ declare const isInEditor: boolean | "" | undefined;
92
+ declare const hasTypeScript: boolean;
93
+ declare const hasVue: boolean;
94
+
95
+ /**
96
+ * Combine array and non-array configs into a single array.
97
+ */
98
+ declare function combine(...configs: (FlatESLintConfigItem | FlatESLintConfigItem[])[]): FlatESLintConfigItem[];
99
+
100
+ export { combine, comments, presetAuto as default, hasTypeScript, hasVue, ignores, imports, isInEditor, javascript, javascriptStylistic, jsdoc, jsonc, markdown, node, presetAll, presetAuto, presetJavaScript, presetLangsExtensions, presetTypeScript, sortPackageJson, sortTsconfig, test, typescript, typescriptStylistic, typescriptWithLanguageServer, unicorn, vue, yml };