@subframe7536/eslint-config
TypeScript icon, indicating that this package has built-in type declarations

0.6.4 • Public • Published

@subframe7536/eslint-config

self use eslint config, extends antfu's config

difference

  • add solid-js support
  • prefer curly
  • prefer global Buffer, process
  • ignores can start with ./
  • loose some rules

setup

in eslint.config.js

import { defineEslintConfig } from '@subframe7536/eslint-config'

export default defineEslintConfig({ solid: true })

types:

import type { OptionsConfig, TypedFlatConfigItem } from '@antfu/eslint-config'

type Options = Omit<OptionsConfig, 'overrides'> & {
  /**
   * Enable Solid-js rules
   */
  solid?: boolean
  /**
   * Ignore files
   */
  ignores?: string | string[]
  /**
   * Override all rules
   */
  overrideRules?: TypedFlatConfigItem['rules']
}

in .vscode/settings.json

{
  // Enable the ESlint flat config support
  "eslint.experimental.useFlatConfig": true,

  // Disable the default formatter, use eslint instead
  "prettier.enable": false,
  "editor.formatOnSave": false,

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

  // Enable eslint for all supported languages
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "typescript",
    "typescriptreact",
    "vue",
    "html",
    "markdown",
    "json",
    "jsonc",
    "yaml"
  ]
}

Readme

Keywords

Package Sidebar

Install

npm i @subframe7536/eslint-config

Weekly Downloads

29

Version

0.6.4

License

MIT

Unpacked Size

10.3 kB

Total Files

6

Last publish

Collaborators

  • subframe7536