@hamster-bot/eslint-config

2.3.0 • Public • Published

eslint-config

Common ESLint configuration used in Hamster

Install

npm i --save-dev eslint @hamster-bot/eslint-config
# Or use yarn
yarn add --dev eslint @hamster-bot/eslint-config

Usage

This package provides flat config introduced in ESLint v9.

Create an eslint configuration file like eslint.config.mjs and append the following:

import * as hamster from '@hamster-bot/eslint-config'

export default [
  ...hamster.configs.base,
  // Add more configurations here
]

You can also use require() and module.export if you are using CommonJS. In that case, you should use .cjs extension or just .js for the configuration file.


TypeScript user should use hamster.configs.typescript:

import * as hamster from '@hamster-bot/eslint-config'

export default [
  ...hamster.configs.typescript,
  // Add more configurations here
]

We also provide a configuration for Node scripts:

import * as hamster from '@hamster-bot/eslint-config'

export default [
  ...hamster.configs.node,
  // Add more configurations here
]

[!NOTE] If you are using Yarn PnP, since the import-x plugin that we are using if not actually support PnP, it is supported by the eslint's FlatCompat plugin right now. So it require you to manually declare this plugin as the dependencies in your package.json.

License

Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

Readme

Keywords

none

Package Sidebar

Install

npm i @hamster-bot/eslint-config

Weekly Downloads

16

Version

2.3.0

License

CC-BY-NC-4.0

Unpacked Size

35.8 kB

Total Files

10

Last publish

Collaborators

  • maiko_tan