JSPM

@siriusbeck/eslint-config

1.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3
  • Score
    100M100P100Q41163F
  • License MIT

ESLint config used by Sirius Beck, including: typescript, react, jest, prettier, etc.

Package Exports

  • @siriusbeck/eslint-config
  • @siriusbeck/eslint-config/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 (@siriusbeck/eslint-config) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Sirius Beck - ESLint Config

Installation

Install the package and its peer dependencies with npm or your favorite package manager as dev dependencies:

npm install -D eslint@^8 prettier @siriusbeck/eslint-config

How to use

Eslint

Inside the .eslintrc file, extend @siriusbeck/eslint-config:

Basic

{
  "extends": "@siriusbeck/eslint-config"
}

React

{
  "extends": "@siriusbeck/eslint-config/react"
}

Next

{
  "extends": "@siriusbeck/eslint-config/next"
}

Prettier

Default settings

Add @siriusbeck/eslint-config/prettier to your package.json file:

{
  "prettier": "@siriusbeck/eslint-config/prettier"
}

Or create a prettier configuration file in the project root:

// .prettierrc.js

module.exports = require('@siriusbeck/eslint-config/prettier')

Editing the default settings

Create a prettier configuration file in the root of the project and add the code below:

// .prettierrc.js

const defaultConfig = require('@siriusbeck/eslint-config/prettier')

/** @type {import('prettier').Config} */
module.exports = {
  ...defaultConfig
  // Add your custom config here
}

Custom settings

Just create a prettier configuration file at the root of the project.

What's included?

  • Standard config
  • TypeScript (optional)
  • Prettier
  • React plugin + config
  • React Hooks - plugin
  • JSX a11y - plugin
  • Import plugin
  • Import Helpers plugin
  • NextJs