2.0.0 • Published 8 months ago

@blumilksoftware/eslint-config v2.0.0

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

eslint-config-blumilk

ESlint default preset for Blumilk projects. This package assumes that the project uses modern Laravel, Vue, Typescript and TailwindCSS. It focuses on enforcing code consistency and adds some basic styling rules. Ideally, it should be used together with Prettier.

This package uses the new ESLint configuration format and requires ESLint 8 or above.

In general this package includes rules from:

On top of this we layer some overrides and typescript related preferences (mostly based on standard-with-typescript).

Usage

Install package in your project:

npm install -D @blumilksoftware/eslint-config

Create eslint.config.js file in your project's root directory:

import blumilkDefault from '@blumilksoftware/eslint-config'

export default [
    ...blumilkDefault,
]

You can also add scripts to your package.json:

{
  …
  "scripts": {
    "lint": "eslint .",
    "lintf": "eslint . --fix"
  }
  …
}

Configuration

If you need to extend eslint settings, you can add the rules in your eslint.config.js file.

import blumilkDefault from '@blumilksoftware/eslint-config'

export default [
  ...blumilkDefault,
  {
    rules: {
      'vue/multi-word-component-names': 'error',
    }
  }
]

To run the linter, use:

npm run lint

To autmatically fix errors, use:

npm run lintf