@genkit/eslint-config-react

0.0.9 • Public • Published

@genkit/eslint-config-react

Double Quote, Semi and other best practices.

Install

# pnpm
pnpm add -D @genkit/eslint-config-react

# yarn
yarn add -D @genkit/eslint-config-react

# npm
npm install -D @genkit/eslint-config-react

Usage

.eslintrc.json

{
  "$schema": "https://json.schemastore.org/eslintrc",
  "root": true,
  "extends": "@genkit/eslint-config-react"
}

package.json

{
  "scripts": {
    "lint": "eslint --ext .js,.cjs,.mjs,.jsx,.ts,.cts,.mts,.tsx,.vue,.html,.json,.jsonc,.json5,.yml,.yaml,.toml ."
  }
}

VSCode

If you are using Visual Studio Code it is recommanded to install eslint and editorconfig extensions.

.vscode/settings.json

{
  "prettier.enable": false,
  "editor.defaultFormatter": null,
  "editor.formatOnSave": false,
  "editor.formatOnPaste": false,
  "editor.codeActionsOnSave": {
    "source.fixAll": false,
    "source.fixAll.eslint": true,
    "source.organizeImports": false
  },
  "eslint.validate": [
    "javascript",
    "typescript",
    "javascriptreact",
    "typescriptreact",
    "vue",
    "html",
    "json",
    "jsonc",
    "json5",
    "yaml",
    "yml",
    "toml",
    "markdown"
  ]
}

.editorconfig

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 2
tab_width = 4
trim_trailing_whitespace = true

Package Sidebar

Install

npm i @genkit/eslint-config-react

Weekly Downloads

0

Version

0.0.9

License

none

Unpacked Size

11.9 kB

Total Files

6

Last publish

Collaborators

  • thetyin