@hamster-bot/eslint-config
v2.4.0
Published
Common ESLint configuration used in Hamster
Readme
@hamster-bot/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-configUsage
This package provides flat config introduced in ESLint v9.
Create an eslint configuration file like eslint.config.mjs and append the following:
import { configs, defineConfig } from '@hamster-bot/eslint-config'
export default defineConfig(
configs.base,
// Add more configurations here
)For example, for ESLint Mocha plugin:
import { configs, defineConfig } from '@hamster-bot/eslint-config'
import mochaPlugin from 'eslint-plugin-mocha'
export default defineConfig(
configs.base,
mochaPlugin.configs.flat.recommended,
)You can also use
require()andmodule.exportif you are using CommonJS. In that case, you should use.cjsextension or just.jsfor the configuration file.
TypeScript user should use configs.typescript:
import { configs, defineConfig } from '@hamster-bot/eslint-config'
export default defineConfig(
configs.typescript,
// Add more configurations here
)We also provide a configuration for Node scripts:
import { configs, defineConfig } from '@hamster-bot/eslint-config'
export default defineConfig(
configs.node,
// Add more configurations here
)License

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