npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@lumirelle/stylelint-config

v4.1.5

Published

Lumirelle's StyleLint config

Downloads

617

Readme

@lumirelle/stylelint-config

npm version npm downloads bundle JSDocs Codecov License

Lumirelle's StyleLint config. Easy to use, customizable, and works with CSS, SCSS, Vue, and Tailwind CSS.

Install

npm install -D @lumirelle/stylelint-config

or

pnpm add -D @lumirelle/stylelint-config

Usage

Use the exported helper function called lumirelle to construct your StyleLint configuration:

stylelint.config.js

import { lumirelle } from '@lumirelle/stylelint-config'

export default lumirelle(
  /**
   * Options for generating StyleLint configuration.
   */
  {
    /**
     * Files to ignore, same as `.stylelintignore`.
     *
     * Notice that, StyleLint use `micromatch` to match the files, the behavior is different from another widely used glob
     * package `tinyglobby`.
     *
     * @default GLOB_EXCLUDE
     * @see [micromatch](https://github.com/micromatch/micromatch)
     * @see [tinyglobby](https://github.com/SuperchupuDev/tinyglobby)
     * @see [GLOB_EXCLUDE](https://github.com/lumirelle/stylelint-config/blob/main/src/globs.ts#L6)
     */
    ignoreFiles: [
      'your-ignore-files'
    ],

    /**
     * Stylistic configuration. Powered by `stylelint-stylistic`.
     *
     * If set to `true`, it will use the default stylistic config as below.
     *
     * If you want to use `prettier` as the formatter, you can set it to `false` to disable the stylistic config.
     *
     * @default
     * {
     *   indent: 2,
     *   quotes: 'single',
     *   maxLineLength: 120,
     * }
     */
    stylistic: {
      indent: 2,
      quotes: 'single',
      maxLineLength: 120,
    },

    /**
     * Core rules. Can't be disabled.
     */
    css: true,

    /**
     * Enable SCSS support.
     *
     * As StyleLint doesn't support both SCSS and LESS in the same file (e.g. in a single `.vue` file), if you enable both
     * SCSS and LESS, only SCSS will take effect.
     *
     * @default auto-detect based on the dependencies if both SCSS and LESS are not enabled manually
     */
    scss: true,

    /**
     * Enable Less support.
     *
     * Requires peer dependencies:
     *
     * - `postcss-less`
     * - `stylelint-less`
     *
     * As StyleLint doesn't support both SCSS and LESS in the same file (e.g. in a single `.vue` file), if you enable both
     * SCSS and LESS, only SCSS will take effect.
     *
     * @default false
     */
    less: false,

    /**
     * Enable Tailwind CSS support.
     *
     * If enabled, StyleLint will not validate Tailwind CSS specific at-rules.
     *
     * @default false
     */
    tailwindcss: false,

    /**
     * Enable HTML support.
     *
     * @default true
     */
    html: true,

    /**
     * Enable Vue support.
     *
     * @default auto-detect based on the dependencies
     */
    vue: true,

    /**
     * Whether to order the stylesheet properties. Powered by `stylelint-config-recess-order`.
     *
     * @see https://github.com/stormwarning/stylelint-config-recess-order
     * @default true
     */
    ordered: true,

    /**
     * Disable some opinionated rules to standard preference.
     *
     * You can also specify which category of rules to disable by providing an object with the category names as keys.
     *
     * Rules affected:
     *
     * - Symbol "pattern" rules:
     *   - `selector-class-pattern`
     *   - `selector-id-pattern`
     * - Code "maintainability" rules:
     *   - `no-descending-specificity`
     *
     * @default false
     */
    lessOpinionated: {
      /**
       * Whether to disable pattern rules.
       */
      pattern: true,
      /**
       * Whether to disable maintainability rules.
       */
      maintainability: true,
    }
  },
  /**
   * Additional user-defined StyleLint configuration objects to mix.
   *
   * Both general and file-specific configuration objects are supported.
   *
   * @see [general config](https://stylelint.io/user-guide/configure)
   * @see [file-specific config](https://stylelint.io/user-guide/configure#overrides)
   */
  {
    // This is a general configuration object, which will be mixed into the final config directly.
    rules: {
      'selector-class-pattern': null,
    },
  },
  {
    // This is a file-specific configuration object, which will be mixed into the `overrides` section of the final config.
    files: ['**/*.scss'],
    rules: {
      'scss/at-if-closing-brace-space-after': null,
    },
  }
  // This just equivalent to passing the config objects to the `lumirelle` function like above.
).mix({
  rules: {
    'selector-class-pattern': null,
  },
})

Sponsors

License

MIT License © Lumirelle