0.0.52 • Published 2 months ago

@cpuabuse/eslint-config v0.0.52

Weekly downloads
44
License
ISC
Repository
github
Last release
2 months ago

eslint-config

About

Strict ESLint config for cpuabuse.

Feel free to reuse any bits.

Usage

Installation

npm install --save-dev @cpuabuse/eslint-config

Peer dependencies must also be installed.

Configuration

Create a file in the root of the project named .eslintrc.yml to extend default config, containing the following:

extends: "@cpuabuse"

Additional configs

In case of using additional configs, ESLint does not support omitting eslint-config for scoped modules. Following configs, are mutually exclusive, and default config conditionally extends them, based on path/extension. Each config has a respective package entry point.

typescript

Used by default config for TypeScript files, .eslintrc.yml should contain the following:

extends: "@cpuabuse/eslint-config/typescript"

If setting parserOptions' project, it should be set relative to this package's dist/release/eslint/typescript.js, unless tsconfigRootDir is also provided. If installed in node_modules it defaults to tsconfig.json in folder, containing node_modules.

vue

Rules for Vue, .eslintrc.yml should contain the following:

extends: "@cpuabuse/eslint-config/vue"
vue-tsx

Rules for Vue TSX, .eslintrc.yml should contain the following:

extends: "@cpuabuse/eslint-config/vue-tsx"

TSDoc

This package provides tsdoc.json to extend via tsdoc entry point.

Notes:

  • In package.json this package is using typesVersions for types instead of exports, since for it to work, moduleResolution must be Node16 in consuming package.
  • Module resolution of TSDoc's extends within tsdoc.json does not seem to pick up exports of package.json, so configuration should be extended with "absolute" file path relative to the module: "extends": ["@cpuabuse/eslint-config/dist/release/tsdoc/tsdoc.json"].

Development

Top level configs go into src folder, while anything else must reside inside src/lib (.gitignore ignores /lib folder for release).

Build types

release

npm run build

Config files are put into the package root, so that ESLint can consume additional configs, as it resolves their path relative to root, not the entrypoint.

test

npm run test

Validates exported config structure with Mocha.

0.0.52

2 months ago

0.0.51

5 months ago

0.0.50

10 months ago

0.0.48

12 months ago

0.0.49

11 months ago

0.0.44

2 years ago

0.0.45

2 years ago

0.0.46

2 years ago

0.0.47

2 years ago

0.0.40

2 years ago

0.0.41

2 years ago

0.0.42

2 years ago

0.0.43

2 years ago

0.0.39

2 years ago

0.0.38

2 years ago

0.0.37

3 years ago

0.0.36

3 years ago

0.0.35

3 years ago

0.0.31

3 years ago

0.0.32

3 years ago

0.0.33

3 years ago

0.0.34

3 years ago

0.0.30

3 years ago

0.0.28

3 years ago

0.0.29

3 years ago

0.0.27

3 years ago

0.0.26

3 years ago

0.0.24

3 years ago

0.0.25

3 years ago

0.0.23

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago