This repository is a detailed package of ESLint rules for me.
Name | Include rule | Package |
---|---|---|
@huuyafwww/eslint-config-browser |
Browser | |
@huuyafwww/eslint-config-common |
JavaScript, TypeScript, import in ESM | |
@huuyafwww/eslint-config-next |
Next.js | |
@huuyafwww/eslint-config-node |
Node.js | |
@huuyafwww/eslint-config-react |
React | |
@huuyafwww/eslint-config-storybook |
Storybook |
All packages support Flat Config 🚀
However, legacy Config is not supported 😀
Node.js
pnpm add -D @huuyafwww/eslint-config-common @huuyafwww/eslint-config-node @praha/eslint-config-definer
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
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
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',
});