@stackup/eslint-config

An ESLint configration metapackage

Usage no npm install needed!

<script type="module">
  import stackupEslintConfig from 'https://cdn.skypack.dev/@stackup/eslint-config';
</script>

README

@stackup/eslint-config

Build Version License

A metapackage for ESLint configuration for TypeScript projects.

The following plugins are integrated:

  • eslint-plugin-import
  • eslint-plugin-jsx-a11y
  • eslint-plugin-prettier
  • eslint-plugin-react
  • eslint-plugin-react-hooks

Usage

If you're starting a project from scratch, just run the following commands:

$ yarn add eslint prettier @stackup/eslint-config --dev

If you're using React, your configuration should look like this:

{
  "root": true,
  "extends": ["@stackup/eslint-config", "@stackup/eslint-config/react"],
  "parserOptions": {
    "project": "./tsconfig.json"
  },
  "settings": {
    "react": {
      "version": "detect"
    }
  }
}

Otherwise, your configuration should look like this:

{
  "root": true,
  "extends": ["@stackup/eslint-config"],
  "parserOptions": {
    "project": "./tsconfig.json"
  }
}

Add the following script to your package.json:

"scripts": {
  "lint": "eslint . --ext .ts,.tsx",
}