2.0.3 • Published 10 months ago

@withyoutecnologia/eslint-config v2.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Eslint Config for Café e Design

Whats included?

  • React plugin;
  • React Hooks plugin;
  • JSX a11y plugin;

Setup

  1. Install the dependencies
pnpm i eslint @withyoutecnologia/eslint-config -D
  1. Create a .eslintrc.cjs extending the config:
const path = require('path');

/** @type {import("eslint").Linter.Config} */
module.exports = {
  extends: ['@withyoutecnologia/eslint-config/react'],
  parser: '@typescript-eslint/parser',
  parserOptions: {
    project: path.join(__dirname, 'tsconfig.json')
  }
};
  1. Add the linting scripts
// package.json
"scripts": {
  // ...,
  "lint": "eslint src --ext ts,tsx",
  "lint:fix": "eslint src --ext ts,tsx --fix",
}