@zzxming/eslint-config
v0.3.4
Published
Eslint config for zzxming
Downloads
324
Readme
@zzxming/eslint-config
After install and config. Please run once
eslint .
to install required config rules.
Javascript rules
already use plugin eslint-plugin-unused-imports
. please see official docs to config rules.
| plugin name | rename |
| ------------------------------ | ---------------- |
| eslint-plugin-unused-imports
| unused-imports
|
Typescript rules
already use plugin @typescript-eslint/eslint-plugin
. please see official docs to config rules.
| plugin name | rename |
| ---------------------------------- | ------ |
| @typescript-eslint/eslint-plugin
| ts
|
Vue rules
already use plugin eslint-plugin-vue
. please see official docs to config rules.
here is the rules plugin name:
| plugin name | rename |
| ------------------- | ------ |
| eslint-plugin-vue
| vue
|
React rules
already use plugin @eslint-react/eslint-plugin
、eslint-plugin-react-hooks
、eslint-plugin-react-refresh
. please see official docs to config rules.
here is the rules plugin name:
| plugin name | rename |
| --------------------------------- | ------------------------- |
| @eslint-react
| react
|
| @eslint-react/dom
| react-dom
|
| @eslint-react/hooks-extra
| react-hooks-extra
|
| @eslint-react/naming-convention
| react-naming-convention
|
| eslint-plugin-react-hooks
| react-hooks
|
| eslint-plugin-react-refresh
| react-refresh
|
Json rules
already use plugin eslint-plugin-jsonc
. please see official docs to config rules.
| plugin name | rename |
| --------------------- | ------- |
| eslint-plugin-jsonc
| jsonc
|
Markdown rules
already use plugin eslint-plugin-markdown
. please see official docs to config rules.
| plugin name | rename |
| ------------------------ | ---------- |
| eslint-plugin-markdown
| markdown
|
Tailwindcss rules
already use plugin eslint-plugin-tailwindcss
. please see official docs to config rules.
| plugin name | rename |
| --------------------------- | ------------- |
| eslint-plugin-tailwindcss
| tailwindcss
|
Unicorn rules
already use plugin eslint-plugin-unicorn
. please see official docs to config rules.
| plugin name | rename |
| ----------------------- | --------- |
| eslint-plugin-unicorn
| unicorn
|
Yaml rules
already use plugin eslint-plugin-yml
. please see official docs to config rules.
| plugin name | rename |
| ------------------- | ------ |
| eslint-plugin-yml
| yaml
|
Vitest rules
already use plugin @vitest/eslint-plugin
. please see official docs to config rules.
| plugin name | rename |
| ----------------------- | -------- |
| @vitest/eslint-plugin
| vitest
|
Other rules
| plugin name | rename |
| ----------------------------- | --------------- |
| eslint-plugin-antfu
| antfu
|
| @stylistic/eslint-plugin
| style
|
| eslint-plugin-format
| format
|
| eslint-plugin-import-x
| import
|
| eslint-plugin-format
| format
|
| eslint-plugin-perfectionist
| perfectionist
|
factory Arguments
| args | type | require |
| ------ | --------------- | ------- |
| option | OptionsConfig
| false
|
export interface StylisticConfigOptions {
indent?: number | 'tab';
jsx?: boolean;
quotes?: 'double' | 'single';
semi?: boolean;
}
export interface FilesOverrides {
files?: string[];
}
export interface StylisticOverrides {
stylistic?: StylisticConfigOptions;
}
export interface OptionsOverrides {
overrides?: Linter.Config;
}
export interface StylisticOptions extends StylisticConfigOptions, OptionsOverrides {}
export type JavascriptOptions = OptionsOverrides;
export interface TypescriptOptions extends OptionsOverrides {
parserOptions?: ESLint.Environment['parserOptions'];
}
export interface VueOptions extends OptionsOverrides, FilesOverrides, StylisticOverrides {
vueVersion?: 2 | 3;
typescript?: boolean;
}
export interface JsoncOptions extends OptionsOverrides, FilesOverrides, StylisticOverrides {}
export interface MarkdownOptions extends OptionsOverrides, FilesOverrides {
componentExts?: string[];
}
export interface FormmatterOptions extends StylisticOverrides {
css?: boolean;
html?: boolean;
markdown?: boolean;
xml?: boolean;
prettierOptions?: Record<string, any>;
}
export interface YamlOptions extends OptionsOverrides, FilesOverrides, StylisticOverrides {}
export type UnicornOptions = OptionsOverrides;
export type TailwindcssOptions = OptionsOverrides;
export interface ReactOptions extends OptionsOverrides {
files?: string[];
}
export interface VitestOptions extends OptionsOverrides {
files?: string[];
};
export interface OptionsConfig {
stylistic?: boolean | StylisticOptions;
javascript?: boolean | JavascriptOptions;
gitignore?: boolean;
jsx?: boolean;
typescript?: boolean | TypescriptOptions;
vue?: boolean | VueOptions;
tailwindcss?: boolean | TailwindcssOptions;
jsonc?: boolean | JsoncOptions;
markdown?: boolean | JsoncOptions;
formatters?: boolean | FormmatterOptions;
yaml?: boolean | YamlOptions;
unicorn?: UnicornOptions;
react?: boolean | ReactOptions;
vitest?: boolean | VitestOptions;
overrides?: Linter.Config[];
}