@alwaysai/eslint-config

0.1.3 • 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

Release procedure

To release the package to npmjs.org follow the steps:

  • publish new version: npm run publish:<major|minor|patch>
  • check the bitbucket pipeline running, if successful a new version will be created and published to npmjs.org
  • to get the auto-generated commit and tags, simply pull: git pull

License

MIT © alwaysAI, Inc.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.3
    12
    • latest

Version History

Package Sidebar

Install

npm i @alwaysai/eslint-config

Homepage

alwaysai.co

Weekly Downloads

976

Version

0.1.3

License

none

Unpacked Size

4.81 kB

Total Files

4

Last publish

Collaborators

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