Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-config-kyt

Package Overview
Dependencies
Maintainers
7
Versions
275
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-kyt

ESLint configuration for kyt projects.

  • 1.6.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.4K
increased by171.83%
Maintainers
7
Weekly downloads
 
Created
Source

eslint-config-kyt

Installation

yarn
$ yarn add --dev --exact @babel/core @babel/eslint-parser @babel/eslint-plugin eslint prettier \
  eslint-config-airbnb eslint-config-prettier eslint-plugin-import \
  eslint-plugin-jest eslint-plugin-jest-formatting \
  eslint-plugin-json eslint-plugin-jsx-a11y eslint-plugin-prettier \
  eslint-plugin-react eslint-plugin-react-hooks eslint-config-kyt

# or

$ npm i --save-dev --save-exact @babel/core @babel/eslint-parser @babel/eslint-plugin eslint prettier \
  eslint-config-airbnb eslint-config-prettier eslint-plugin-import \
  eslint-plugin-jest eslint-plugin-jest-formatting \
  eslint-plugin-json eslint-plugin-jsx-a11y eslint-plugin-prettier \
  eslint-plugin-react eslint-plugin-react-hooks eslint-config-kyt

Add to the extends section of your ESLint configuration:

.eslintrc(.json):

{
  "extends": ["kyt"],
  "rules": {}
}

.eslintrc.js:

module.exports = {
  extends: ['kyt'],
  // shorthand: ['kyt']
  rules: {
    /* If you must, override rules here :P */
  },
};

To add a subset of rules, you can specify one of the following:

module.exports = {
  extends: [
    // extends airbnb/base and contains all of our custom rules
    'kyt/base',
    // adds `jest` and `jest-formatting` plugins
    'kyt/jest',
    // adds Airbnb's React rules before our custom rules
    'kyt/react',
    // all rules
    'kyt',
  ],
};

Prettier Support

yarn eslint . --fix

Or add to your package.json:

{
  "scripts": {
    "lint": "eslint .",
    "lint-fix": "eslint . --fix"
  }
}

Editor Configuration

To automatically format your code based on these rules during development, install a package for your IDE. We recommend that you install and configure ESLint with one of the following editors:

VSCode
  1. go to View > Extensions
  2. Install ESLint
  3. Install Prettier
  4. Go to Code > Preferences
  5. Change the following preferences to true:
"prettier.eslintIntegration": true,
"editor.formatOnSave": true
Atom
  1. Go to Preferences > Install
  2. Install linter
  3. Install linter-eslint
  4. Install prettier-atom. In the prettier-atom settings, check the ESLint Integration checkbox.
  5. Make sure all packages are enabled. You may need to restart Atom.

Keywords

FAQs

Package last updated on 16 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc