@alwaysai/eslint-config
v0.1.3
Published
ESLint configurations for alwaysAI projects
Downloads
1,049
Maintainers
Keywords
Readme
@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
- @alwaysai/tsconfig: TypeScript configurations for alwaysAI projects
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.