0.2.25 • Published 8 months ago

@jsse/eslint-config v0.2.25

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

@jsse/eslint-config

Version Badge

Eslint config

  • eslint flat config
  • double quotes + semi
  • react, react-hooks & react-refresh, OH MY!
  • no vue (I don't use vue (as of 2023-10-12) don't want/need the vue plugins/parsers/etc)
  • assumes you're using prettier
  • Based on:
    • My old, very long, and very messy (non-flat) eslint config (.eslintrc.js)
    • antfu eslint-config eslint-config
    • sxzz eslint-config eslint-config

Usage

Install

pnpm i -D eslint @jsse/eslint-config

Create config file

With "type": "module" in package.json (recommended):

// eslint.config.js
import jsse from "@jsse/eslint-config";

export default jsse({
  // options
  // typescript: {
  //     tsconfigPath: "tsconfig.json", // or ["tsconfig.json", "tsconfig.eslint.json", ...]
  // },
  // react: true
});

With CJS:

// eslint.config.js
module.exports = require("@jsse/eslint-config").jsse({
  // options
  // typescript: {
  //     tsconfigPath: "tsconfig.json", // or ["tsconfig.json", "tsconfig.eslint.json", ...]
  // },
  // react: true
});

Note that .eslintignore no longer works in Flat config, see customization for more details.

Add script for package.json

For example:

{
  "scripts": {
    "lint": "eslint .",
    "lint:fix": "eslint . --fix"
  }
}

Type Aware Rules

You can optionally enable the type aware rules by passing the options object to the typescript config:

// eslint.config.js
import jsse from "@jsse/eslint-config";

export default jsse({
  typescript: {
    tsconfigPath: "tsconfig.json", // or ["tsconfig.json", "tsconfig.eslint.json", ...]
  },
});

Thanks

  • antfu and sxzz for their eslint-configs which this is based on
  • Younger me for being more willing to spend time configuring eslint
  • My fans for being my fans

FAQ

Why use prettier?

I DO NOT CARE ANYMORE... My current stance on formatters is pick one that is stable, and use it, preferably with the default config.

A younger me (jessekrubin) would take the time to configure a formatter/linter/code style to my liking, but I really don't care anymore...

License

MIT License © 2023-PRESENT jesse rubin

0.2.25

8 months ago

0.2.24

8 months ago

0.2.23

8 months ago

0.2.22

8 months ago

0.2.21

9 months ago

0.2.20

9 months ago

0.2.19

9 months ago

0.2.18

9 months ago

0.2.17

9 months ago

0.2.16

9 months ago

0.2.15

9 months ago

0.2.14

9 months ago

0.2.12

9 months ago

0.2.11

9 months ago

0.2.10

9 months ago

0.2.9

10 months ago

0.2.8

10 months ago

0.1.20

11 months ago

0.1.21

11 months ago

0.1.22

11 months ago

0.2.1

11 months ago

0.2.0

11 months ago

0.2.7

10 months ago

0.1.16

1 year ago

0.2.6

10 months ago

0.1.17

1 year ago

0.1.18

12 months ago

0.1.19

12 months ago

0.2.3

11 months ago

0.2.2

11 months ago

0.2.5

10 months ago

0.2.4

11 months ago

0.1.15

1 year ago

0.1.14

1 year ago

0.1.13

1 year ago

0.1.12

1 year ago

0.1.11

1 year ago

0.1.10

1 year ago

0.1.9

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.0

1 year ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago