@edgeandnode/eslint-config
v2.0.3
Published
ESLint configuration used in Edge & Node products
Downloads
1,200
Maintainers
Keywords
Readme
@edgeandnode/eslint-config
Installation
Install the package
pnpm add --save-dev @edgeandnode/eslint-config
Use the preset in your .eslintrc.js file.
// .eslintrc.js
module.exports = {
parser: "@typescript-eslint/parser",
extends: ["@edgeandnode", "@edgeandnode/eslint-config/next"],
plugins: ["testing-library"],
rules: {
"testing-library/no-unnecessary-act": ["error", { isStrict: true }],
},
overrides: [
{
files: ["*.ts", "*.tsx"],
parserOptions: {
project: require.resolve("./tsconfig.json"),
},
},
],
};
Presets
@edgeandnode/eslint-config — base profile built with eslint-plugin-jsx-a11y, eslint-plugin-react, eslint-plugin-react-hooks, eslint-plugin-simple-import-sort, eslint-plugin-sonarjs, and eslint-plugin-simple-import-sort
@edgeandnode/eslint-config/next — profile for Next.js built with @next/eslint-config-next
Development
- Mark changes from "default" rules present in common presets with
@changed
. - Describe the background for a rule or it's disabling with a comment marked
with
@motivation
. - Use rules that affect semantics — detect bugs and "no morning coffee" mistakes.
- Avoid obtrusive code-style rules.