@aimhigh/aha-eslint-rules
v2.0.2
Published
Global ESLint rules for AHA projects
Keywords
Readme
AHA ESLint Rules
This repo serves as a common configuration for ESLint rules, with the intention of making our rules consistent across repositories.
Usage
Extend the rules provided by this repo in a flat eslint config. There are three exports depending on the code type.
- NPM Library: ahaCoreLint
- React: ahaLint
- Jest: ahaJestLint
Example
// @ts-check
import { ahaLint, ahaJestLint } from '@aimhigh/aha-eslint-rules'
import tseslint from 'typescript-eslint'
export default tseslint.config(
{
ignores: ['**/dist/*', '**/node_modules/*'],
},
{
extends: [ahaLint],
languageOptions: {
parserOptions: {
projectService: {
allowDefaultProject: [
'eslint.config.mjs',
],
},
tsconfigRootDir: import.meta.dirname,
},
},
},
{
files: ['**/*.spec.*'],
extends: [ahaJestLint],
}
)Publishing
- Login to npm using npm login
- Enter your npm username and password
- Install the current package
npm i - Test the package before publishing
npm i aha-eslint-rules - Increment the version using
npm version patch|minor|major - Dry run the publish to verify everything works
npm publish --dry-run - Publish using
npm publish --access public
