0.4.2 • Published 4 months ago

@jsse/eslint-config v0.4.2

Weekly downloads
-
License
MIT
Repository
-
Last release
4 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.27

11 months ago

0.2.26

11 months ago

0.3.0

8 months ago

0.3.6

6 months ago

0.3.5

6 months ago

0.3.7

5 months ago

0.3.2

7 months ago

0.3.1

7 months ago

0.3.4

6 months ago

0.3.3

6 months ago

0.2.30

10 months ago

0.2.33

8 months ago

0.2.32

8 months ago

0.2.31

9 months ago

0.2.29

11 months ago

0.2.28

11 months ago

0.4.1

4 months ago

0.4.0

5 months ago

0.4.2

4 months ago

0.2.25

12 months ago

0.2.24

12 months ago

0.2.23

12 months ago

0.2.22

1 year ago

0.2.21

1 year ago

0.2.20

1 year ago

0.2.19

1 year ago

0.2.18

1 year ago

0.2.17

1 year ago

0.2.16

1 year ago

0.2.15

1 year ago

0.2.14

1 year ago

0.2.12

1 year ago

0.2.11

1 year ago

0.2.10

1 year ago

0.2.9

1 year ago

0.2.8

1 year ago

0.1.20

1 year ago

0.1.21

1 year ago

0.1.22

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.2.7

1 year ago

0.1.16

1 year ago

0.2.6

1 year ago

0.1.17

1 year ago

0.1.18

1 year ago

0.1.19

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.5

1 year ago

0.2.4

1 year 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

2 years ago

0.1.10

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.0

2 years 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