2.0.0 • Published 1 month ago

@splendidlabz/eslint-config v2.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 month ago

Splendid Labs ESLint Config

This package provides an ESLint configuration we use in Splendid Labs.

It provides a configuration for the following files:

  • .js
  • .astro
  • .svelte

Installation

Install the package:

npm install @splendidlabz/eslint-config

Create a .eslintrc.cjs file in the root of your project and add the following:

module.exports = {
  extends: ['@splendidlabz/eslint-config'],
}

Create a eslint.config.cjs file in the root of your project and add the following:

import config from '@splendidlabz/eslint-config'
export default config

Configuration Details

For All Files

We extend Standard and Prettier rules for all supported files. We do this because we agree with Standard's philosophy and we use Prettier to format our code.

Standard and Prettier have a couple of conflicting rules. So we neutralized these conflicts with a few rules of our own. See commonRules in .eslintrc.cjs for these rules.

For Astro Files

We include the Astro recommended plugin along with Standard and Prettier rules.

For Svelte files

We include the Svelte recommended plugin along with Standard and Prettier rules.