@stackup/eslint-config
v1.0.1
Published
An ESLint configration metapackage
Readme
A metapackage for ESLint configuration for TypeScript projects.
The following plugins are integrated:
eslint-plugin-importeslint-plugin-jsx-a11yeslint-plugin-prettiereslint-plugin-reacteslint-plugin-react-hooks
Usage
If you're starting a project from scratch, just run the following commands:
$ yarn add eslint prettier @stackup/eslint-config --devIf 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",
}