eslint-config

ESLint and Prettier config presets for JS/TS/React/ReactNative/Sencha

MIT License

Downloads
168
Stars
0
Committers
1

@oncoursesystems/eslint-config

OnCourse Systems' ESLint and Prettier config presets for JS/TS/React/ReactNative/Sencha.

Package Version Usage
@oncoursesystems/eslint-config-base Base rules for JS, JSON, YAML, and Markdown
@oncoursesystems/eslint-config-react Rules for developing React websites
@oncoursesystems/eslint-config-react-native Rules for developing React Native applications
@oncoursesystems/eslint-config-sencha Rules for developing Sencha ExtJS websites
@oncoursesystems/eslint-config-ts Typescript rules
@oncoursesystems/prettier-config Prettier configuration

Usage

Install

npm install -D eslint @oncoursesystems/eslint-config-base

Config .eslintrc

{
  "extends": "@oncoursesystems/eslint-config-base"
}

You don't need .eslintignore normally as it has been provided by the preset.

Add script for package.json

For example:

{
  "scripts": {
    "lint": "eslint .",
    "lint:fix": "eslint . --fix"
  }
}

Config VS Code auto fix

Install VS Code ESLint extension and create .vscode/settings.json

{
  "prettier.enable": false,
  "editor.formatOnSave": false,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  }
}

Development Setup

Install dependencies

pnpm install

Adding new packages

This project uses pnpm workspaces to manage multiple packages. To ensure that every part of the monorepo infrastructure works as intended, every package must be located within the ./packages/<new-package-name> folder.

Release & Publish

Make sure you have authenticated to your npm account using npm login. To publish packages, run the following command:

pnpm run release

This will auto-bump the version numbers, then upload the packages to NPM. It will also create a new GitHub release with the tagged version.