Skip to content

blumilksoftware/eslint-config-blumilk

Repository files navigation

Version NPM version Downloads

eslint-config-blumilk

ESlint default preset for Blumilk projects. This package assumes that the project uses modern Laravel, Vue, TailwindCSS and TypeScript if you want. 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 9 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,
]

Or with TypeScript:

import blumilkDefault from '@blumilksoftware/eslint-config/typescript-config.js'

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

Releases

No releases published

Packages

No packages published