15.2.2 • Published 8 months ago

@hazmi35/eslint-config v15.2.2

Weekly downloads
1,456
License
MIT
Repository
github
Last release
8 months ago

eslint-config

An opinionated, but sane ESLint shareable config that I used in my projects ✔

Install

npm install -D @hazmi35/eslint-config # npm
pnpm add -D @hazmi35/eslint-config # pnpm
yarn add -D @hazmi35/eslint-config # yarn

This package has the required dependency installed automatically by peer dependencies by default on npm v7+, pnpm, or yarn. Install them manually if not.

Usage

This package requires ESLint Flat Configuration.

Available configurations:

Configuration

Create an eslint.config.js file in the root of your project and add the following code:

import { common, modules, node, stylistic, ignores } from "@hazmi35/eslint-config";

export default [...common, ...modules, ...node, ...stylistic, ...ignores];
module.exports = (async () => {
    const { common, node, stylistic, ignores } = await import("@hazmi35/eslint-config");

    return [...common, ...node, ...stylistic, ...ignores];
})();
import { common, modules, node, stylistic, typescript, ignores } from "@hazmi35/eslint-config";

export default [...common, ...modules, ...node, ...stylistic, ...typescript, ...ignores];
import { common, modules, node, prettier, ignores } from "@hazmi35/eslint-config";

// Prettier must not be used with stylistic config, because it will conflict with each other.
export default [...common, ...modules, ...node, ...prettier, ...ignores];

Extending rules using the extend function is recommended.

import { common, extend, modules, node, stylistic, typescript, ignores } from "./index.js";

export default [...common, ...modules, ...node, ...stylistic, ...ignores, ...extend(typescript, [
    {
        rule: "typescript/no-unnecessary-condition",
        option: [
            "warn",
            {
                allowConstantLoopConditions: false
            }
        ]
        // or
        option: ["off"]
    }
])];
15.2.0

8 months ago

15.2.1

8 months ago

15.2.2

8 months ago

15.1.0

9 months ago

15.0.2

9 months ago

15.0.0

9 months ago

15.0.1

9 months ago

14.0.0

12 months ago

14.0.1

12 months ago

13.3.1

1 year ago

13.3.0

1 year ago

13.2.4

1 year ago

13.2.2

1 year ago

13.2.3

1 year ago

13.1.0

1 year ago

13.0.6

1 year ago

13.0.4

1 year ago

13.0.5

1 year ago

13.2.0

1 year ago

13.2.1

1 year ago

13.0.3

1 year ago

13.0.2

1 year ago

13.0.0

1 year ago

13.0.1

1 year ago

12.0.0

1 year ago

11.0.0

2 years ago

10.0.0

2 years ago

9.0.0

2 years ago

8.7.1

3 years ago

8.7.0

3 years ago

8.6.0

3 years ago

8.5.0

3 years ago

8.5.1

3 years ago

8.4.2

3 years ago

8.4.1

3 years ago

8.4.0

3 years ago

8.3.0

3 years ago

8.2.1

3 years ago

8.2.0

3 years ago

8.1.0

3 years ago

8.0.0

3 years ago

8.1.1

3 years ago

7.0.0

4 years ago

7.0.1

4 years ago

6.0.1

4 years ago

6.0.0

4 years ago

6.0.2

4 years ago

5.0.0

4 years ago

4.1.0

4 years ago

4.1.1

4 years ago

4.0.0

4 years ago

3.6.0

4 years ago

3.5.0

4 years ago

3.4.0

5 years ago

3.3.0

5 years ago

3.2.1

5 years ago

3.2.0

5 years ago

3.0.0

5 years ago

2.1.2

5 years ago

2.1.3

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.6.1

5 years ago

1.6.0

5 years ago

1.5.3

5 years ago

1.5.2

5 years ago

1.5.1

5 years ago

1.5.0

5 years ago

1.2.0

5 years ago

1.1.2

5 years ago

1.0.0

5 years ago

0.9.6

5 years ago

0.9.5

5 years ago

0.9.2

5 years ago

0.9.1

5 years ago