@widgitlabs/eslint-config

1.0.1 • Public • Published

@widgitlabs/eslint-config

Widgit Labs coding standards for JavaScript.

Installation

This package is an ESLint shareable configuration, and requires: babel-eslint, eslint, eslint-config-react-app, eslint-plugin-flowtype, eslint-plugin-import, eslint-plugin-jsx-a11y, eslint-plugin-jsdoc, eslint-plugin-react, eslint-plugin-react-hooks, eslint-plugin-sort-destructure-keys.

To install this config and the peerDependencies when using npm 5+:

npx install-peerdeps --dev @widgitlabs/eslint-config@latest

You can then use it directly on the command line:

./node_modules/.bin/eslint -c @widgitlabs/eslint-config MyFile.js

Alternatively, you can create your own configuration and extend these rules:

extends:
- @widgitlabs/eslint-config

Working with TypeScript

If you desire to use TypeScript for your project, you will need to add another dependency:

npm install --save-dev @typescript-eslint/parser

Once it's installed, update your configuration with the parser parameter:

parser: "@typescript-eslint/parser"
extends:
    - @widgitlabs/eslint-config

Global Installation

When installing globally, you need to ensure the peer dependencies are also installed globally.

Run the same command as above, but instead with --global:

npx install-peerdeps --global @widgitlabs/eslint-config@latest

This allows you to use eslint -c widgitlabs MyFile.js anywhere on your filesystem.

/@widgitlabs/eslint-config/

    Package Sidebar

    Install

    npm i @widgitlabs/eslint-config

    Weekly Downloads

    0

    Version

    1.0.1

    License

    GPL-3.0-or-later

    Unpacked Size

    6.78 kB

    Total Files

    4

    Last publish

    Collaborators

    • evertiro