2.0.1 • Published 12 months ago

@losant/eslint-config-losant v2.0.1

Weekly downloads
337
License
MIT
Repository
github
Last release
12 months ago

@Losant / Eslint Config Losant

ESLint config for all Losant projects.

Installation

npm install --save-dev @losant/eslint-config-losant
yarn add --dev @losant/eslint-config-losant

Requirements

  • Node.js >=20.0.0

Configuration

Node

import config from ' @losant/eslint-config-losant/env/node.js';

export default [
  ...config,
  {
    // custom overrides here
  }
];

Usage

You should add an npm script to the package.json of the project that specifies the eslint command. lint is the barebones setup you'll need to then be able to do yarn run lint. It's recommended that you add the other commands as well.

{
  "scripts": {
    "lint": "eslint \"**/*.js\" src test",
    "lint:fix": "eslint --fix \"**/*.js\" src test",
    "lint:staged": "lint-staged"
  },
  "lint-staged": {
    "**/*.js": "eslint"
  }
}

Documentation

The resulting combination of extended rules, overrides, and plugins are documented together with their specified options:

Pre-Push Hook with Husky

Pre-Push hooks can be easily configured with Husky to encourage linting across a project. Simply add a dev dependency for Husky, and add configuration.

npm install --save-dev husky
yarn add --dev husky
"husky": {
  "hooks": {
    "pre-commit": "lint-staged"
  }
}

Husky can be used for other Git Hooks as well. Check out their documentation for more details.

2.0.1

12 months ago

2.0.0

12 months ago

1.7.0

1 year ago

1.6.1

3 years ago

1.6.0

3 years ago

1.5.0

3 years ago

1.4.4

4 years ago

1.4.3

5 years ago

1.4.2

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.11

6 years ago

1.3.10

6 years ago

1.3.9

7 years ago

1.3.8

7 years ago

1.3.6

7 years ago

1.3.5

7 years ago

1.3.4

7 years ago

1.3.3

8 years ago

1.3.2

8 years ago

1.3.1

8 years ago

1.3.0

8 years ago

1.2.8

8 years ago

1.2.7

8 years ago

1.2.6

8 years ago

1.2.5

8 years ago

1.2.4

8 years ago

1.2.3

8 years ago

1.2.2

8 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.33

8 years ago

1.1.32

8 years ago