0.2.3 • Published 2 years ago

@shimman-dev/eslint-config v0.2.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

eslint config

Inherit, whatever you want

npm version

Config used for shimman-dev projects.

Designed to work with React, Vitest, TypeScript, and ECMAScript.

Install

Installation does require eslint and @typescript-eslint/parser:

npm install -D @shimman-dev/eslint-config@latest \
	       eslint \
               @typescript-eslint/parser
yarn add --dev @shimman-dev/eslint-config@latest \
	       eslint \
               @typescript-eslint/parser
pnpm add --save-dev @shimman-dev/eslint-config@latest \
	            eslint \
                    @typescript-eslint/parser

Usage

Several configs include base, react, typescript, and test.

Example of usage for a react project using an .eslintrc.cjs config:

module.exports = {
  env: {
    browser: true,
  },
  settings: {
    react: {
      version: "18",
    },
  },
  parserOptions: {}, // define your `tsconfigRootDir` and `projects` as needed
  extends: [
    "@shimman-dev/eslint-config/react",
    "@shimman-dev/eslint-config/test",
  ],
  parser: "@typescript-eslint/parser",
  root: true,
};

List of Plugins used

@typescript-eslint/eslint-plugin
eslint-config-airbnb
eslint-config-airbnb-base
eslint-config-airbnb-typescript
eslint-config-prettier
eslint-plugin-html
eslint-plugin-import
eslint-plugin-jsdoc
eslint-plugin-jsx-a11y
eslint-plugin-promise
eslint-plugin-react
eslint-plugin-react-hooks
eslint-plugin-sonarjs
eslint-plugin-testing-library
eslint-plugin-unicorn
eslint-plugin-vitest

Todos

  • create portable config
  • explain reasoning for each plugin