1.4.1 • Published 7 months ago

@lytovka/eslint-config v1.4.1

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

@lytovka/eslint-config

npm

Installation

This module is distributed via npm and should be installed as one of your project's devDependencies. You should also have required eslint peerDependency installed.

npm i -D eslint @lytovka/eslint-config

Usage

Then, add the extends to your .eslintrc.js:

module.exports = {
  extends: ["@lytovka"],
  rules: {
    // override rules if needed
  },
}

In addition, you can add scripts to your package.json to identify errors and warnings. For example:

{
  "scripts": {
    "lint": "eslint --max-warnings 0 --cache --cache-location ./node_modules/.cache/.eslintcache --ext js,jsx,ts,tsx .",
    "lint:fix": "eslint --fix ."
  }
}

Other configs

Currently this module exposes a few additional configs:

  • @lytovka/eslint-config/react: preset for React projects.
  • @lytovka/eslint-config/jsx-a11y: preset for accessibility issues in React apps.
  • @lytovka/eslint-config/import: preset for import rules (both JavaScript and TypeScript projects).

Feel free to add those configs to the extend property:

module.exports = {
  extends: [
    "@lytovka",
    "@lytovka/eslint-config/react",
    "@lytovka/eslint-config/jsx-a11y",
    "@lytovka/eslint-config/import"
  ],
  rules: {
    // override rules
  },
}

TypeScript rules

By default, this module will search for tsconfig.json in the project root to determine if TypeScript ESLint rules should be enabled. Alternatively, you can overwrite the ESLINT_TSCONFIG_PATH environment variable to scan for a different file. For example:

// .eslintrc.js
process.env.ESLINT_TSCONFIG_PATH = "tsconfig.eslint.json"

module.exports = {
  extends: ["@lytovka"]
}
1.4.1

7 months ago

1.4.0

7 months ago

1.3.0

1 year ago

1.2.9

1 year ago

1.2.10

1 year ago

1.2.8

1 year ago

1.2.7

1 year ago

1.2.6

1 year ago

1.2.5

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago

0.0.15-alpha

1 year ago

0.0.14-alpha

1 year ago

0.0.13-alpha

1 year ago

0.0.12-alpha

1 year ago

0.0.11-alpha

1 year ago

0.0.10-alpha

1 year ago

0.0.9-alpha

1 year ago

0.0.8-alpha

1 year ago

0.0.7-alpha

1 year ago

0.0.1

1 year ago