@alwaysai/eslint-config

0.1.0 • Public • Published

@alwaysai/eslint-config

ESLint configurations for alwaysAI projects

Usage

Install this package and the eslint command-line tool:

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

Create a file .eslintrc.json at the root of your project with contents:

{
  "extends": [
    "@alwaysai/eslint-config"
  ]
}

Add these lines to your package.json's "scripts" field:

  "lint": "eslint --ext .ts,.tsx <directory>",
  "lint:fix": "npm run lint -- --fix",

where <directory> is the subdirectory of your project containing the source code that you want to lint. Finally add && npm run lint to your package's "test" script to make sure you enforce the lint rules! We recommend setting up your editor to automatically fix lint errors on save. That way the linter mostly stays out of your way and just does the right thing. In Visual Studio Code, this plugin works great.

Rules

For code formatting, this package uses eslint-config-prettier, which disables all rules that are unnecessary or might conflict with Prettier. Instead of calling prettier directly, this package employs eslint-plugin-prettier, which "runs Prettier as a ESLint rule and reports differences as individual ESLint issues".

Related

License

MIT © alwaysAI, Inc.

Readme

Keywords

none

Package Sidebar

Install

npm i @alwaysai/eslint-config

Weekly Downloads

261

Version

0.1.0

License

MIT

Unpacked Size

79.8 kB

Total Files

8

Last publish

Collaborators

  • sheshalwaysai
  • alexbigkid
  • tony-alwaysai
  • jarrett.thompson
  • dwolner
  • olaf.ziel
  • lilamullany
  • mitchrosenlof
  • carloslazo
  • ericvanbuhler
  • socalrunner