Skip to content

This repository is a detailed package of ESLint rules for me.

License

Notifications You must be signed in to change notification settings

huuyafwww/eslint-config

Repository files navigation

@huuyafwww/eslint-config

MIT License

This repository is a detailed package of ESLint rules for me.

packages

Name Include rule Package
@huuyafwww/eslint-config-browser Browser npm version
@huuyafwww/eslint-config-common JavaScript, TypeScript, import in ESM npm version
@huuyafwww/eslint-config-next Next.js npm version
@huuyafwww/eslint-config-node Node.js npm version
@huuyafwww/eslint-config-react React npm version
@huuyafwww/eslint-config-storybook Storybook npm version

Features

All packages support Flat Config 🚀

However, legacy Config is not supported 😀

Usage

Node.js

Installation

pnpm add -D @huuyafwww/eslint-config-common @huuyafwww/eslint-config-node @praha/eslint-config-definer

eslint.config.js

import { common } from '@huuyafwww/eslint-config-common';
import { node } from '@huuyafwww/eslint-config-node';
import { define } from '@praha/eslint-config-definer';

const config = define([
  common,
  node,
]);

export default config({
  tsconfigPath: './tsconfig.json',
});
Next.js

Installation

pnpm add -D @huuyafwww/eslint-config-common @huuyafwww/eslint-config-browser @huuyafwww/eslint-config-react @huuyafwww/eslint-config-next @praha/eslint-config-definer

# Optional
pnpm add -D @huuyafwww/eslint-config-storybook

eslint.config.js

import { browser } from '@huuyafwww/eslint-config-browser';
import { common } from '@huuyafwww/eslint-config-common';
import { next } from '@huuyafwww/eslint-config-next';
import { react } from '@huuyafwww/eslint-config-react';
import { storybook } from '@huuyafwww/eslint-config-storybook';
import { define } from '@praha/eslint-config-definer';

const config = define([
  common,
  browser,
  react,
  next,
  storybook, // Optional
]);

export default config({
  tsconfigPath: './tsconfig.json',
});

License

MIT