3.0.1 โ€ข Published 5 months ago

@dethdkn/eslint-config v3.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

๐Ÿ“ฆ About This Package

This is my opinionated eslint-config, heavily inspired by Antfu's config. This setup is a combination of the following rules:

  • And more...

๐Ÿš€ Setup

  1. Install with your favorite package manager:

    • pnpm : pnpm add -D eslint @dethdkn/eslint-config
    • npm : npm i -D eslint @dethdkn/eslint-config
    • yarn : yarn add -D eslint @dethdkn/eslint-config
    • bun : bun add -D eslint @dethdkn/eslint-config
  2. Create a eslint.config.mjs in the project root:

// eslint.config.mjs
import dethdkn from '@dethdkn/eslint-config'

export default dethdkn()
  1. Add lint scripts to package.json:
{
  "scripts": {
    "lint": "eslint .",
    "lint:fix": "eslint . --fix"
  }
}
  1. Add the following configuration to .vscode/settings.json:
{
  // Disable the default formatter, use eslint instead
  "prettier.enable": false,
  "editor.formatOnSave": false,

  // Auto fix
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "explicit",
    "source.organizeImports": "never"
  },

  // Silent the stylistic rules in you IDE, but still auto fix them
  "eslint.rules.customizations": [
    { "rule": "style/*", "severity": "off" },
    { "rule": "format/*", "severity": "off" },
    { "rule": "*-indent", "severity": "off" },
    { "rule": "*-spacing", "severity": "off" },
    { "rule": "*-spaces", "severity": "off" },
    { "rule": "*-order", "severity": "off" },
    { "rule": "*-dangle", "severity": "off" },
    { "rule": "*-newline", "severity": "off" },
    { "rule": "*quotes", "severity": "off" },
    { "rule": "*semi", "severity": "off" }
  ],

  // Enable eslint for all supported languages
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "typescript",
    "typescriptreact",
    "vue",
    "html",
    "handlebars",
    "markdown",
    "json",
    "jsonc",
    "yaml",
    "toml",
    "xml",
    "gql",
    "graphql",
    "css",
    "less",
    "scss",
    "pcss",
    "postcss"
  ]
}

โš™๏ธ Options

  • tailwind, vue, nuxt, vueI18n, react, next, reactI18n, autoImports rules can be enabled:
// eslint.config.mjs
import dethdkn from '@dethdkn/eslint-config'

export default dethdkn({ tailwind: true, vue: true, nuxt: true, vueI18n: true, react: true, next: true, reactI18n: true, autoImports: true })

๐Ÿ“ License

Copyright ยฉ 2024 Gabriel 'DethDKN' Rosa\ This project is under MIT license

1.8.0

11 months ago

2.2.1

7 months ago

2.0.3

9 months ago

2.2.0

8 months ago

2.0.2

9 months ago

2.4.0

5 months ago

2.0.1

9 months ago

2.0.0

9 months ago

3.0.1

5 months ago

3.0.0

5 months ago

1.9.2

9 months ago

1.9.1

10 months ago

1.9.0

11 months ago

2.3.0

7 months ago

2.3.2

6 months ago

2.3.1

7 months ago

2.1.0

8 months ago

1.7.0

1 year ago

1.6.0

1 year ago

1.5.18

1 year ago

1.5.17

1 year ago

1.5.16

1 year ago

1.5.14

1 year ago

1.5.15

1 year ago

1.5.13

1 year ago

1.5.12

1 year ago

1.5.11

1 year ago

1.5.10

1 year ago

1.5.9

1 year ago

1.5.8

1 year ago

1.5.7

1 year ago

1.5.6

1 year ago

1.5.5

1 year ago

1.5.4

1 year ago

1.5.3

1 year ago

1.5.2

1 year ago

1.5.1

1 year ago

1.5.0

1 year ago

1.4.10

1 year ago

1.4.9

1 year ago

1.4.8

1 year ago

1.4.7

1 year ago

1.4.6

1 year ago

1.4.5

1 year ago

1.4.4

1 year ago

1.4.3

1 year ago

1.4.2

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.0

1 year ago

1.2.0

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago