Skip to content

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

License

Notifications You must be signed in to change notification settings

oncoursesystems/eslint-config

Repository files navigation



@oncoursesystems/eslint-config

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

OnCourse Systems ESLint config is released under the MIT license.
Package Version Usage
@oncoursesystems/eslint-config-base NPM version Base rules for JS, JSON, YAML, and Markdown
@oncoursesystems/eslint-config-react NPM version Rules for developing React websites
@oncoursesystems/eslint-config-react-native NPM version Rules for developing React Native applications
@oncoursesystems/eslint-config-sencha NPM version Rules for developing Sencha ExtJS websites
@oncoursesystems/eslint-config-ts NPM version Typescript rules
@oncoursesystems/prettier-config NPM version 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.

About

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

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published