0.0.9 • Published 1 year ago

@genkit/eslint-config-react v0.0.9

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

@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