1.0.1 • Published 4 months ago

@slhs/eslint-config v1.0.1

Weekly downloads
-
License
-
Repository
github
Last release
4 months ago

@slhs/eslint-config

This is the SLHS ESLint configuration.

npm Version Build Status

Requirements

This config uses the new "Flat Config" format and comes with some requirements:

  • Node.js 20.0.0 or newer
  • ESLint 8.23.0 or newer
  • Your project to be in native ESM ("type": "module" in your package.json)
  • VSCode must be configured to use the experimental Flat Config file (eslint.config.js). You'll probably want to enable this as a workspace setting (not a user setting) and check it in to source control:

VSCode Settings Screenshot

Install

npm install --save-dev eslint @slhs/eslint-config

Usage

Follow the ESLint documentation on configuration files.

Examples

eslint.config.js

import slhsConfig from '@slhs/eslint-config';

/** @type {import('eslint').Linter.FlatConfig[]} */
export default [
  ...slhsConfig,
  // overrides here
];

package.json

{
  "scripts": {
    ...
    "lint": "eslint --cache --cache-location ./node_modules/.cache/eslint .",
    ...
  }
}