1.1.1 • Published 11 months ago

@keupoz/eslint-config v1.1.1

Weekly downloads
-
License
-
Repository
-
Last release
11 months ago

@keupoz/eslint-config

NPM Version

Personal ESLint config based on antfu's config.

  • Semi colons are enabled
  • Stricter bracket style disallowing braceless expressions hanging down
  • Import sorting is handled by Perfectionist with a consistent order
  • Union types sorting enabled (handled by Perfectionist)

Usage

// eslint.config.mjs
import keupoz from '@keupoz/eslint-config';

export default keupoz({
  // All original options are supported.
  // `stylistic` and `rules` options are extended instead of being completely overriden.
});
// .vscode/settings.json
{
  // Disable the default formatter, use eslint instead
  "prettier.enable": false,
  "editor.formatOnSave": false,
  "editor.defaultFormatter": null,

  // 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", "fixable": true },
    { "rule": "format/*", "severity": "off", "fixable": true },
    { "rule": "*-indent", "severity": "off", "fixable": true },
    { "rule": "*-spacing", "severity": "off", "fixable": true },
    { "rule": "*-spaces", "severity": "off", "fixable": true },
    { "rule": "*-order", "severity": "off", "fixable": true },
    { "rule": "*-dangle", "severity": "off", "fixable": true },
    { "rule": "*-newline", "severity": "off", "fixable": true },
    { "rule": "*quotes", "severity": "off", "fixable": true },
    { "rule": "*semi", "severity": "off", "fixable": true }
  ],

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

11 months ago

1.1.0

11 months ago

1.0.1

1 year ago

1.0.0

1 year ago