Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 1.06 KB

README.md

File metadata and controls

32 lines (23 loc) · 1.06 KB

React Shopping Cart

A fully functional shopping cart that utilizes local storage.

Description

I wanted to build out a functional shopping cart that includes adding and removing items from the cart as well as calculating the subtotal of all items. All of this is accomplished using TypeScript, React, JSON data for the custom store items, and local storage.

Getting Started

Dependencies

  • TypeScript 5.3.3
  • React 18.2.0

Expanding the ESLint configuration

export default {
  // other rules...
  parserOptions: {
    ecmaVersion: "latest",
    sourceType: "module",
    project: ["./tsconfig.json", "./tsconfig.node.json"],
    tsconfigRootDir: __dirname,
  },
};
  • Replace plugin:@typescript-eslint/recommended to plugin:@typescript-eslint/recommended-type-checked or plugin:@typescript-eslint/strict-type-checked
  • Optionally add plugin:@typescript-eslint/stylistic-type-checked
  • Install eslint-plugin-react and add plugin:react/recommended & plugin:react/jsx-runtime to the extends list