JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 117
  • Score
    100M100P100Q78341F
  • License MIT

Kellerkinder ESLint configuration

Package Exports

  • @kellerkinder/eslint-config

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@kellerkinder/eslint-config) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Kellerkinder ESLint Config

npm version

This package provides the Kellerkinder ESLint configuration for vanilla JS. It is based on the AirBnB Configuration with slight alterations.

Requirements

This config has been developed and tested with the following requirements:

  • NodeJS >= 12
  • ESLint >= 7.2.0
  • ESLint Plugin Import: >= 2.22.1

Installation

In order to use this configuration, run the following scripts in your NodeJS project:

$ npm i -D eslint eslint-plugin-import @kellerkinder/eslint-config

Usage

You can use this configuration by creating an .eslintrc.json inside your project's root directory that is extending this configuration.

{
    "extends": "@kellerkinder/eslint-config"
}

You can now execute eslint by running the following script:

$ npx eslint src/

The src/ directory can be replaced with the directory or file you want to lint.

If you want ESLint to try to fix the errors it found, execute the following command:

$ npx eslint src/ --fix

Alternatively, refer to your IDE's documentation to find out, if and how ESLint is integrated.

Babel Configuration

If you are using babel in your project, you can provide ESLint with your own configuration file, by adding this section to your ESLint config:

{
  "parserOptions": {
      "babelOptions": {
          "configFile": "path/to/your/.babelrc"
      }
  }
}

Troubleshooting

Linter is not a constructor

This error is known to be caused by an empty .eslintignore file. To solve this, either make sure that your .eslintignore contains at least one entry or is removed entirely.

Changelog

This project adheres to Semantic Versioning. Please refer to the CHANGELOG.md for detailed changes and migration instructions.

License

MIT