@sleavely/eslint-config

1.0.1 • Public • Published

@sleavely/eslint-config

My personal crutches and preferences for Javascript and Typescript.

Usage

npm i --save-dev @sleavely/eslint-config

Regardless of you're using Javascript or Typescript you just have to extend @sleavely:

// .eslintrc.cjs
module.exports = {
  extends: ['@sleavely'],
}

However, Typescript projects need to ensure they use strict mode:

// tsconfig.json
{
  strict: true
}

Rules

I rely on standard and standard-with-typescript to do a lot of the heavy lifting, but I've made a few amendments.

JS

  • comma-dangle - always-multiline makes for easier changes, code reviews, and merges
  • import/no-cycle - prevents the most obvious cases of circular dependencies
  • all of @sleavely/js-rules

TS

In addition to the JS rules, these apply:

  • @typescript-eslint/no-explicit-any - Javascript goes in .js, not .ts
  • @typescript-eslint/strict-boolean-expressions is turned off.
  • all of @sleavely/ts-rules

Package Sidebar

Install

npm i @sleavely/eslint-config

Weekly Downloads

10

Version

1.0.1

License

MIT

Unpacked Size

4.09 kB

Total Files

4

Last publish

Collaborators

  • sleavely