3.8.3 • Published 9 months ago

@debbl/eslint-config v3.8.3

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

@debbl/eslint-config

npm

参考

https://github.com/antfu/eslint-config

安装

pnpm i eslint @debbl/eslint-config -D

配置 eslint.config.js

默认启动配置

  • ignores
  • javascript
  • comments
  • node
  • jsdoc
  • imports
  • unicorn
  • sortKeys
  • test
  • jsonc
  • yml
  • toml
  • markdown
  • prettier
import { defineConfig } from "@debbl/eslint-config";

export default defineConfig();

配置 Prettier, 会覆盖默认的规则

import { defineConfig } from "@debbl/eslint-config";

export default defineConfig({
  typescript: true,
  prettier: {
    semi: false,
  },
});

完整的 OptionConfig

types.ts

export interface OptionsConfig extends OptionsComponentExts {
  /**
   * Enable gitignore support.
   * Passing an object to configure the options.
   * @default true
   */
  ignores?: boolean | GetConfigOption<IgnoresConfig>;

  /**
   * Enable JavaScript support.
   * Passing an object to configure the options.
   * @default true
   */
  javascript?: GetConfigOption<JavascriptConfig>;

  /**
   * Enable TypeScript support.
   *
   * Passing an object to enable TypeScript Language Server support.
   *
   * @default false
   */
  typescript?: boolean | GetConfigOption<TypeScriptConfig>;

  /**
   * Enable test support.
   *
   * @default true
   */
  test?: boolean | GetConfigOption<TestConfig>;

  /**
   * Enable Vue support.
   *
   * @default false
   */
  vue?: boolean | GetConfigOption<VueConfig>;

  /**
   * Enable React support, Passing an object to enable Next.js support.
   *
   * @default false
   */
  react?: boolean | GetConfigOption<ReactConfig>;

  /**
   * Enable solid support, Passing an object to enable Next.js support.
   *
   * @default false
   */
  solid?: boolean;

  /**
   * Enable JSONC support.
   *
   * @default true
   */
  jsonc?: boolean | GetConfigOption<JsoncConfig>;

  /**
   * Enable YML support.
   *
   * @default true
   */
  yml?: boolean | GetConfigOption<YmlConfig>;

  /**
   * Enable TOML support.
   * @default true
   */
  toml?: boolean | GetConfigOption<TomlConfig>;

  /**
   * Enable Markdown support.
   *
   * @default true
   */
  markdown?: boolean | GetConfigOption<MarkdownConfig>;

  /**
   * Enable prettier rules.
   *
   * @default true
   */
  prettier?: boolean | Omit<GetConfigOption<PrettierConfig>, "tailwindcss">;

  /**
   * Enable Tailwind CSS support.
   * if set to "prettier", it will use `prettier-plugin-tailwindcss` @see https://github.com/tailwindlabs/prettier-plugin-tailwindcss
   * @default false
   */
  tailwindcss?: boolean | "prettier";

  /**
   * Custom config
   */
  customConfig?: ConfigItem[] | ConfigItem;
}
3.8.3

9 months ago

3.8.2

9 months ago

3.8.0

10 months ago

3.8.1

10 months ago

3.7.1

10 months ago

3.7.0

10 months ago

3.6.1

10 months ago

3.6.0

10 months ago

3.5.0

11 months ago

3.4.0

12 months ago

3.2.2

1 year ago

3.2.1

1 year ago

3.2.0

1 year ago

3.2.4

1 year ago

3.2.3

1 year ago

3.3.1

1 year ago

3.3.0

1 year ago

3.3.2

1 year ago

3.1.8

1 year ago

3.2.0-beta.4

1 year ago

3.1.7

1 year ago

3.2.0-beta.5

1 year ago

3.2.0-beta.2

1 year ago

3.2.0-beta.3

1 year ago

3.2.0-beta.1

1 year ago

3.1.6

1 year ago

3.1.5

1 year ago

3.1.4

1 year ago

3.1.3

1 year ago

3.1.2

1 year ago

3.1.1

1 year ago

3.1.0

1 year ago

3.0.7

1 year ago

3.0.6

1 year ago

3.0.5

1 year ago

3.0.5-beta.0

1 year ago

3.0.5-beta.1

1 year ago

3.0.4

1 year ago

3.0.3

1 year ago

3.0.2

1 year ago

3.0.1

1 year ago

3.0.0

2 years ago

2.4.1

2 years ago

2.4.0

2 years ago

2.3.0

2 years ago

2.3.1

2 years ago

2.1.2

2 years ago

2.2.0

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago

0.0.65

2 years ago

1.0.0-beta.12

2 years ago

1.0.0-beta.11

2 years ago

1.0.0-beta.10

2 years ago

1.0.0-beta.9

2 years ago

1.0.0-beta.8

2 years ago

1.0.0-beta.7

2 years ago

1.0.0-beta.6

2 years ago

1.0.0-beta.5

2 years ago

1.0.0-beta.4

2 years ago

1.0.0-beta.3

2 years ago

1.0.0-beta.2

2 years ago

1.0.0-beta.1

2 years ago

1.0.0-beta.0

2 years ago

0.0.64

2 years ago

0.0.63

2 years ago

0.0.62

2 years ago

0.0.61

2 years ago

0.0.60

2 years ago

0.0.59

2 years ago

0.0.58

2 years ago

0.0.57

2 years ago

0.0.56

2 years ago

0.0.55

2 years ago

0.0.53

2 years ago

0.0.52

2 years ago

0.0.51

2 years ago