Skip to content

nkzw-tech/eslint-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@nkzw/eslint-config

Opinionated ESLint config with sensible defaults.

Installation & Usage

With ESLint v9+:

npm install @nkzw/eslint-config

In your eslint.config.js:

import nkzw from '@nkzw/eslint-config';

export default nkzw;

Or, if you have custom ESLint rules or configuration:

import nkzw from '@nkzw/eslint-config';

export default [
  ...nkzw,
  {
    // Custom configuration.
  },
];

Then run pnpm eslint . or npm eslint ..

Note: You can use @nkzw/eslint-config 1.x with ESLint versions 8 and below.

Philosophy & Principles

Use this configuration if these principles resonate with you:

  • Error, Never Warn: Warnings are noise and get ignored. Either it's an issue, or it isn't. This config forces developers to fix problems or explicitly disable the rule with a comment.
  • Strict, Consistent Code Style: When multiple approaches exist, this configuration enforces the strictest, most consistent code style, preferring modern language features and best practices.
  • Prevent Bugs: Problematic patterns such as instanceof are not allowed, forcing developers to choose more robust patterns. Debug-only code such as console.log or test.only are disallowed to avoid accidental CI failures or unintended logging in production.
  • Fast: Slow rules are avoided. For example, TypeScript's noUnusedLocals check is preferred over no-unused-vars.
  • Don't get in the way: Subjective or overly opinionated rules (e.g. style preferences) are disabled. Autofixable rules are preferred to reduce friction and save time.

Included Plugins & Rules

This configuration consists of the most useful and least annoying rules from the following eslint plugins:

Suggestions

This configuration is meant to be used with:

Read about more frontend tooling suggestions in this blog post.

About

Opinionated ESLint config with sensible defaults.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 2

  •  
  •