1.6.6 • Published 8 months ago

@jsenv/eslint-config-relax v1.6.6

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

eslint-config-relax

npm package

A pragmatic ESLint configuration that focuses on meaningful errors while giving you freedom to write code your way.

Why Choose eslint-config-relax?

If you're tired of:

  • Fighting with ESLint configuration
  • Being forced to code in a specific style
  • Module resolution errors in ESLint
  • Noisy linting that focuses on trivial issues

eslint-config-relax lets you focus on writing code while still catching potential bugs and serious issues.

Quick setup

npm i --save-dev @jsenv/eslint-config-relax

Create an eslint.config.js file at your project root:

import { eslintConfigRelax } from "@jsenv/eslint-config-relax";

export default eslintConfigRelax({
  rootDirectoryUrl: import.meta.resolve("./"),
  browserDirectoryUrl: import.meta.resolve("./src/"), // optional
});

Key Features

Focus on Real Issues

We disable rules that are:

  • Purely stylistic
  • Too opinionated
  • More annoying than helpful

So you only see warnings that actually matter for code quality.

Working Import Resolution

Full implementation of Node.js ESM resolution algorithm means:

  • No more "Unable to resolve path to module" errors for valid imports
  • Correct browser vs Node.js environment detection
  • Proper handling of package exports

Modern & Simple

  • Uses ESLint's flat config system
  • No complex plugin chains or configuration inheritance
  • Works across various project types with minimal setup

Environment Aware

Automatically adjusts rules based on your code's environment:

  • Browser-specific checks for browser code
  • Node.js-specific checks for server code

Technical Notes

  • Requires ESLint 8.0 or higher (uses flat config)
  • TypeScript support planned for future releases
  • Works with any project structure

Example project structure

your-project/
├── eslint.config.js
├── package.json
├── src/                // Browser code
│   └── browser-specific-code.js
└── server/             // Node.js code
    └── node-specific-code.js

Migrate from traditional ESLint and enjoy writing code that's checked for what matters, not how it looks.

1.6.4

10 months ago

1.4.6

10 months ago

1.6.3

10 months ago

1.4.5

11 months ago

1.3.6

1 year ago

1.6.2

10 months ago

1.4.4

11 months ago

1.6.1

10 months ago

1.3.4

1 year ago

1.6.0

10 months ago

1.4.2

11 months ago

1.5.0

10 months ago

1.4.1

11 months ago

1.4.0

11 months ago

1.3.1

1 year ago

1.3.0

1 year ago

1.3.13

1 year ago

1.3.11

1 year ago

1.3.12

1 year ago

1.6.6

8 months ago

1.4.11

10 months ago

1.3.9

1 year ago

1.4.10

10 months ago

1.2.12

1 year ago

1.2.13

1 year ago

1.2.11

1 year ago

1.2.7

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago