JSPM

@oriflame/config-eslint

4.1.16-alpha.52+18867afc
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 21
  • Score
    100M100P100Q120365F
  • License MIT

Reusable ESLint config.

Package Exports

  • @oriflame/config-eslint
  • @oriflame/config-eslint/lib/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@oriflame/config-eslint) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

ESLint Config

Factory functions for creating preset ESLint configurations. Primarily used in union with the Lumos CLI.

Extending config

Update package.json:

{
  "lumos": {
    "eslint": {
      "rules": {
        "react-hooks/exhaustive-deps": "off"
      }
    }
  }
}

Create file in configs folder:

configs/eslint.js

module.exports = {
  rules: {
    'react-hooks/exhaustive-deps': 'off',
  },
};

Settings

Main settings

export interface ESLintOptions {
  future?: boolean;
  node?: boolean;
  typescript?: boolean;
  nextjs?: boolean;
  prettier?: boolean;
}

Default values

{
  future = false,
  node = false,
  typescript = false,
  nextjs = false,
  prettier = false,
}

Settings

  • future
    • Enables rules for new es features
  • node
    • Enables rules for node js development
  • typescript
    • Enables typescript rules
  • nextjs
    • Enables Next.js rules
  • prettier
    • Enables integration with prettier

CLI Options

  • --fix
    • Try to fix autofixable problems.

Example:

lumos eslint --fix